restvsphere

How can I make a copy of a disk in a Datastore with the vSphere REST API?


Using the vSphere REST API, I would like to make a copy of a vmdk into a new file so that I can create a new disk with this copied vmdk as it's backing. How could this be achieved with the vSphere REST API that was introduced in 6.5?


Solution

  • Unfortunately, that functionality is not yet available in the vSphere Automation REST APIs.

    Currently you can only list the VM's disks, get information about a specific disk for a VM, reconfigure which VMDK a VM is using, add a new VMDK, and delete a VMDK.