Get virtual machine UUID based on VM name | Nutanix Community
Skip to main content
Solved

Get virtual machine UUID based on VM name

  • January 24, 2019
  • 2 replies
  • 3598 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

Best answer by sandeepmp

@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
View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

2 replies

Forum|alt.badge.img+13
  • Nutanix Employee
  • 44 replies
  • January 26, 2019
@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?

sandeepmp
Nutanix Employee
Forum|alt.badge.img+19
  • Nutanix Employee
  • 64 replies
  • Answer
  • February 3, 2019
@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