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.

The vCloud 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

Verify that
you are logged in to the vCloud API endpoint as an End User.

Procedure

1

Retrieve the
GuestCustomizationSection
to modify.

Make a GET request to
the URL in the section's
href
attribute value.

GET https://vcloud.example.com/api/vApp/vm-12/guestCustomizationSection/

2

Modify the retrieved
section.

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

Update the section with
your modifications.

a

In the retrieved
section, find the
Link element where
rel="edit".

b

Make a PUT request
to the URL in that link's
href attribute value,
and supply the modified section as the request body.

The
response to this request is a
Task
element that tracks the update operation. When the task is complete, the
section is updated.

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.

Note

If you include a
CustomizationScript, it
cannot exceed 49,000 characters.