VMware Cloud Community
dpinedo
Contributor
Contributor
Jump to solution

HA VM monitoring, how to test?

Hello,

We have 2 ESXi 5.1 in a cluster with HA enabled.

We have a software suite distributed in several VM's and we'd like to test how the whole behaviour is affected when some of the VM (node) crashes.

The HA is working properly: When I shut down or reboot one of the ESXi, the VM are Migrated to the other ESX.

But we'd like not to have to shut down the entire ESX to test a node (a node of our software suite) crashing. Most of the nodes are linux systems (CentOS). We have tried:

     1)Powering off the VM from the vSphere client and from the VM itself --> But it's not restarted (which I suppose is correct, as it is not a crash, is a voluntary shutdown).

     2)With a fork bomb, but nothing happens: The VM gets frozen, but it isn't restarted.

Any suggestion will be wellcomed.

Reply
0 Kudos
1 Solution

Accepted Solutions
dpinedo
Contributor
Contributor
Jump to solution

cat /dev/zero > /dev/mem

Generates a CPU fault, which causes the system to reboot (at least in vSphere; in VMWare Workstation ask to reboot or to shootdown), so it's not a valid option.

Finally I forced a "kernel panic", the guest gets frozen and after a few minutes the HA system reboots the guest.

Forcing a Linux kernel panic | Borgström

View solution in original post

Reply
0 Kudos
4 Replies
a_p_
Leadership
Leadership
Jump to solution

Welcome to the Community,

only a guess. Since VM monitors VMware Tools as well as the VM's I/O, you may need to somehow force the guest OS to panic in order for HA to consider the VM as dead.

André

maishsk
Expert
Expert
Jump to solution

Have you tried this?

Cause a Linux Kernel Panic or a Windows BSOD

echo c > /proc/sysrq-trigger

Maish Saidel-Keesing • @maishsk • http://technodrone.blogspot.com • VMTN Moderator • vExpert • Co-author of VMware vSphere Design
Reply
0 Kudos
dpinedo
Contributor
Contributor
Jump to solution

I have tried with:

cat /dev/zero > /dev/mem


and it worked for me in CentOS: The VM is immediatelly rebooted


In this post there is more information about it:

http://archive.geekworld.co.za/node/277

Thank you all

Reply
0 Kudos
dpinedo
Contributor
Contributor
Jump to solution

cat /dev/zero > /dev/mem

Generates a CPU fault, which causes the system to reboot (at least in vSphere; in VMWare Workstation ask to reboot or to shootdown), so it's not a valid option.

Finally I forced a "kernel panic", the guest gets frozen and after a few minutes the HA system reboots the guest.

Forcing a Linux kernel panic | Borgström

Reply
0 Kudos