6.7.2. Demonstrating Virtual Machine High Availability when its Processes are Killed
Procedure 6.1. Demonstrating Virtual Machine High Availability By Killing the Processes Associated with the Virtual Machine
- To simulate a virtual machine crash, we will terminate the virtual machine's process from within its host. In this example, we use the
Atlantichost, and we provide instructions for remotely accessing both hypervisor hosts and Linux hosts.- If you are using a Red Hat Enterprise Virtualization Hypervisor host, you must first enable remote login. On the hypervisor management console, navigate to the
Securitytab and select theEnable ssh password authenticationcheck box. Enter your password in the listed fields, and then clickApply.SSH login to the hypervisor is not recommended, for security reasons, but we allow it during this lab in order to demonstrate high availability. Disable SSH login to the hypervisor when you complete this lab. - Open a terminal and run:
# ssh admin@atlantic.demo.redhat.com
- Accept the authentication key and enter the password for the hypervisor. When you are logged in to the management console, press the
F2key and selectDrop to Shell. You can now execute commands as the root user.
- If you are using a Red Hat Enterprise Linux host, you are able by default to log in to your host remotely. Open a terminal and run:
- Accept the authentication key and enter the password for the host.
- When you have established a remote connection to your host, use the
vdsClientutility to access the Red Hat Enterprise Virtualization Manager daemon running in the host:[root@atlantic]# vdsClient -s 0 list table
This command lists the GUID, process ID, name, and status of each virtual machine on the host. For example:6aba36aa-d0a9-4d51-bcf3-73544bc95964 2783 RHEL6Congo Up 6f8bd3cc-3c54-413a-9a28-0bd2f65eeede 3341 RHEL6RioGrande Up 4e1e0e4f-63e1-4a24-b1a6-76d7ae46e8c4 3015 RHEL6Thames Up
- Send the termination signal to two virtual machines - one which is highly available, and one which is not highly available. This example uses
RHEL6RioGrandeandRHEL6Congo.[root@atlantic ~]# kill -9 3341 [root@atlantic ~]# kill -9 2783
You have now simulated an environment in which a virtual machine has unexpectedly crashed and is inaccessible to users. - On the Virtual Machines tab in the administration portal, you can see that
RHEL6RioGrande's status isPowering Up. Because it was marked as highly available, it instantly restarts when it experiences a crash.In contrast, the status ofRHEL6CongoremainsDownbecause it was not marked as highly available. It remains turned off until it is manually restarted.
This demonstrates that if the virtual machine process is interrupted - whether due to user error, insufficient memory on hosts or other issues - highly available virtual machines will be restarted, while non-highly available ones require manual input. Therefore, if your environment has machines which must be accessible at all times, it is good practice to configure them as highly available, so they will automatically restart if they experience unexpected interruptions.

