Question

Get virtual machine UUID based on VM name

  • 24 January 2019
  • 2 replies
  • 9060 views

Is there any API to get VM UUID given VM name or any work around to get that?

Is it possible to delete a VM given only VM name with API?

Thanks in advance.

Regards,
Pawan

2 replies

Userlevel 3
Badge +12
@Pawan_sahu you need VM UUID to delete the VM. You can list all the vms or search by vm name using API. Are you looking to use this in Calm blueprint?
Userlevel 4
Badge +19
@Pawan_sahu
There is no direct way to do that now. However you can use powershell or REST APIs and achieve this.

You can refer below.

https://github.com/sandeepmp/nutanix/blob/master/delete-vm

Reply