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.
Prerequisites
This operation requires the rights included in the predefined vApp Author role or an equivalent set of rights.Verify that you are logged in to the vCloud Air Compute Service as an End User.
Procedure
Results
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.
Example: Update Multiple Sections of a Virtual Machine
This example uses the reconfigureVm operation to accomplish the updates shown in Update a NetworkConnectionSection and 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 Update an Independent Disk
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>
202 Accepted Content-Type: application/vnd.vmware.vcloud.task+xml ... <Task ... operation="Updating Virtual Application Win2K3 (4)" ...> ... </Task>