Virtual Machine Reconfig VM Task
Reconfigures this virtual machine.
All the changes in the given configuration are applied to the virtual machine as an atomic operation.
Reconfiguring the virtual machine may require any of the following privileges depending on what is being changed:
- VirtualMachine.Interact.DeviceConnection if changing the runtime connection state of a device as embodied by the Connectable property.
- VirtualMachine.Interact.SetCDMedia if changing the backing of a CD-ROM device
- VirtualMachine.Interact.SetFloppyMedia if changing the backing of a floppy device
- VirtualMachine.Config.Rename if renaming the virtual machine
- VirtualMachine.Config.Annotation if setting annotation a value
- VirtualMachine.Config.AddExistingDisk if adding a virtual disk device that is backed by an existing virtual disk file
- VirtualMachine.Config.AddNewDisk if adding a virtual disk device for which the backing virtual disk file is to be created
- VirtualMachine.Config.RemoveDisk if removing a virtual disk device that refers to a virtual disk file
- VirtualMachine.Config.CPUCount if changing the number of CPUs
- VirtualMachine.Config.Memory if changing the amount of memory
- VirtualMachine.Config.RawDevice if adding, removing or editing a raw device mapping (RDM) or SCSI passthrough device
- VirtualMachine.Config.AddRemoveDevice if adding or removing any device other than disk, raw, or USB device
- VirtualMachine.Config.EditDevice if changing the settings of any device
- VirtualMachine.Config.Settings if changing any basic settings such as those in ToolsConfigInfo, FlagInfo, or DefaultPowerOpInfo
- VirtualMachine.Config.Resource if changing resource allocations, affinities, or setting network traffic shaping or virtual disk shares
- VirtualMachine.Config.AdvancedConfig if changing values in extraConfig
- VirtualMachine.Config.SwapPlacement if changing swapPlacement
- VirtualMachine.Config.HostUSBDevice if adding, removing or editing a VirtualUSB device backed by the host USB device.
- VirtualMachine.Config.DiskExtend if extending an existing VirtualDisk device.
- VirtualMachine.Config.ChangeTracking if enabling/disabling changed block tracking for the virtual machine's disks.
- VirtualMachine.Config.MksControl if toggling display connection limits or the guest auto-lock feature.
- DVSwitch.CanUse if connecting a VirtualEthernetAdapter to a port in a DistributedVirtualSwitch.
- DVPortgroup.CanUse if connecting a VirtualEthernetAdapter to a DistributedVirtualPortgroup.
- Cryptographer.Encrypt if vm home folder is encrypted or existing disk is encryted.
- Cryptographer.Decrypt if vm home folder is decrypted or existing disk is decryted.
- Cryptographer.Recrypt if vm home folder is recrypted or existing disk is recryted.
- Cryptographer.AddDisk if encrypted disk is attached to the vm.
- Cryptographer.RegisterHost on the host if the virtual machine is encrypted, but encryption is not enabled on the host.
Creating a virtual machine may require the following privileges:
- VirtualMachine.Config.RawDevice if adding a raw device
- VirtualMachine.Config.AddExistingDisk if adding a VirtualDisk and the fileOperation is unset
- VirtualMachine.Config.AddNewDisk if adding a VirtualDisk and the fileOperation is set
- VirtualMachine.Config.HostUSBDevice if adding a VirtualUSB device backed by the host USB device.
In addition, this operation may require the following privileges:
- Datastore.AllocateSpace on any datastore where virtual disks will be created or extended.
- Network.Assign on any network the virtual machine will be connected to.
To create a VirtualDisk on a persistent memory storage, the storage must be specified via profile while the datastore property of corresponding VirtualDisk backing must be unset.
To create a VirtualNVDIMM device, the storage profile must be set to the default persistent memory storage profile while the datastore property of the device backing must be unset.
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 8.0.2.0 APIs.
{
"spec": {
"_typeName": "string",
"changeVersion": "string",
"name": "string",
"version": "string",
"createDate": "string",
"uuid": "string",
"instanceUuid": "string",
"npivNodeWorldWideName": [
0
],
"npivPortWorldWideName": [
0
],
"npivWorldWideNameType": "string",
"npivDesiredNodeWwns": 0,
"npivDesiredPortWwns": 0,
"npivTemporaryDisabled": false,
"npivOnNonRdmDisks": false,
"npivWorldWideNameOp": "string",
"locationId": "string",
"guestId": "string",
"alternateGuestName": "string",
"annotation": "string",
"files": {
"_typeName": "string",
"vmPathName": "string",
"snapshotDirectory": "string",
"suspendDirectory": "string",
"logDirectory": "string",
"ftMetadataDirectory": "string"
},
"tools": {
"_typeName": "string",
"toolsVersion": 0,
"toolsInstallType": "string",
"afterPowerOn": false,
"afterResume": false,
"beforeGuestStandby": false,
"beforeGuestShutdown": false,
"beforeGuestReboot": false,
"toolsUpgradePolicy": "string",
"pendingCustomization": "string",
"customizationKeyId": {
"_typeName": "string",
"keyId": "string",
"providerId": {
"_typeName": "string",
"id": "string"
}
},
"syncTimeWithHostAllowed": false,
"syncTimeWithHost": false,
"lastInstallInfo": {
"_typeName": "string",
"counter": 0,
"fault": {
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}
}
},
"flags": {
"_typeName": "string",
"disableAcceleration": false,
"enableLogging": false,
"useToe": false,
"runWithDebugInfo": false,
"monitorType": "string",
"htSharing": "string",
"snapshotDisabled": false,
"snapshotLocked": false,
"diskUuidEnabled": false,
"virtualMmuUsage": "string",
"virtualExecUsage": "string",
"snapshotPowerOffBehavior": "string",
"recordReplayEnabled": false,
"faultToleranceType": "string",
"cbrcCacheEnabled": false,
"vvtdEnabled": false,
"vbsEnabled": false
},
"consolePreferences": {
"_typeName": "string",
"powerOnWhenOpened": false,
"enterFullScreenOnPowerOn": false,
"closeOnPowerOffOrSuspend": false
},
"powerOpInfo": {
"_typeName": "string",
"powerOffType": "string",
"suspendType": "string",
"resetType": "string",
"defaultPowerOffType": "string",
"defaultSuspendType": "string",
"defaultResetType": "string",
"standbyAction": "string"
},
"rebootPowerOff": false,
"numCPUs": 0,
"vcpuConfig": [
{
"_typeName": "string",
"latencySensitivity": {
"_typeName": "string",
"level": "string",
"sensitivity": 0
}
}
],
"numCoresPerSocket": 0,
"memoryMB": 0,
"memoryHotAddEnabled": false,
"cpuHotAddEnabled": false,
"cpuHotRemoveEnabled": false,
"virtualICH7MPresent": false,
"virtualSMCPresent": false,
"deviceChange": [
{
"_typeName": "string",
"operation": "string",
"fileOperation": "string",
"device": {
"_typeName": "string",
"key": 0,
"deviceInfo": {
"_typeName": "string",
"label": "string",
"summary": "string"
},
"backing": {
"_typeName": "string"
},
"connectable": {
"_typeName": "string",
"migrateConnect": "string",
"startConnected": false,
"allowGuestControl": false,
"connected": false,
"status": "string"
},
"slotInfo": {
"_typeName": "string"
},
"controllerKey": 0,
"unitNumber": 0,
"numaNode": 0,
"deviceGroupInfo": {
"_typeName": "string",
"groupInstanceKey": 0,
"sequenceId": 0
}
},
"profile": [
{
"_typeName": "string"
}
],
"backing": {
"_typeName": "string",
"parent": "VirtualDeviceConfigSpecBackingSpec Object",
"crypto": {
"_typeName": "string"
}
},
"filterSpec": [
{
"_typeName": "string"
}
],
"changeMode": "string"
}
],
"cpuAllocation": {
"_typeName": "string",
"reservation": 0,
"expandableReservation": false,
"limit": 0,
"shares": {
"_typeName": "string",
"shares": 0,
"level": "string"
},
"overheadLimit": 0
},
"memoryAllocation": {
"_typeName": "string",
"reservation": 0,
"expandableReservation": false,
"limit": 0,
"shares": {
"_typeName": "string",
"shares": 0,
"level": "string"
},
"overheadLimit": 0
},
"latencySensitivity": {
"_typeName": "string",
"level": "string",
"sensitivity": 0
},
"cpuAffinity": {
"_typeName": "string",
"affinitySet": [
0
]
},
"memoryAffinity": {
"_typeName": "string",
"affinitySet": [
0
]
},
"networkShaper": {
"_typeName": "string",
"enabled": false,
"peakBps": 0,
"averageBps": 0,
"burstSize": 0
},
"cpuFeatureMask": [
{
"_typeName": "string",
"operation": "string",
"removeKey": {
"_typeName": "string"
},
"info": {
"_typeName": "string",
"level": 0,
"vendor": "string",
"eax": "string",
"ebx": "string",
"ecx": "string",
"edx": "string"
}
}
],
"extraConfig": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"swapPlacement": "string",
"bootOptions": {
"_typeName": "string",
"bootDelay": 0,
"enterBIOSSetup": false,
"efiSecureBootEnabled": false,
"bootRetryEnabled": false,
"bootRetryDelay": 0,
"bootOrder": [
{
"_typeName": "string"
}
],
"networkBootProtocol": "string"
},
"vAppConfig": {
"_typeName": "string",
"product": [
{
"_typeName": "string",
"operation": "string",
"removeKey": {
"_typeName": "string"
},
"info": {
"_typeName": "string",
"key": 0,
"classId": "string",
"instanceId": "string",
"name": "string",
"vendor": "string",
"version": "string",
"fullVersion": "string",
"vendorUrl": "string",
"productUrl": "string",
"appUrl": "string"
}
}
],
"property": [
{
"_typeName": "string",
"operation": "string",
"removeKey": {
"_typeName": "string"
},
"info": {
"_typeName": "string",
"key": 0,
"classId": "string",
"instanceId": "string",
"id": "string",
"category": "string",
"label": "string",
"type": "string",
"typeReference": "string",
"userConfigurable": false,
"defaultValue": "string",
"value": "string",
"description": "string"
}
}
],
"ipAssignment": {
"_typeName": "string",
"supportedAllocationScheme": [
"string"
],
"ipAllocationPolicy": "string",
"supportedIpProtocol": [
"string"
],
"ipProtocol": "string"
},
"eula": [
"string"
],
"ovfSection": [
{
"_typeName": "string",
"operation": "string",
"removeKey": {
"_typeName": "string"
},
"info": {
"_typeName": "string",
"key": 0,
"namespace": "string",
"type": "string",
"atEnvelopeLevel": false,
"contents": "string"
}
}
],
"ovfEnvironmentTransport": [
"string"
],
"installBootRequired": false,
"installBootStopDelay": 0
},
"ftInfo": {
"_typeName": "string",
"role": 0,
"instanceUuids": [
"string"
],
"configPaths": [
"string"
],
"orphaned": false
},
"repConfig": {
"_typeName": "string",
"generation": 0,
"vmReplicationId": "string",
"destination": "string",
"port": 0,
"rpo": 0,
"quiesceGuestEnabled": false,
"paused": false,
"oppUpdatesEnabled": false,
"netCompressionEnabled": false,
"netEncryptionEnabled": false,
"encryptionDestination": "string",
"encryptionPort": 0,
"remoteCertificateThumbprint": "string",
"dataSetsReplicationEnabled": false,
"disk": [
{
"_typeName": "string",
"key": 0,
"diskReplicationId": "string"
}
]
},
"vAppConfigRemoved": false,
"vAssertsEnabled": false,
"changeTrackingEnabled": false,
"firmware": "string",
"maxMksConnections": 0,
"guestAutoLockEnabled": false,
"managedBy": {
"_typeName": "string",
"extensionKey": "string",
"type": "string"
},
"memoryReservationLockedToMax": false,
"nestedHVEnabled": false,
"vPMCEnabled": false,
"scheduledHardwareUpgradeInfo": {
"_typeName": "string",
"upgradePolicy": "string",
"versionKey": "string",
"scheduledHardwareUpgradeStatus": "string",
"fault": {
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}
},
"vmProfile": [
{
"_typeName": "string"
}
],
"messageBusTunnelEnabled": false,
"crypto": {
"_typeName": "string"
},
"migrateEncryption": "string",
"sgxInfo": {
"_typeName": "string",
"epcSize": 0,
"flcMode": "string",
"lePubKeyHash": "string",
"requireAttestation": false
},
"ftEncryptionMode": "string",
"guestMonitoringModeInfo": {
"_typeName": "string",
"gmmFile": "string",
"gmmAppliance": "string"
},
"sevEnabled": false,
"virtualNuma": {
"_typeName": "string",
"coresPerNumaNode": 0,
"exposeVnumaOnCpuHotadd": false
},
"motherboardLayout": "string",
"pmemFailoverEnabled": false,
"vmxStatsCollectionEnabled": false,
"vmOpNotificationToAppEnabled": false,
"vmOpNotificationTimeout": 0,
"deviceSwap": {
"_typeName": "string",
"lsiToPvscsi": {
"_typeName": "string",
"enabled": false,
"applicable": false,
"status": "string"
}
},
"simultaneousThreads": 0,
"pmem": {
"_typeName": "string",
"snapshotMode": "string"
},
"deviceGroups": {
"_typeName": "string",
"deviceGroup": [
{
"_typeName": "string",
"groupInstanceKey": 0,
"deviceInfo": {
"_typeName": "string",
"label": "string",
"summary": "string"
}
}
]
},
"fixedPassthruHotPlugEnabled": false
}
}
This data object type encapsulates configuration settings when creating or reconfiguring a virtual machine.
To support incremental changes, these properties are all optional. If an optional property is unset, or any nested optional property is unset, the property will not be changed unless 'unset' is a valid value for the property. To determine whether 'unset' is a valid value for a particular property, refer to the documentation for that property.
This method returns a Task object with which to monitor the operation.
{
"_typeName": "string",
"type": "string",
"value": "string"
}
InvalidPowerState: if the power state is poweredOn and the virtual hardware cannot support the configuration changes.
TaskInProgress: if the virtual machine is busy.
TooManyDevices: if the device specifications exceed the allowed limits.
ConcurrentAccess: if the changeVersion does not match the server's changeVersion for the configuration.
FileFault: if there is a problem creating or accessing the virtual machine's files for this operation. Typically a more specific fault like NoDiskSpace or FileAlreadyExists is thrown.
InvalidName: if the specified name is invalid.
DuplicateName: if the specified name already exists in the parent folder.
InvalidState: if the operation cannot be performed in the current state of the virtual machine. For example, because the virtual machine's configuration is not available.
InsufficientResourcesFault: if this operation would violate a resource usage policy.
VmConfigFault: if the spec is invalid. Typically, a more specific subclass is thrown.
CpuHotPlugNotSupported: if the current configuration of the VM does not support hot-plugging of CPUs.
MemoryHotPlugNotSupported: if the current configuration of the VM does not support hot-plugging of memory.
VmWwnConflict: if the WWN of the virtual machine has been used by other virtual machines.
NoPermission: if crypto operation is requested on the vm home folder, but the user does not have the corresponding crypto privilege on the virtual machine: Encrypt - Cryptographer.Encrypt Decrypt - Cryptographer.Decrypt Recrypt - Cryptographer.Recrypt
NoPermission: if crypto operation is requested on the vms disks, but the user does not have the corresponding crypto privilege on the virtual machine: Encrypt - Cryptographer.Encrypt Decrypt - Cryptographer.Decrypt Recrypt - Cryptographer.Recrypt AddDisk - Cryptographer.AddDisk
NoPermission: if the virtual machine is encrypted and the encryption is not enabled on the host, but the user does not have Cryptographer.RegisterHost privilege on the host.
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}