Showing posts with label nutanix. Show all posts
Showing posts with label nutanix. Show all posts

Friday, February 28, 2025

Nutanix : Restart / Shutdown Cluster for Maintenance

Shutting Down an AHV Cluster for Maintenance

1. Shutdown all the user VMs in the Nutanix cluster.

2. Stop the Nutanix cluster. 

a. Stopping the Nutanix Cluster

  • Log on to any Controller VM using SSH with the Nutanix credentials and run the following command to stop the Nutanix cluster: #cluster stop
  • Confirm using that the command has stopped the services successfully before continuing : #cluster status

b. Shutting down the Controller VMs

  • #cvm_shutdown –P now

3. Shut down each node in the cluster.

  • Physically power off each AHV host or login to IPMI and manual power off the AHV


Powering on the nodes and cluster after a shutdown 


1. Physically power on each AHV host OR login to IPMI and manual power on the AHV

2. Start the cluster 

All Controller VMs start automatically after the node powers on. Wait approximately 5 minutes after the last node is powered on to allow services to begin.

  • Log on to any one Controller VM in the cluster with SSH using Nutanix credentials.
  • Start the Nutanix cluster by issuing the following command: #cluster start
  • Confirm that the cluster services are running: #cluster status

3. Power on the guest VMs.

Thursday, February 27, 2025

Nutanix : Reset Prism stuck/incomplete task

1. SSH to Cluster of CVM IP

2. Enter the following to list running/failed tasks

#ecli task.list include_completed=false

3. Enter the following to cancel required task

#ergon_update_task --task_uuid='ENTER_TASK_UUID_HERE' --task_status=succeeded

4. Enter “Y” – Remember you do so at you own risk

5. Enter the following to confirm task have been completed/failed

#ecli task.list include_completed=false 

Friday, October 18, 2019

Windows : Reset Administrator Password Windows 2012 R2 on Nutanix

Solution:

1. Load the Nutanix driver into VM (source : https://next.nutanix.com/prism-infrastructure-management-26/booting-vm-to-cd-no-drives-present-31800)
  • Mount Windows setup ISO as the first CD/DVD.
  • Mount NutanixVirtIO as the second CD/DVD.
  • Once it loads into the Windows Server 2012 setup, select the language/keyboard and press Next.
  • It will give you the option to repair or install. Press on "Install". (Once again, it doesn't make sense right now, but continue with these steps. We actually won't be installing Windows, but need to navigate that way for a specific step)
  • It'll say "Setup is starting" and then give you the option to select the OS. Select the OS that is currently installed already that you want to repair and press "Next".
  • Accept the terms and conditions and press next.
  • Now this is the step that is important. You can see right now that the hard drives are not being recognized. We will use this step to load the drivers, for us to be able to go into the repair mode.
  • Click on Load Driver and you will get a popup. 
  • Navigate to the Windows Server 2012 R2 folder in NutanixVirtIO drive, and then select AMD64 subfolder if original OS is 64 bit, or x86 if 32bit OS (this step is written off the top of my head).
  • It will now give you few drivers. You can select the SCSI driver and press Next. (If you also want network drivers, you can press "Load Driver" again, and follow the steps, but select the Network Driver) and press the "Next". The popup will close and now you should see the drives are being recognized.
  • At this point, you will hit the "X" button on top right and it will ask you to cancel the installation. You allow it.
  • It will now take you back to the main page where it will ask you if you want to install Windows or repair. You will click on "Repair Your Computer".
  • You can now open up Command Prompt, and it will recognize the drives. 
2. Step to reset the password (source: http://www.kieranlane.com/2013/09/18/resetting-administrator-password-windows-2012/)
  • Select “Repair your computer”
  • Under Choose and option, click on “Troubleshoot”.
  • Under Advanced options, click “Command Prompt”.
  • At the command prompt, run the following commands:
    d: (check the drive mount the current installed windows)
    cd windows\system32
    ren Utilman.exe Utilman.exe.old
    copy cmd.exe Utilman.exe
  • Close the command prompt and then click “Continue”.
  • The server should now boot and present the logon screen. Here click Windows Key + U.
  • At the prompt you can now change the password, by typing the following command:
    net user administrator Password123
    This will set the password for the Administrator user to be Password123 (case sensitive).
  • Closing the command prompt, you should now be able to log back onto the server using the password you have provided in the last step.

Tuesday, July 9, 2019

Nutanix : Create, Cloning and Detele used acli

AHV is very powerful from a scripting interface the so called acli. The flowing section is providing some basic scripts/commands that can be used in the acli interface.
  • Creating a VM using a script
  • Cloning a VM using a script
  • Delete a VM using a script

1. Create VM
  • acli vm.create testVM memory=1024M num_vcpus=1;
  • acli vm.disk_create testVM create_size=30G container=SelfServiceContainer
  • acli vm.on testVM2 - On the VM
  • acli vm.off testVM2- Off the VM
2. Cloning VM
  • acli vm.clone testVM3 clone_from_vm=testVM
3. Delete VM
  •  acli vm.delete testVM3

Source: https://ce-ahvworkshop.readthedocs.io/en/latest/VM_Script/vm_script.html