none
Impact on Virtual Machines if Hyper v is restarted

    Question

  • Hi folks ,

    what can be the impact on Virtual Machines if Hyper v is restarted.

    Thanks

    Wednesday, February 08, 2017 9:58 AM

Answers

  • Pausing (actually the machine state is being saved) does not affect VM functionality.  However, as noted earlier, there is a finite amount of time the host will have to save the state to disk, which is a matter of writing the content of the VM's memory to disk.  Any virtual machine that has not had its full memory written to disk by the time this finite amount of time is reached is simply turned off.  Those machines would potentially reboot (another setting) upon startup of the Hyper-V host.

    And all bets are off if the host does not have a graceful shutdown.  In that case, all the VMs 'crash', too, and would have to reboot upon start of the host.  You should use the save state on shutdown judiciously in your environment.  Determine those critical machines that you want to save in case of a graceful shutdown of the host and configure them to save.  Those machines that can safely be rebooted, do not configure to save.

    Of course, the safest method is what Luigi said initially - gracefully shutdown the VMs before shutting down the host.


    . : | : . : | : . tim

    • Marked as answer by BeingMeraj Sunday, February 26, 2017 10:37 AM
    Wednesday, February 15, 2017 2:28 PM

All replies

  • Hi BeingMeraj.

    Restarting the Hyper-V host will make all the hosted VMs being shutted down.
    The safest and cleanest path is to cleanly shut down each VM prior to restarting / shutting down the hypervisor (this goes for all hypervisors), of course.

    Bye.


    Luigi Bruno
    MCP, MCTS, MOS, MTA

    Wednesday, February 08, 2017 10:14 AM
  • In my environment, virtual machines are being saved their states and after Hyper-V goes up again, so do the machines without affecting nothing. It has never done anything wrong on my system. Check your preferences, how does it affecting yours. 

    Best regards


    Social Technet

    Wednesday, February 08, 2017 10:19 AM
  • The default configuration of a VM is to be saved if the host goes down in a graceful manner.  However, there is only so much time that the shutdown process will wait before simply turning off the VMs, so if you have several VMs, all of them might not get saved.  Any that are saved will come up in the state they were in when the shutdown was requested.  Any which were not saved will reboot.

    Of course, if the host terminates abnormally, there is no time to save any virtual machine, and all virtual machines will be rebooted upon startup of the host.

    Startup of virtual machines upon host boot is also a setting on each virtual machine.  You can set VMs to always start, start only if running when the host went down, or do nothing.

    Look at the Settings of each virtual machine to see how you have configured your environment.


    . : | : . : | : . tim

    Wednesday, February 08, 2017 1:24 PM
  • Hi Luigi ,

    The Virtual Machines were not restarted rather went in a paused state. the screen where i left off .. i carried on from there inside the VM .

    Wednesday, February 15, 2017 1:06 PM
  • Lukasz Olszowy , thats the safest approach i felt but pausing the VMs did not affect the VM functionality though 

    Thanks ..

    Wednesday, February 15, 2017 1:07 PM
  • Pausing (actually the machine state is being saved) does not affect VM functionality.  However, as noted earlier, there is a finite amount of time the host will have to save the state to disk, which is a matter of writing the content of the VM's memory to disk.  Any virtual machine that has not had its full memory written to disk by the time this finite amount of time is reached is simply turned off.  Those machines would potentially reboot (another setting) upon startup of the Hyper-V host.

    And all bets are off if the host does not have a graceful shutdown.  In that case, all the VMs 'crash', too, and would have to reboot upon start of the host.  You should use the save state on shutdown judiciously in your environment.  Determine those critical machines that you want to save in case of a graceful shutdown of the host and configure them to save.  Those machines that can safely be rebooted, do not configure to save.

    Of course, the safest method is what Luigi said initially - gracefully shutdown the VMs before shutting down the host.


    . : | : . : | : . tim

    • Marked as answer by BeingMeraj Sunday, February 26, 2017 10:37 AM
    Wednesday, February 15, 2017 2:28 PM