Virtual Machine Reconfig VM Task

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.

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/VirtualMachine/{moId}/ReconfigVM_Task
COPY
Path Parameters
string
moId
Required

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}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.


Request Body
ReconfigVMRequestType of type(s) application/json
Required
{
    "spec": {
        "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": {
            "vmPathName": "string",
            "snapshotDirectory": "string",
            "suspendDirectory": "string",
            "logDirectory": "string",
            "ftMetadataDirectory": "string"
        },
        "tools": {
            "toolsVersion": 0,
            "toolsInstallType": "string",
            "afterPowerOn": false,
            "afterResume": false,
            "beforeGuestStandby": false,
            "beforeGuestShutdown": false,
            "beforeGuestReboot": false,
            "toolsUpgradePolicy": "string",
            "pendingCustomization": "string",
            "customizationKeyId": {
                "keyId": "string",
                "providerId": {
                    "id": "string"
                }
            },
            "syncTimeWithHostAllowed": false,
            "syncTimeWithHost": false,
            "lastInstallInfo": {
                "counter": 0,
                "fault": {
                    "faultCause": "MethodFault Object",
                    "faultMessage": [
                        {
                            "_typeName": "string",
                            "key": "string",
                            "arg": [
                                {
                                    "_typeName": "string",
                                    "key": "string",
                                    "value": {
                                        "_typeName": "string"
                                    }
                                }
                            ],
                            "message": "string"
                        }
                    ]
                }
            }
        },
        "flags": {
            "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": {
            "powerOnWhenOpened": false,
            "enterFullScreenOnPowerOn": false,
            "closeOnPowerOffOrSuspend": false
        },
        "powerOpInfo": {
            "powerOffType": "string",
            "suspendType": "string",
            "resetType": "string",
            "defaultPowerOffType": "string",
            "defaultSuspendType": "string",
            "defaultResetType": "string",
            "standbyAction": "string"
        },
        "rebootPowerOff": false,
        "numCPUs": 0,
        "vcpuConfig": [
            {
                "_typeName": "string",
                "latencySensitivity": {
                    "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": {
                    "key": 0,
                    "deviceInfo": {
                        "label": "string",
                        "summary": "string"
                    },
                    "backing": {
                        "_typeName": "string"
                    },
                    "connectable": {
                        "migrateConnect": "string",
                        "startConnected": false,
                        "allowGuestControl": false,
                        "connected": false,
                        "status": "string"
                    },
                    "slotInfo": {
                        "_typeName": "string"
                    },
                    "controllerKey": 0,
                    "unitNumber": 0,
                    "numaNode": 0,
                    "deviceGroupInfo": {
                        "groupInstanceKey": 0,
                        "sequenceId": 0
                    }
                },
                "profile": [
                    {
                        "_typeName": "string"
                    }
                ],
                "backing": {
                    "parent": "VirtualDeviceConfigSpecBackingSpec Object",
                    "crypto": {
                        "_typeName": "string"
                    }
                },
                "filterSpec": [
                    {
                        "_typeName": "string"
                    }
                ],
                "changeMode": "string"
            }
        ],
        "cpuAllocation": {
            "reservation": 0,
            "expandableReservation": false,
            "limit": 0,
            "shares": {
                "shares": 0,
                "level": "string"
            },
            "overheadLimit": 0
        },
        "memoryAllocation": {
            "reservation": 0,
            "expandableReservation": false,
            "limit": 0,
            "shares": {
                "shares": 0,
                "level": "string"
            },
            "overheadLimit": 0
        },
        "latencySensitivity": {
            "level": "string",
            "sensitivity": 0
        },
        "cpuAffinity": {
            "affinitySet": [
                0
            ]
        },
        "memoryAffinity": {
            "affinitySet": [
                0
            ]
        },
        "networkShaper": {
            "enabled": false,
            "peakBps": 0,
            "averageBps": 0,
            "burstSize": 0
        },
        "cpuFeatureMask": [
            {
                "_typeName": "string",
                "operation": "string",
                "removeKey": {
                    "_typeName": "string"
                },
                "info": {
                    "level": 0,
                    "vendor": "string",
                    "eax": "string",
                    "ebx": "string",
                    "ecx": "string",
                    "edx": "string"
                }
            }
        ],
        "extraConfig": [
            {
                "_typeName": "string",
                "key": "string",
                "value": {
                    "_typeName": "string"
                }
            }
        ],
        "swapPlacement": "string",
        "bootOptions": {
            "bootDelay": 0,
            "enterBIOSSetup": false,
            "efiSecureBootEnabled": false,
            "bootRetryEnabled": false,
            "bootRetryDelay": 0,
            "bootOrder": [
                {
                    "_typeName": "string"
                }
            ],
            "networkBootProtocol": "string"
        },
        "vAppConfig": {
            "product": [
                {
                    "_typeName": "string",
                    "operation": "string",
                    "removeKey": {
                        "_typeName": "string"
                    },
                    "info": {
                        "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": {
                        "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": {
                "supportedAllocationScheme": [
                    "string"
                ],
                "ipAllocationPolicy": "string",
                "supportedIpProtocol": [
                    "string"
                ],
                "ipProtocol": "string"
            },
            "eula": [
                "string"
            ],
            "ovfSection": [
                {
                    "_typeName": "string",
                    "operation": "string",
                    "removeKey": {
                        "_typeName": "string"
                    },
                    "info": {
                        "key": 0,
                        "namespace": "string",
                        "type": "string",
                        "atEnvelopeLevel": false,
                        "contents": "string"
                    }
                }
            ],
            "ovfEnvironmentTransport": [
                "string"
            ],
            "installBootRequired": false,
            "installBootStopDelay": 0
        },
        "ftInfo": {
            "role": 0,
            "instanceUuids": [
                "string"
            ],
            "configPaths": [
                "string"
            ],
            "orphaned": false
        },
        "repConfig": {
            "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": {
            "extensionKey": "string",
            "type": "string"
        },
        "memoryReservationLockedToMax": false,
        "nestedHVEnabled": false,
        "vPMCEnabled": false,
        "scheduledHardwareUpgradeInfo": {
            "upgradePolicy": "string",
            "versionKey": "string",
            "scheduledHardwareUpgradeStatus": "string",
            "fault": {
                "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": {
            "epcSize": 0,
            "flcMode": "string",
            "lePubKeyHash": "string",
            "requireAttestation": false
        },
        "ftEncryptionMode": "string",
        "guestMonitoringModeInfo": {
            "gmmFile": "string",
            "gmmAppliance": "string"
        },
        "sevEnabled": false,
        "virtualNuma": {
            "coresPerNumaNode": 0,
            "exposeVnumaOnCpuHotadd": false
        },
        "motherboardLayout": "string",
        "pmemFailoverEnabled": false,
        "vmxStatsCollectionEnabled": false,
        "vmOpNotificationToAppEnabled": false,
        "vmOpNotificationTimeout": 0,
        "deviceSwap": {
            "lsiToPvscsi": {
                "enabled": false,
                "applicable": false,
                "status": "string"
            }
        },
        "simultaneousThreads": 0,
        "pmem": {
            "snapshotMode": "string"
        },
        "deviceGroups": {
            "deviceGroup": [
                {
                    "_typeName": "string",
                    "groupInstanceKey": 0,
                    "deviceInfo": {
                        "label": "string",
                        "summary": "string"
                    }
                }
            ]
        },
        "fixedPassthruHotPlugEnabled": false
    }
}
spec
Required

spec

Authentication
This operation uses the following authentication methods.
Responses
200

This method returns a Task object with which to monitor the operation.

Returns MoRefTask of type(s) application/json
This response body class contains all of the following: MoRefExtensibleManagedObject
{
    "_typeName": "string",
    "type": "string",
    "value": "string"
}

500

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.

Returns VimFault of type(s) application/json
This response body class contains all of the following: MethodFault
{
    "_typeName": "string",
    "faultCause": "MethodFault Object",
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ]
}

Virtual Machine Operations
POST
Virtual Machine Acquire Mks Ticket
POST
Virtual Machine Acquire Ticket
POST
Virtual Machine Answer VM
POST
Virtual Machine Apply Evc Mode VM Task
POST
Virtual Machine Attach Disk Task
POST
Virtual Machine Check Customization Spec
POST
Virtual Machine Clone VM Task
POST
Virtual Machine Consolidate VM Disks Task
POST
Virtual Machine Create Screenshot Task
POST
Virtual Machine Create Secondary VM Task
POST
Virtual Machine Create Secondary VM Ex Task
POST
Virtual Machine Create Snapshot Task
POST
Virtual Machine Create Snapshot Ex Task
POST
Virtual Machine Crypto Unlock Task
POST
Virtual Machine Customize VM Task
POST
Virtual Machine Defragment All Disks
POST
Virtual Machine Destroy Task
POST
Virtual Machine Detach Disk Task
POST
Virtual Machine Disable Secondary VM Task
POST
Virtual Machine Drop Connections
POST
Virtual Machine Enable Secondary VM Task
POST
Virtual Machine Estimate Storage For Consolidate Snapshots Task
POST
Virtual Machine Export Vm
POST
Virtual Machine Extract Ovf Environment
GET
Virtual Machine Get Alarm Actions Enabled
GET
Virtual Machine Get Available Field
GET
Virtual Machine Get Capability
GET
Virtual Machine Get Config
GET
Virtual Machine Get Config Issue
GET
Virtual Machine Get Config Status
GET
Virtual Machine Get Custom Value
GET
Virtual Machine Get Datastore
GET
Virtual Machine Get Declared Alarm State
GET
Virtual Machine Get Disabled Method
GET
Virtual Machine Get Effective Role
GET
Virtual Machine Get Environment Browser
GET
Virtual Machine Get Guest
GET
Virtual Machine Get Guest Heartbeat Status
GET
Virtual Machine Get Layout
GET
Virtual Machine Get Layout Ex
GET
Virtual Machine Get Name
GET
Virtual Machine Get Network
GET
Virtual Machine Get Overall Status
GET
Virtual Machine Get Parent
GET
Virtual Machine Get Parent V App
GET
Virtual Machine Get Permission
GET
Virtual Machine Get Recent Task
GET
Virtual Machine Get Resource Config
GET
Virtual Machine Get Resource Pool
GET
Virtual Machine Get Root Snapshot
GET
Virtual Machine Get Runtime
GET
Virtual Machine Get Snapshot
GET
Virtual Machine Get Storage
GET
Virtual Machine Get Summary
GET
Virtual Machine Get Tag
GET
Virtual Machine Get Triggered Alarm State
GET
Virtual Machine Get Value
POST
Virtual Machine Instant Clone Task
POST
Virtual Machine Make Primary VM Task
POST
Virtual Machine Mark As Template
POST
Virtual Machine Mark As Virtual Machine
POST
Virtual Machine Migrate VM Task
POST
Virtual Machine Mount Tools Installer
POST
Virtual Machine Power Off VM Task
POST
Virtual Machine Power On VM Task
POST
Virtual Machine Promote Disks Task
POST
Virtual Machine Put Usb Scan Codes
POST
Virtual Machine Query Changed Disk Areas
POST
Virtual Machine Query Connections
POST
Virtual Machine Query Fault Tolerance Compatibility
POST
Virtual Machine Query Fault Tolerance Compatibility Ex
POST
Virtual Machine Query Unowned Files
POST
Virtual Machine Reboot Guest
POST
Virtual Machine Reconfig VM Task
POST
Virtual Machine Refresh Storage Info
POST
Virtual Machine Reload
POST
Virtual Machine Reload Virtual Machine From Path Task
POST
Virtual Machine Relocate VM Task
POST
Virtual Machine Remove All Snapshots Task
POST
Virtual Machine Rename Task
POST
Virtual Machine Reset Guest Information
POST
Virtual Machine Reset VM Task
POST
Virtual Machine Revert To Current Snapshot Task
POST
Virtual Machine Send NMI
POST
Virtual Machine Set Custom Value
POST
Virtual Machine Set Display Topology
POST
Virtual Machine Set Screen Resolution
POST
Virtual Machine Shutdown Guest
POST
Virtual Machine Standby Guest
POST
Virtual Machine Start Recording Task
POST
Virtual Machine Start Replaying Task
POST
Virtual Machine Stop Recording Task
POST
Virtual Machine Stop Replaying Task
POST
Virtual Machine Suspend VM Task
POST
Virtual Machine Terminate Fault Tolerant VM Task
POST
Virtual Machine Terminate VM
POST
Virtual Machine Turn Off Fault Tolerance For VM Task
POST
Virtual Machine Unmount Tools Installer
POST
Virtual Machine Unregister VM
POST
Virtual Machine Upgrade Tools Task
POST
Virtual Machine Upgrade VM Task