Powering on specific VMs with python | Nutanix Community
Skip to main content

Hey everyone, I’m new to scripting with APIs so forgive such a novice question. 

I’m trying to create a script for powering on specific VMs in my AHV cluster. But the Restful API explorer isn’t that helpful at explaining what I need to create my script and the only thing that has come close are powershell scripts. (https://next.nutanix.com/how-it-works-22/script-to-power-on-vm-33106)

 

(The Question)

How would I go about creating this? I already have the UUID’s of my VMs.

hey @mathurin1 you can also use aCLI command line tool to achieve the same. You will need to run the aCLI commands to power on specific VMs from the CVM on the cluster.

 

You can have a look at this post : https://next.nutanix.com/how-it-works-22/manage-multiple-uvms-at-once-using-custom-acli-scripts-on-a-nutanix-cluster-37896 which mentions similar scenarios to power-on/ power-off specific VMs using aCLI.

 

I hope this helps. :sweat_smile:


Hey @AnishWalia20, yeah this will work. Thanks!


Glad you found it useful @mathurin1 . Let me know if you need anything else on this.

Wish you a very happy new year 2021 in advance. 


Reply