none
Hyper-V host disable time sync

    Question

  • Hi,

    How I can disable time sync for guest VM with host when I rebote VM? I read this article, but I didn't find how to stop sync after reboting. Also this solution proposed by Vincet Hu is inappropriate becouse I need time which was before restart.

    Thank in advance!

    Wednesday, December 05, 2012 2:55 PM

Answers

  • From your first reference, Ben is pretty clear that you cannot disable time synch when you boot.  It is a requirement.

    "Question #2 – Is there any way that I can stop Hyper-V from putting the wrong time in the RTC at boot?

    In short; no.  We need to put something in there – and that is the best thing that we have to work with."

    There is no time before the restart because a virtual machine does not have a real time clock that continues to run when the VM is turned off.  As Ben says, a physical computer has a battery to keep a clock running while it is turned off.  A VM has no equivalent.

    What are you trying to do?  Maybe if we knew that we could offer some suggestions.


    tim


    Wednesday, December 05, 2012 4:49 PM

All replies

  • I think you are talking about partially disable Hyper-V Time sync. This post may help:

    How to partially disable Hyper-V time synsync - ChicagoTech.net

    Q: We have one Windows 2008 R2 DC running on Hyper-v. Someone told us that
      we should partially disable the Hyper-V time synchnoization ...

    chicagotech.net/netforums/viewtopic.php?f=1&t=16191

    Bob Lin, MVP, MCSE & CNE Networking, Internet, Routing, VPN Troubleshooting on

    http://www.ChicagoTech.net

    How to Setup Windows, Network, VPN & Remote Access on

    http://www.howtonetworking.com

    Wednesday, December 05, 2012 3:59 PM
  • From your first reference, Ben is pretty clear that you cannot disable time synch when you boot.  It is a requirement.

    "Question #2 – Is there any way that I can stop Hyper-V from putting the wrong time in the RTC at boot?

    In short; no.  We need to put something in there – and that is the best thing that we have to work with."

    There is no time before the restart because a virtual machine does not have a real time clock that continues to run when the VM is turned off.  As Ben says, a physical computer has a battery to keep a clock running while it is turned off.  A VM has no equivalent.

    What are you trying to do?  Maybe if we knew that we could offer some suggestions.


    tim


    Wednesday, December 05, 2012 4:49 PM
  • Right click Guest OS - Settings - check under Integration service - Disable Time Synchronization. Than reboot
    Thursday, December 06, 2012 8:37 PM
  • Does not work Tyler. When I reboot the guest OS, the time is still syncronized. It does not go back to the earlier time that existed when I built the VM. I am using an old snapshot.
    Wednesday, June 26, 2013 2:31 PM
  • I have a follow up to this question. Issue is testing Windows 3rd party applications and how they are affected by DST. What I want is to save a VM that is 10 minutes prior to a DST change either Spring or Fall. Then copy that off to a *.sav file. Load the VM and run tests against the 3rd party application while the time change occurs. Since I will have multiple tests I will need to load the VM in again for the next test. This may need to be repeated many times. If the clock is going to automatically be reset by Hyper-V synchronization then I cannot use VM's to run these tests. Is there another solution?
    Thursday, June 25, 2015 3:17 PM
  • As Tim stated in the answer - the time is always synced with the host at BIOS post time during the boot process.

    Just like a bare meal machine does with the hardware clock of the motherboard.

    The way to handle this is to properly set the timezone in the OS of the VM.  That applies the offset from the hardware clock.  Or, AD or an NTP time service.


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

    Thursday, June 25, 2015 3:41 PM
    Moderator
  • You advance the BIOS clock of the physical machine (the hardware clock is the ultimate time root during the boot process) and you don't allow the VM to time sync with AD or NTP.

    That is the most reliable way to spoof time for testing purposes.


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

    Thursday, June 25, 2015 3:43 PM
    Moderator