Create VM
Creates a virtual machine. if you do not have all of the privileges described as follows: - The resource Folder referenced by the attribute VM.InventoryPlacementSpec.folder requires VirtualMachine.Inventory.Create. - The resource ResourcePool referenced by the attribute VM.ComputePlacementSpec.resource-pool requires Resource.AssignVMToPool. - The resource Datastore referenced by the attribute VM.StoragePlacementSpec.datastore requires Datastore.AllocateSpace. - The resource Network referenced by the attribute Ethernet.BackingSpec.network requires Network.Assign.
Request
URLURL
Header Parameters
Header Parameters
Request Body
Virtual machine specification. Document-based creation spec.
{
"guest_OS": "enum",
"placement": {
"datastore": "string",
"folder": "string"
}
}
Guest OS.
Possible values are: DOS , WIN_31 , WIN_95 , WIN_98 , WIN_ME , more...
Virtual machine placement information. This field is currently required. In the future, if this field is unset, the system will attempt to choose suitable resources on which to place the virtual machine.
Boot configuration. If unset, guest-specific default values will be used.
CPU configuration. If unset, guest-specific default values will be used.
List of disks. If unset, a single blank virtual disk of a guest-specific size will be created on the same storage as the virtual machine configuration, and will use a guest-specific host bus adapter type. If the guest-specific size is 0, no virtual disk will be created.
List of floppy drives. If unset, no floppy drives will be created.
List of CD-ROMs. If unset, no CD-ROM devices will be created.
Virtual hardware version. If unset, defaults to the most recent version supported by the server.
Possible values are: VMX_03 , VMX_04 , VMX_06 , VMX_07 , VMX_08 , more...
Memory configuration. If unset, guest-specific default values will be used.
Virtual machine name. If unset, a default name will be generated by the server.
List of Ethernet adapters. If unset, no Ethernet adapters will be created.
List of parallel ports. If unset, no parallel ports will be created.
Boot device configuration. If unset, a server-specific boot sequence will be used.
List of SATA adapters. If unset, any adapters necessary to connect the virtual machine’s storage devices will be created; this includes any devices that explicitly specify a SATA host bus adapter, as well as any devices that do not specify a host bus adapter if the guest’s preferred adapter type is SATA.
List of SCSI adapters. If unset, any adapters necessary to connect the virtual machine’s storage devices will be created; this includes any devices that explicitly specify a SCSI host bus adapter, as well as any devices that do not specify a host bus adapter if the guest’s preferred adapter type is SCSI. The type of the SCSI adapter will be a guest-specific default type.
List of serial ports. If unset, no serial ports will be created.
The VM.StoragePolicySpec structure contains information about the storage policy that is to be associated with the virtual machine home (which contains the configuration and log files). If unset the datastore default storage policy (if applicable) is applied. Currently a default storage policy is only supported by object datastores : VVol and vSAN. For non-object datastores, if unset then no storage policy would be associated with the virtual machine home.
Response
Response BodyResponse Body
ID of newly-created virtual machine. The result will be an identifier for the resource type: VirtualMachine.