VMware VCLOUD API 1.0 - API Programming Manual page 79

Table of Contents

Advertisement

Retrieve or Modify the Guest Customization Section of a Virtual Machine
Example
5‐17 retrieves the GuestCustomizationSection of a Windows Vm.
section and uses the URL in the edit link from that section to apply the changes to the Vm.
Example 5-17. Retrieve the Guest Customization Section of a Virtual Machine
Request:
GET http://vcloud.example.com/api/v1.0/vApp/vm-12/guestCustomizationSection
Response:
200 OK
Content-type: application/vnd.vmware.vcloud.guestcustomizationsection+xml
...
<GuestCustomizationSection type="application/vnd.vmware.vcloud.guestCustomizationSection+xml"
<ovf:Info>Specifies Guest OS Customization Settings</ovf:Info>
<Enabled>false</Enabled>
<ChangeSid>false</ChangeSid>
<VirtualMachineId>4</VirtualMachineId>
<JoinDomainEnabled>false</JoinDomainEnabled>
<UseOrgSettings>false</UseOrgSettings>
<AdminPasswordEnabled>false</AdminPasswordEnabled>
<AdminPasswordAuto>true</AdminPasswordAuto>
<ResetPasswordRequired>false</ResetPasswordRequired>
<CustomizationScript/>
<ComputerName>ubuntu10-x86</ComputerName>
<Link rel="edit" type="application/vnd.vmware.vcloud.guestCustomizationSection+xml"
</GuestCustomizationSection>
The modified GuestCustomizationSection in the request body changes the value of the 
JoinDomainEnabled element to true. This change requires you to specify a domain to join, along with the 
name and password of a domain administrator, so the request body includes DomainName, DomainUserName, 
and DomainUserPassword elements.
Example 5-18. Modify the Guest Customization Section of a Virtual Machine
Request:
PUT http://vcloud.example.com/api/v1.0/vApp/vm-12/guestCustomizationSection
Content-type: application/vnd.vmware.vcloud.guestcustomizationsection+xml
...
<GuestCustomizationSection type="application/vnd.vmware.vcloud.guestCustomizationSection+xml"
<ovf:Info>Specifies Guest OS Customization Settings</ovf:Info>
<Enabled>false</Enabled>
<ChangeSid>false</ChangeSid>
<VirtualMachineId>4</VirtualMachineId>
<JoinDomainEnabled>true</JoinDomainEnabled>
<UseOrgSettings>false</UseOrgSettings>
<DomainName>EXAMPLE</DomainName>
<DomainUserName>admin</DomainUserName>
<DomainUserPassword>Pa55w0rd</DomainUserPassword>
<AdminPasswordEnabled>false</AdminPasswordEnabled>
<AdminPasswordAuto>true</AdminPasswordAuto>
<ResetPasswordRequired>false</ResetPasswordRequired>
<CustomizationScript/>
<ComputerName>ubuntu10-x86</ComputerName>
VMware, Inc.
href="http://vcloud.example.com/api/v1.0/vApp/vm-12/guestCustomizationSection/"
ovf:required="false">
href="http://vcloud.example.com/api/v1.0/vApp/vm-12/
guestCustomizationSection/"/>
href="http://vcloud.example.com/api/v1.0/vApp/vm-12/guestCustomizationSection/"
ovf:required="false">
Chapter 5 Datacenter Operations
Example
5‐18 modifies the 
79

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VCLOUD API 1.0 - API and is the answer not in the manual?

Questions and answers

Table of Contents