Consistent hosts

This patch makes `/etc/hosts` file records consistent between container restarts.
Fixes #8972 
But then it will pretty the same as `WriteTo` :D So, I'll implement it.