Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 ?

like image 400
Xsmael Avatar asked May 16 '14 15:05

Xsmael


People also ask

How does virtual machine sync time with host?

Configure the guest VM to synchronize time with ESX. In the VM's configuration, go to Edit Settings > Options > VMware tools. Tick the synchronise guest time with host box.

How do I turn off time Synchronization in Hyper V?

Open Hyper-V Manager, select the DC VM and click Settings…. Click Integration Services and clear the Time Synchronization option check box. Click OK to apply.


1 Answers

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.

like image 189
Safa Avatar answered Oct 04 '22 04:10

Safa