Solved

How to Implement API Post data to clone a VM

  • 23 January 2021
  • 3 replies
  • 643 views

Badge +1

Hi,

For my user, i want to create a web page where i can implement API Post data to clone a vm via clicking on a button .User just have to enter his credentials, vm uuid to be cloned is already decided by web developer inserted in web page already.

Is there any way to implement API data in web page where on clicking html button ,post data will be sent to server

OR

Is there any Powersehll cmdlet script to create vm and launch console.?

icon

Best answer by AnishWalia20 25 January 2021, 07:56

View original

This topic has been closed for comments

3 replies

Userlevel 6
Badge +5

Hey, @Balram check this post out for more details :
https://next.nutanix.com/server-virtualization-27/vm-creation-automation-37960

 

 

You can check out the Powershell commands under Acropolis Task administration(2nd column in the above screenshot) to Clone, create a new VM, add vDisk to it, add VMNIC to it etc.

 

There is also a REST API v2 POST method to /clone a VM: https://www.nutanix.dev/reference/prism_element/v2/api/vms/post-vms-uuid-clone-clonevm/

 

I hope this helps.:smile:

Badge +1

 I have tried REST API via curl and swagger.js. Can i implement REST API Post data in web page button eg- In a form, user enter username and password ,vm uuid predefined, on submit button, vm will cloned via sending POST API data prism server.

Userlevel 6
Badge +5

Hey @Balram , I personally have never tried it, but I think it should work. Give it a try and do let us know. :sweat_smile: