Instant Clone VM
Create an instant clone of an existing virtual machine. if you do not have all of the privileges described as follows: - The resource VirtualMachine referenced by the attribute VM.InstantCloneSpec.source requires VirtualMachine.Provisioning.Clone and VirtualMachine.Inventory.CreateFromExisting. - The resource Folder referenced by the attribute VM.InstantClonePlacementSpec.folder requires VirtualMachine.Interact.PowerOn. - The resource ResourcePool referenced by the attribute VM.InstantClonePlacementSpec.resource-pool requires Resource.AssignVMToPool. - The resource Datastore referenced by the attribute VM.InstantClonePlacementSpec.datastore requires Datastore.AllocateSpace. - The resource Network referenced by the attribute Ethernet.BackingSpec.network requires Network.Assign.
Request
URLURL
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
{
"name": "string",
"source": "string"
}
Virtual machine to InstantClone from. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: VirtualMachine. When operations return a value of this structure as a result, the field will be an identifier for the resource type: VirtualMachine.
Name of the new virtual machine.
128-bit SMBIOS UUID of a virtual machine represented as a hexadecimal string in “12345678-abcd-1234-cdef-123456789abc” format. If unset, will be generated.
Map of NICs to update. If unset, no NICs will be updated. When clients pass a value of this structure as a parameter, the key in the field map must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Ethernet. When operations return a value of this structure as a result, the key in the field map will be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Ethernet.
Map of parallel ports to Update. If unset, no parallel ports will be updated. When clients pass a value of this structure as a parameter, the key in the field map must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.ParallelPort. When operations return a value of this structure as a result, the key in the field map will be an identifier for the resource type: com.vmware.vcenter.vm.hardware.ParallelPort.
Virtual machine placement information. If this field is unset, the system will use the values from the source virtual machine. If specified, each field will be used for placement. If the fields result in disjoint placement the operation will fail. If the fields along with the placement values of the source virtual machine result in disjoint placement the operation will fail.
Map of serial ports to Update. If unset, no serial ports will be updated. When clients pass a value of this structure as a parameter, the key in the field map must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.SerialPort. When operations return a value of this structure as a result, the key in the field map will be an identifier for the resource type: com.vmware.vcenter.vm.hardware.SerialPort.
Indicates whether all NICs on the destination virtual machine should be disconnected from the newtwork If unset, connection status of all NICs on the destination virtual machine will be the same as on the source virtual machine.
Authentication
Response
Response BodyResponse Body
ID of newly-created virtual machine. The result will be an identifier for the resource type: VirtualMachine.
Errors
com.vmware.vapi.std.errors.already_exists : if a virtual machine with the specified name already exists. | com.vmware.vapi.std.errors.invalid_argument : if any of the specified parameters are invalid.
com.vmware.vapi.std.errors.unauthorized : if the user doesn’t have the required privileges.
com.vmware.vapi.std.errors.not_found : if any of the resources specified in spec could not be found
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request. | com.vmware.vapi.std.errors.resource_inaccessible : if a specified resource (eg. host) is not accessible. | com.vmware.vapi.std.errors.unable_to_allocate_resource : if any of the resources needed to create an instant clone could not be allocated.
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
PowerCLI Client SDK All Parameters Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: post
x-vmw-doc-deprecated-path: /rest/vcenter/vm?action=instant-clone
x-vmw-doc-operation: instant_clone