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

4

8

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 ?

Microphone answered 16/5, 2014 at 15:28 Comment(2)
A little curious why someone would even want that? If you resume a VM that was put to sleep 15 years ago, you want it to still think that it should "party like it's 1999"? VM-based time travel, anyone?Geber
I Have my reasons, but i was really curious about how VMs keep their clock up to date, and BTW you can install one month software license on a VM an then clone it and re-use them each month! :pMicrophone
E
8

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.

Enucleate answered 9/7, 2016 at 5:58 Comment(0)
S
5

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"
Schatz answered 2/6, 2019 at 16:35 Comment(1)
All this, together with the setting rtc.startTime, allows to set the date/time of the guest machine to an arbitrary value. However, when I had got a shared folder, an application still recognised the current date/time from the host (visible in its log output); as soon as I removed the shared folder, the application also used the guest date/time in its log…Tavares
H
1

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.

Heal answered 16/5, 2014 at 15:37 Comment(1)
Ofcourse i don't want to stop the clock for good. I just want it to be suspended when the virutal machine is turned off, as soon as it is turned on the clock should continue where it stopped, that way i knwo since when the virtual machine was turned off. but NO updates. Thanks for your documents, will have a look on it!Microphone
A
1

If you really want to stop updating the time you need to disable it from the Services: VM Ware tools disable do not allow to Start.

Anishaaniso answered 7/8, 2024 at 6:44 Comment(1)
Answering 10 Years later ? ^^'Microphone

© 2022 - 2025 — McMap. All rights reserved.