Home > Virtualization > vSphere vs. Hyper-V: Difference of Virtual Machine States

vSphere vs. Hyper-V: Difference of Virtual Machine States

January 6th, 2013 Leave a comment Go to comments

While reading articles about Microsoft Hyper-V, I found that Hyper-V seemed to have different states for virtual machines from VMware vSphere. The virtual machine in Hyper-V is represented by the Msvm_ComputerSystem class. If you are familiar with VMware vSphere, you know the equivalent in vSphere is VirtualMachine. At first sight, the Hyper-V APIs may not look straight-forward. The Hyper-V APIs is actually based on Windows Management Instrumentation (WMI), which is essentially CIM from DMTF.

The Msvm_ComputerSystem class defineds the RequestStateChange method that can be used to set the state to one of these:

Time to learn how to "Google" and manage your VMware and clouds in a fast and secure

Hyper-V VM States Action Equivalent vSphere States VirtualMachinePowerState
Enabled 2 Turns the VM on. Powered on
Disabled 3 Turns the VM off. Powered off
Reboot 10 A hard reset of the VM. Similar to resetVM_Task() method
Reset 11 For future use. NA
DMTF Reserved 13–32767 Reserved. NA
Paused 32768 Pauses the VM. NA
Suspended 32769 Saves the state of the VM. Suspended
Vendor Reserved 32770–65535 Reserved. NA

As you can tell, there are good mappings between these two. After all, both are virtual machines. Somehow, the Hyper-V APIs mixes the real states and actions together. Requesting a state change results in actions that deliver the change. VMware vSphere APIs uses the real methods for state changes, for example, powerOnVM_Task(), powerOffVM_Task(), resetVM_Task().

The real difference is the paused state, which does not have equivalent in vSphere. Coming from VMware world, I was at little confused about the paused and suspended at first. Then I found this link offers pretty good explanation of the difference:

“…You can also pause or save a virtual machine in a given state. When you pause or save a virtual machine, it stays in its current state for as long as you want.
Although pausing a virtual machine does not free up the memory that is allocated to that virtual machine, it frees up main processor resources. Saving a virtual machine frees up memory and main processor resources so that they can be used by other virtual machines or by the virtualization server.”

It’s worthwhile to point out that the GUI from Microsoft has a different terminology – it uses saving instead of suspending. If you are familiar with Windows terms, the pausing is like sleep while saving like hibernate.

With the difference clear, the question is whether the extra paused state is useful or not. As described earlier, the key difference between paused and suspended is memory. Having the memory in place can surely speed up the resuming of a virtual machine, especially when the virtual machine has big memory footprint. At the same time, the allocated memory cannot be used by other virtual machines.

If you need instant recover of virtual machines, pausing them may be helpful. You may wonder why not keep them always running because the difference of paused and powered on is whether the virtual machine gets CPU allocation. If a virtual machine does not use much CPU power, it’s probably not worthwhile to pause it  – just keep it running. I think the best use cases of pausing feature is for virtual machines that 1. use little memory. 2. consume many CPU cycles while idle. 3. need to resume instantly.

  1. January 6th, 2013 at 22:30 | #1

    vSphere vs. Hyper-V: Difference of Virtual Machine States (DoubleCloud) http://t.co/ylUucbJ2

  2. January 6th, 2013 at 23:04 | #2

    vSphere vs. Hyper-V: Difference of Virtual Machine States (DoubleCloud) http://t.co/cvqwTcC9

  3. January 7th, 2013 at 13:29 | #3

    #vSphere vs. Hyper-V: Difference of Virtual Machine States http://t.co/1c3jqfXw #HyperV #VMware

  4. January 7th, 2013 at 13:48 | #4

    I think one of the best uses for the Pause VM state in Hyper-V is to quickly recover from low host disk space scenarios when using dynamic virtual hard disks. When Hyper-V detects that a volume storing VM components has less than 200MB of disk space, it automatically pauses VMs with dynamic virtual hard disks stored on those volumes to protect them and prevent disk errors and/or application crashes from occurring. Once disk space is freed up, the VMs can be quickly resumed and pick back up from where they left off.

  5. January 7th, 2013 at 15:40 | #5

    vSphere vs. Hyper-V: Difference of Virtual Machine States – http://t.co/mVmc84Fb

  6. January 7th, 2013 at 18:40 | #6

    Thanks Keith, I agree with you that it’s a great use case for the pausing VMs.

  7. January 11th, 2013 at 06:01 | #7

    Still not a key difference, VMware vSphere vs. Hyper-V: Difference of Virtual Machine States http://t.co/mObOB7lO

  1. January 7th, 2013 at 22:43 | #1