STARTING A NODE IN A CLUSTER (AHV) AND POWER OPERATIONS ON VMs

  • 27 July 2020
  • 1 reply
  • 153 views

Badge

STARTING A NODE IN A CLUSTER (AHV)

 

Basic workflow on how to start an AHV node- 

 

  1. Log on to AHV host with SSH.

  2. Find the name of Controller VM (cvm)

  3. Determine if CVM is running.

  4. If the CVM is shut off, start it.

  5. If the node is in maintenance mode, Log on to the CVM of this host and take the node out of the maintenance mode.

  6. Log on to another CVM of this cluster with SSH and check if all services are up on all the CVMs.


 

For the commands and outputs of the above steps, please refer to the AHV Portal Guide:

 

https://portal.nutanix.com/page/documents/details?targetId=AHV-Admin-Guide-v5_17:ahv-node-start-ahv-t.html

 

PERFORMING POWER OPERATIONS ON VMS


 

You can initiate safe and graceful power operations such as soft shutdown and restart of the VMs running on the AHV hosts by using the aCLI. The soft shutdown and restart operations are initiated and performed by Nutanix Guest Tools (NGT) within the VM thereby ensuring a safe and graceful shutdown or restart of the VM.

 

Before you begin

Ensure that you have met the following prerequisites before you initiate the power operations:

  1. NGT is enabled on the VM. All operating systems that NGT supports are supported for this feature.

  2. NGT version running on the Controller VM and user VM is the one supported from AOS 5.6 or later.

  3. NGT version running on the Controller VM and user VM is the same.

  4. (Optional) If you want to run a pre-shutdown script, place the script in the following locations depending on your VMs:

    • Windows VMs: installed_dir\scripts\power_off.batNote that the file name of the script must be power_off.bat.

    • Linux VMs: installed_dir/scripts/power_offNote that the file name of the script must be power_off.

Perform the following steps to initiate the power operations:

Procedure

  1. Log on to a Controller VM with SSH.

  2. Access the Acropolis command line.nutanix@cvm$ acli

  3. <acropolis>
     

  4. Do one of the following:

    • Soft shut down the VM.<acropolis> vm.guest_shutdown vm_name enable_script_exec=[true or false] fail_on_script_failure=[true or false]
      Replace vm_name with the name of the VM.

    • Restart the VM.<acropolis> vm.guest_reboot vm_name enable_script_exec=[true or false] fail_on_script_failure=[true or false]
      Replace vm_name with the name of the VM.

  5. Set the value of enable_script_exec to true to run your pre-shutdown script and set the value of fail_on_script_failure to true to abort the power operation if the pre-shutdown script fails.

 

Portal Documentation reference:

https://portal.nutanix.com/page/documents/details?targetId=AHV-Admin-Guide-v5_17:ahv-power-operations-vms-t.html


1 reply

Userlevel 3
Badge +17

Basic workflow on how to start an AHV node- 

 

  1. Log on to AHV host with SSH.

  2. Find the name of Controller VM (cvm)

  3. Determine if CVM is running.

  4. If the CVM is shut off, start it.

  5. If the node is in maintenance mode, Log on to the CVM of this host and take the node out of the maintenance mode.

  6. Log on to another CVM of this cluster with SSH and check if all services are up on all the CVMs.

 

In the step 5, if the node is in maintenance mode, its CVM will be also in the maintenance state(?!) and will not able to contact the service serving for the NCLI command.

So, I think there is no way but login to other CVM and run the command to take the node out of maintenance mode.

Reply