Fix a bug with hostname in VMs