You can make a single request that updates the name, Description, and any or all of the VirtualHardwareSection, OperatingSystemSection, NetworkConnectionSection, GuestCustomizationSection elements of a virtual machine.

Every Vm element contains a link to a reconfigureVm operation that you can use to update the name, Description, and multiple sections in a single operation. Sections that you omit from the request body are not updated.

Verify that you are logged in to the vCloud API as a vApp Author.

1

Retrieve the Vm element that you want to update.

2

Modify the retrieved Vm element.

Modifications can include the name, Description, and any or all of the VirtualHardwareSection, OperatingSystemSection, NetworkConnectionSection, GuestCustomizationSection elements of the Vm.

Request bodies must contain all required elements and attributes, even if you are not changing their values. Because optional elements and attributes typically revert to default values if they are omitted or empty, it is a best practice to include optional elements in request bodies that modify existing objects. Link elements and href attributes from responses do not need to be included in modified sections. Some elements and attributes are read-only and cannot be modified. See the schema reference for details.

3

Use the modified Vm as the body of a reconfigureVm request.

The modified Vm replaces the contents of the retrieved Vm. For some section types, modifications take effect immediately. For others, modifications take effect only after a power or deployment state change.

This example uses the reconfigureVm operation to accomplish the updates shown in Example: Update a NetworkConnectionSection and Example: Modify the Guest Customization Section of a Virtual Machine in a single operation. It also updates the independent disk attached to this virtual machine in a way similar to the operation shown in Example: Update an Independent Disk

Request:

POST https://vcloud.example.com/api/vApp/vm-4/action/reconfigureVm
Content-Type: application/vnd.vmware.vcloud.vm+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<Vm ...>
   ...
   <NetworkConnectionSection
      type="application/vnd.vmware.vcloud.networkConnectionSection+xml"
      xmlns="http://www.vmware.com/vcloud/v1.5"
      xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
      <ovf:Info>Firewall allows access to this address.</ovf:Info>
      <PrimaryNetworkConnectionIndex>0</PrimaryNetworkConnectionIndex>
      <NetworkConnection network="vAppNetwork">
         <NetworkConnectionIndex>0</NetworkConnectionIndex>
         <IpAddress>10.147.115.1</IpAddress>
         <IsConnected>true</IsConnected>
         <MACAddress>00:50:56:01:01:49</MACAddress>
         <IpAddressAllocationMode>STATIC</IpAddressAllocationMode>
      </NetworkConnection>
   </NetworkConnectionSection>
   <GuestCustomizationSection
      xmlns="http://www.vmware.com/vcloud/v1.5"
      xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
      ovf:required="false">
      <ovf:Info>Specifies Guest OS Customization Settings</ovf:Info>
      <Enabled>true</Enabled>
      <ChangeSid>true</ChangeSid>
      <VirtualMachineId>12</VirtualMachineId>
      <JoinDomainEnabled>false</JoinDomainEnabled>
      <UseOrgSettings>false</UseOrgSettings>
      <DomainName />
      <DomainUserName />
      <DomainUserPassword />
      <AdminPasswordEnabled>true</AdminPasswordEnabled>
      <AdminPasswordAuto>true</AdminPasswordAuto>
      <AdminPassword />
      <ResetPasswordRequired>false</ResetPasswordRequired>
      <CustomizationScript />
      <ComputerName>Win2K3</ComputerName>
   </GuestCustomizationSection>
   <ovf:VirtualHardwareSection
      xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
      vcloud:type="application/vnd.vmware.vcloud.virtualHardwareSection+xml">
      <ovf:Info>Virtual hardware requirements</ovf:Info>
      <ovf:Item>
         <rasd:AddressOnParent>0</rasd:AddressOnParent>
         <rasd:HostResource
            vcloud:storageProfileHref="https://vcloud/example.com/api/vdcStorageProfile/3"
            vcloud:disk="https://vcloud.example.com/api/disk/128" />
         <rasd:InstanceID>2000</rasd:InstanceID>
         <rasd:Parent>2</rasd:Parent>
         <rasd:ResourceType>17</rasd:ResourceType>
      </ovf:Item>
   </ovf:VirtualHardwareSection>
   ...
</Vm>

Response:

202 Accepted
Content-Type: application/vnd.vmware.vcloud.task+xml
...
<Task
   ... 
   operation="Updating Virtual Application Win2K3 (4)"
   ...>
   ...
</Task>