Add a flag to lines automatically added to the virtual machine's `/etc/hosts` file. Clean the file of automatically added lines before automatically adding some/all of them back again (prevents duplicates).