The GuestCustomizationSection element includes a customization script and other parameters that are applied when you customize a virtual machine.
The GuestCustomizationSection includes predefined property names that VMware guest customization tools recognize. Certain values in this element, if omitted or left empty, are inherited from the OrgGuestPersonalizationSettings of the organization that owns the virtual machine. See Retrieve or Update Organization Settings.
The VMware Cloud Director API also supports use of the ovf:ProductSection to pass an arbitrary set of key=value pairs to a vApp or virtual machine through the ovf:Environment element. See Retrieve or Modify ProductSection Elements.
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 section replaces the contents of the original section. For some section types, modifications take effect immediately. For others, modifications take effect only after a power or deployment state change.
Example: Modify the Guest Customization Section of a Virtual Machine
This request specifies guest customization values, including the information required to join the virtual machine to a Windows domain.
PUT https://vcloud.example.com/api/vApp/vm-12/guestCustomizationSection/ Content-type: application/vnd.vmware.vcloud.guestcustomizationsection+xml ... <?xml version="1.0" encoding="UTF-8"?> <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>example</DomainName> <DomainUserName>admin</DomainUserName> <DomainUserPassword>Pa55w0rd</DomainUserPassword> <AdminPasswordEnabled>true</AdminPasswordEnabled> <AdminPasswordAuto>true</AdminPasswordAuto> <AdminPassword /> <ResetPasswordRequired>false</ResetPasswordRequired> <CustomizationScript /> <ComputerName>Win2K3</ComputerName> </GuestCustomizationSection>
202 Accepted Content-Type: application/vnd.vmware.vcloud.task+xml ... <Task ... operation="Updating Virtual Application Win2K3 (12)" ...> ... </Task>