Virtual Machine Mark As Virtual Machine
Clears the 'isTemplate' flag and reassociates the virtual machine with a resource pool and host.
Required privileges: VirtualMachine.Provisioning.MarkAsVM
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case VirtualMachine/{moId}
.
The vSphere release schema. The current specification covers vSphere 9.0.0.0 APIs.
"MarkAsVirtualMachineRequestType Object"
Resource pool to associate with the virtual machine.
Required privileges: Resource.AssignVMToPool
The target host on which the virtual machine is intended to run. The host parameter must specify a host that is a member of the ComputeResource indirectly specified by the pool. For a stand-alone host or a cluster with DRS, it can be omitted and the system selects a default.
No Content
NotSupported: if marking a template as a virtual machine is not supported.
InvalidState: if the virtual machine is not marked as a template.
InvalidDatastore: if the operation cannot be performed on the target datastores.
VmConfigFault: if the virtual machine is not compatible with the host. For example, a DisksNotSupported fault if the destination host does not support the disk backings of the template.
FileFault: if there is an error accessing the virtual machine files.
"VimFault Object"
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/VirtualMachine/{moId}/MarkAsVirtualMachine