VMware Cloud Director API - POST-ReconfigureVm

VMware Cloud Director API - POST-ReconfigureVm

POST /vApp/{id}/action/reconfigureVm

Operation:
POST /vApp/{id}/action/reconfigureVm
Description:
Updates Vm name, Description, and any or all of the following sections.
  • VirtualHardwareSection
  • OperatingSystemSection
  • NetworkConnectionSection
  • GuestCustomizationSection
Sections not included in the request body will not be updated. In API requests that specify version 29.0 or higher, this operation allows to also update:
  • the boot-options of the VM (boot-delay and enter-bios).
  • the storage profile
  • the VM capabilities (ability to add CPU or MEM while the VM is powered-on)
  • the hardware-assisted CPU virtualization capability
Since:
5.1
Input parameters
Consume media type(s):
application/vnd.vmware.vcloud.vm+xml
application/vnd.vmware.vcloud.vm+json
Input type:
VmType
Output parameters
TaskType

This operation is asynchronous and returns a task that you can monitor to track the progress of the request.

Produce media type(s):
application/vnd.vmware.vcloud.task+xml
application/vnd.vmware.vcloud.task+json
Output type:
TaskType
Examples
Request
HTTP 1.1
POST /api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/action/reconfigureVm

Headers:
Content-Length: 17990
Content-Type: application/vnd.vmware.vcloud.vm+xml; charset=ISO-8859-1
x-vcloud-authorization: 4Ezv8QOCNMOaWCVI6gEHOXEG299HZAsmcB0qrgPRp1I=

Body:
<?xml version="1.0" encoding="UTF-8"?><vcloud:Vm
    xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
    xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"
    xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
    xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
    xmlns:vmw="http://www.vmware.com/schema/ovf"
    xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    deployed="false"
    href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38"
    id="urn:vcloud:vm:ec94079b-3071-4a72-b95c-4154acb12c38"
    name="imported"
    needsCustomization="true"
    status="8"
    type="application/vnd.vmware.vcloud.vm+xml">
    <vcloud:VCloudExtension
        required="false">
        <vmext:VmVimInfo>
            <vmext:VmVimObjectRef>
                <vmext:VimServerRef
                    href="https://vcloud.example.com/api/admin/extension/vimServer/5b2f648b-9da7-4d7b-8212-6ed8a83f2102"
                    name="ConfigWizard Configured vCenter"
                    type="application/vnd.vmware.admin.vmwvirtualcenter+xml"/>
                <vmext:MoRef>vm-274</vmext:MoRef>
                <vmext:VimObjectType>VIRTUAL_MACHINE</vmext:VimObjectType>
            
            </vmext:VmVimObjectRef>
            <vmext:DatastoreVimObjectRef>
                <vmext:VimServerRef
                    href="https://vcloud.example.com/api/admin/extension/vimServer/5b2f648b-9da7-4d7b-8212-6ed8a83f2102"
                    name="ConfigWizard Configured vCenter"
                    type="application/vnd.vmware.admin.vmwvirtualcenter+xml"/>
                <vmext:MoRef>datastore-42</vmext:MoRef>
                <vmext:VimObjectType>DATASTORE</vmext:VimObjectType>
            
            </vmext:DatastoreVimObjectRef>
            <vmext:HostVimObjectRef>
                <vmext:VimServerRef
                    href="https://vcloud.example.com/api/admin/extension/vimServer/5b2f648b-9da7-4d7b-8212-6ed8a83f2102"
                    name="ConfigWizard Configured vCenter"
                    type="application/vnd.vmware.admin.vmwvirtualcenter+xml"/>
                <vmext:MoRef>host-118</vmext:MoRef>
                <vmext:VimObjectType>HOST</vmext:VimObjectType>
            
            </vmext:HostVimObjectRef>
            <vmext:VirtualDisksMaxChainLength>3</vmext:VirtualDisksMaxChainLength>
        
        </vmext:VmVimInfo>
    </vcloud:VCloudExtension>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/power/action/powerOn"
        rel="power:powerOn"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/action/deploy"
        rel="deploy"
        type="application/vnd.vmware.vcloud.deployVAppParams+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38"
        rel="edit"
        type="application/vnd.vmware.vcloud.vm+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38"
        rel="remove"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/metadata"
        rel="down"
        type="application/vnd.vmware.vcloud.metadata+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/complianceResult"
        rel="down"
        type="application/vnd.vmware.vm.complianceResult+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/productSections/"
        rel="down"
        type="application/vnd.vmware.vcloud.productSections+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/screen"
        rel="screen:thumbnail"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/media/action/insertMedia"
        rel="media:insertMedia"
        type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/media/action/ejectMedia"
        rel="media:ejectMedia"
        type="application/vnd.vmware.vcloud.mediaInsertOrEjectParams+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/disk/action/attach"
        rel="disk:attach"
        type="application/vnd.vmware.vcloud.diskAttachOrDetachParams+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/disk/action/detach"
        rel="disk:detach"
        type="application/vnd.vmware.vcloud.diskAttachOrDetachParams+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/action/consolidate"
        rel="consolidate"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/action/relocate"
        rel="relocate"
        type="application/vnd.vmware.vcloud.relocateVmParams+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/action/checkCompliance"
        rel="checkCompliance"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/action/createSnapshot"
        rel="snapshot:create"
        type="application/vnd.vmware.vcloud.createSnapshotParams+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/action/revertToCurrentSnapshot"
        rel="snapshot:revertToCurrent"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/action/removeAllSnapshots"
        rel="snapshot:removeAll"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/action/reconfigureVm"
        name="imported"
        rel="reconfigureVm"
        type="application/vnd.vmware.vcloud.vm+xml"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/vApp/vapp-6c0d9722-80a6-4f19-b676-72ebf48e4e71"
        rel="up"
        type="application/vnd.vmware.vcloud.vApp+xml"/>
    <vcloud:Description/>
    <ovf:VirtualHardwareSection
        ovf:transport=""
        vcloud:href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/virtualHardwareSection/"
        vcloud:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml">
        <ovf:Info>Virtual hardware requirements</ovf:Info>
        <ovf:System>
            <vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
            <vssd:InstanceID>0</vssd:InstanceID>
            <vssd:VirtualSystemIdentifier>imported</vssd:VirtualSystemIdentifier>
            <vssd:VirtualSystemType>vmx-08</vssd:VirtualSystemType>
        </ovf:System>
        <ovf:Item>
            <rasd:Address>00:50:56:8d:7f:21</rasd:Address>
            <rasd:AddressOnParent>0</rasd:AddressOnParent>
            <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
            <rasd:Connection
                vcloud:ipAddressingMode="DHCP"
                vcloud:primaryNetworkConnection="true">VM Network</rasd:Connection>
            <rasd:Description>E1000 ethernet adapter on "VM Network"</rasd:Description>
            <rasd:ElementName>Network adapter 0</rasd:ElementName>
            <rasd:InstanceID>1</rasd:InstanceID>
            <rasd:ResourceSubType>E1000</rasd:ResourceSubType>
            <rasd:ResourceType>10</rasd:ResourceType>
        </ovf:Item>
        <ovf:Item>
            <rasd:Address>0</rasd:Address>
            <rasd:Description>SCSI Controller</rasd:Description>
            <rasd:ElementName>SCSI Controller 0</rasd:ElementName>
            <rasd:InstanceID>2</rasd:InstanceID>
            <rasd:ResourceSubType>lsilogicsas</rasd:ResourceSubType>
            <rasd:ResourceType>6</rasd:ResourceType>
        </ovf:Item>
        <ovf:Item>
            <rasd:AddressOnParent>0</rasd:AddressOnParent>
            <rasd:Description>Hard disk</rasd:Description>
            <rasd:ElementName>Hard disk 1</rasd:ElementName>
            <rasd:HostResource
                vcloud:busSubType="lsilogicsas"
                vcloud:busType="6"
                vcloud:capacity="40"/>
            <rasd:InstanceID>2000</rasd:InstanceID>
            <rasd:Parent>2</rasd:Parent>
            <rasd:ResourceType>17</rasd:ResourceType>
        </ovf:Item>
        <ovf:Item>
            <rasd:Address>0</rasd:Address>
            <rasd:Description>IDE Controller</rasd:Description>
            <rasd:ElementName>IDE Controller 0</rasd:ElementName>
            <rasd:InstanceID>3</rasd:InstanceID>
            <rasd:ResourceType>5</rasd:ResourceType>
        </ovf:Item>
        <ovf:Item>
            <rasd:AddressOnParent>1</rasd:AddressOnParent>
            <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
            <rasd:Description>CD/DVD Drive</rasd:Description>
            <rasd:ElementName>CD/DVD Drive 1</rasd:ElementName>
            <rasd:HostResource/>
            <rasd:InstanceID>3002</rasd:InstanceID>
            <rasd:Parent>3</rasd:Parent>
            <rasd:ResourceType>15</rasd:ResourceType>
        </ovf:Item>
        <ovf:Item>
            <rasd:AddressOnParent>0</rasd:AddressOnParent>
            <rasd:AutomaticAllocation>false</rasd:AutomaticAllocation>
            <rasd:Description>Floppy Drive</rasd:Description>
            <rasd:ElementName>Floppy Drive 1</rasd:ElementName>
            <rasd:HostResource/>
            <rasd:InstanceID>8000</rasd:InstanceID>
            <rasd:ResourceType>14</rasd:ResourceType>
        </ovf:Item>
        <ovf:Item
            vcloud:href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/virtualHardwareSection/cpu"
            vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml">
            <rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
            <rasd:Description>Number of Virtual CPUs</rasd:Description>
            <rasd:ElementName>1 virtual CPU(s)</rasd:ElementName>
            <rasd:InstanceID>4</rasd:InstanceID>
            <rasd:Reservation>0</rasd:Reservation>
            <rasd:ResourceType>3</rasd:ResourceType>
            <rasd:VirtualQuantity>1</rasd:VirtualQuantity>
            <rasd:Weight>0</rasd:Weight>
            <vmw:CoresPerSocket
                ovf:required="false">1</vmw:CoresPerSocket>
            <vcloud:Link
                href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/virtualHardwareSection/cpu"
                rel="edit"
                type="application/vnd.vmware.vcloud.rasdItem+xml"/>
        </ovf:Item>
        <ovf:Item
            vcloud:href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/virtualHardwareSection/memory"
            vcloud:type="application/vnd.vmware.vcloud.rasdItem+xml">
            <rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
            <rasd:Description>Memory Size</rasd:Description>
            <rasd:ElementName>4096 MB of memory</rasd:ElementName>
            <rasd:InstanceID>5</rasd:InstanceID>
            <rasd:Reservation>0</rasd:Reservation>
            <rasd:ResourceType>4</rasd:ResourceType>
            <rasd:VirtualQuantity>4096</rasd:VirtualQuantity>
            <rasd:Weight>0</rasd:Weight>
            <vcloud:Link
                href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/virtualHardwareSection/memory"
                rel="edit"
                type="application/vnd.vmware.vcloud.rasdItem+xml"/>
        </ovf:Item>
        <vcloud:Link
            href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/virtualHardwareSection/"
            rel="edit"
            type="application/vnd.vmware.vcloud.virtualHardwareSection+xml"/>
        <vcloud:Link
            href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/virtualHardwareSection/cpu"
            rel="down"
            type="application/vnd.vmware.vcloud.rasdItem+xml"/>
        <vcloud:Link
            href="https://vcloud.example.com/api/vApp/vm-ec94079b-3071-4a72-b95c-4154acb12c38/virtualHardwareSection/cpu"
            rel="edit"
            type="application/vnd.vmware.vcloud.rasdItem+xml"/>
  &