VMWare how to prevent a virtual machine from updating its date and time

只谈情不闲聊 提交于 2019-12-06 02:36:45

问题


I want to know how virtual machines (VMWare) updates their date and time and how to disable this; because i noticed that even if i suspend/shutdown a virtual machine for a year when i'll turn it on again, it will have the right time and date.

For physical machines i know there is a little battery inside the Central Unit fixed on the Motherboard that helps to keep date when the computer is turned off and disconnected from powersupply. But what about virtual machines how do they keep their time ? and how can I forbid that ?


回答1:


You also need to tell the virtual machine to disable clock synchronization. Brian Keller has a blog post on how to do this with Microsoft Virtual PC. However, I needed to figure it out on VMWare Fusion. Luckily the following PDF from VMWare came to my rescue (http://www.vmware.com/pdf/vmware_timekeeping.pdf). The document is a little painful to read through, but basically all you need to do is open up the .vmx file in TextEdit and add the following entries:

tools.syncTime = "FALSE"
time.synchronize.continue = FALSE
time.synchronize.restore = FALSE
time.synchronize.resume.disk = FALSE
time.synchronize.shrink = FALSE
time.synchronize.tools.startup = FALSE

Two of these caused me problems, first tool.syncTime was already set to false (likely because the Virtual PC image I converted already had time sync disabled). Next was “time.synchronize.tools.startup = FALSE”. This stops the VMWare tools from setting the guest OS time on OS startup and was missing from all the other posts I saw online about dealing with this issue.




回答2:


Virtual Machines do piggy back on the Host OS by default.

Here are 2 documents from VMWare that I have found very helpful. It's not easy to summurize it here though: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427 and http://www.vmware.com/files/pdf/techpaper/Timekeeping-In-VirtualMachines.pdf

That being said, "Stopping the clock" might not be what you meant, since when the VM is running, the guest OS must have a working clock at the very least.




回答3:


2019 update via a VMWare Knowledge Base article. There are now more events that trigger time syncs.

tools.syncTime = "FALSE"
time.synchronize.continue = "FALSE"
time.synchronize.restore = "FALSE"
time.synchronize.resume.disk = "FALSE"
time.synchronize.shrink = "FALSE"
time.synchronize.tools.startup = "FALSE"
time.synchronize.tools.enable = "FALSE"
time.synchronize.resume.host = "FALSE"


来源:https://stackoverflow.com/questions/23699147/vmware-how-to-prevent-a-virtual-machine-from-updating-its-date-and-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!