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 an administrator, Catalog Author, or 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.

Modified sections must contain all required elements, even if you are not changing their values. Because optional elements revert to default values if they are omitted or empty, it is a best practice to include optional elements in updates. Link elements and href attributes from responses do not need to be included in modified sections. Some elements and attributes might be read-only. 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.

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>
   ...
</Vm>

Response:

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