nzmarkc
Contributor
Contributor

VM HA Understanding

Jump to solution

When a host 'crashes', how does a HA system restart the VMs?

I understand the process of manually doing a vMotion with a live VM: memory is copied to 'new' VM, then a bitmap of the first VM is taken, and compared to 'new'. Deltas are moved to new VM and new VM is started, old VM is shut down. Same thing happens when a host is put into Maintenance mode. BUT...

If a host fails, how is the memory (which ostensibly doesn't exist anymore) copied to the new VM for it to continue operating?

Thanks for the help!!

Mark

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
idle-jam
Immortal
Immortal

unlike vmotion, vmware ha does not preserve the memory state of the VM. it's will be a reboot on a new host with a new state. if you keen to maintain the memory state then you will need to look into VMware FT, but then the limitation is that i can only protect 1vCPU VM.

View solution in original post

0 Kudos
8 Replies
idle-jam
Immortal
Immortal

this should be a good read http://www.vmwarewolf.com/how-does-the-vmware-ha-work/ what vmware ha does was that when a failed VM has occured (power off) it will be "automatically" power up in the next host

0 Kudos
nzmarkc
Contributor
Contributor

I understand what happens, just not how it happens! If a host crashes - i.e. somebody trips over a plug - how is the VM memory state transferred to the secondary (new) VM so it continues on unabated? If the host goes down immediately, there is no time to transfer memory states.

From the VMwarewolf link: "Safe restart of virtual machines is made possible by the locking technology in the ESX Server storage stack, which allows multiple ESX Servers to have access to the same virtual machines file simultaneously." So does the .vmem file get used? If so, how up to date is it (eg: milliseconds, microseconds, seconds?) at any one point? And if the .vmem file is used to keep track of vmemory, why isn't the memory constrained by disk I/O?

0 Kudos
idle-jam
Immortal
Immortal

unlike vmotion, vmware ha does not preserve the memory state of the VM. it's will be a reboot on a new host with a new state. if you keen to maintain the memory state then you will need to look into VMware FT, but then the limitation is that i can only protect 1vCPU VM.

View solution in original post

0 Kudos
AndreTheGiant
Immortal
Immortal

For more info see also: http://www.vmware.com/pdf/vsphere4/r41/vsp_41_availability.pdf

Andre

Andre | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
0 Kudos
chriswahl
Virtuoso
Virtuoso

The HA agent is loaded on each host and constantly communicates with each other host in the HA cluster. Using pings and isolation response rules, HA will determine when a host fails (or simply becomes isolated on the network) and take ownership of the VMs that were stranded and power them on. This is a crash consistent power event (example: Windows displays the "why did this server power off" message" when you log on the VM).

Yes, the hosts all have acess to the VMware files (vmdk, vmx, etc.) and VMFS handles a locking mechanism. The locks basically tell the hosts which host currently "owns" the VM. In an HA event, the lock is expired so that another host can grab the VM and power it on. In the case of NFS storage, a lock file is actually resident in the VM folder and does the same thing as the VMFS metadata.

VCDX #104 (DCV, NV) ஃ WahlNetwork.com ஃ @ChrisWahl ஃ Author, Networking for VMware Administrators
bulletprooffool
Champion
Champion

Memory state is unfortunately not retained - the new Vm instance is booted from scratch - so everything loads from scratch (and running processes are lost)

If you are looking for point in time recovery - with memory state, you need to look into VMware FT. In this case what happens is that 2 instances of the VM are run at the same time on 2 different ESX hosts. In this case - you use shared storage but each VM instance manages its own CPU / memory (though these are managed 'in step') - thus when the first ESX host dies, the memory on the second instance is used in the recovery of the VM.

One day I will virtualise myself . . .
RR9
Enthusiast
Enthusiast

one of the good document on VMware HA.. http://labs.vmware.com/download/103/

0 Kudos
nzmarkc
Contributor
Contributor

Thank you to all who answered me - I appreciate your time and effort. Thanks for the links as well. I think I understand HA much better now.

Cheers!

Mark

0 Kudos