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

  1. To simulate a virtual machine crash, we will terminate the virtual machine's process from within its host. In this example, we use the Atlantic host, and we provide instructions for remotely accessing both hypervisor hosts and Linux hosts.
      1. 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 Security tab and select the Enable ssh password authentication check box. Enter your password in the listed fields, and then click Apply.
        Enable SSH on hypervisor

        Figure 6.10. Enable SSH on hypervisor

        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.
      2. Open a terminal and run:
        # ssh admin@atlantic.demo.redhat.com
        
      3. Accept the authentication key and enter the password for the hypervisor. When you are logged in to the management console, press the F2 key and select Drop to Shell. You can now execute commands as the root user.
        Access hypervisor shell

        Figure 6.11. Access hypervisor shell

      1. 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:
      2. Accept the authentication key and enter the password for the host.
  2. When you have established a remote connection to your host, use the vdsClient utility 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
    
  3. Send the termination signal to two virtual machines - one which is highly available, and one which is not highly available. This example uses RHEL6RioGrande and RHEL6Congo.
    [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.
  4. On the Virtual Machines tab in the administration portal, you can see that RHEL6RioGrande's status is Powering Up. Because it was marked as highly available, it instantly restarts when it experiences a crash.
    In contrast, the status of RHEL6Congo remains Down because 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.