User`s guide
2 Run php hellovcloud.php, as show in “Example: Running HellovCloud,” on page 29.
Example: Running HellovCloud
You must supply runtime options on the command line. To see a summary of hellovcloud.php options, use
the following command:
php hellovcloud.php --help
To run the hellovcloud.php example, use the following command:
php hellovcloud.php -s
vCloudURL
-u
user
@
vcloud-organization
-p
password
-o=
orgName
-d=
vdcName
-
v=
ovfFileLocation
-g=
catalogName
-n=
vAppTemplateName
Values for the runtime options provide user credentials, object names, and file names.
Table 4-2. hellovcloud runtime options
Value Description
vCloudURL The vCloud Director URL.
user The name of a user account that can run the sample. This user must have rights to
create and operate vApps.
vcloud-organization The name of the organization in which the user account exists.
password The user's password.
orgName The name of the organization in which the user account exists, and to which the user
is authenticating.
vdcName The name of a vDC in that organization where the user can upload the OVF and
deploy the vApp.
ovfFileLocation The full pathname to the OVF descriptor on the local disk.
catalogName The name of the catalog into which the OVF package is uploaded, and in which the
resulting vApp template is catalogued.
vAppTemplateName The name of the vAppTemplate to be created from the OVF package.
All options but -s, -u, and -p must be separated from their arguments by an equals sign, as the following
example shows:
php hellovcloud.php -s https://vcloud.example.com -u user@SampleOrg -p Pa55w0rd -o=SampleOrg
-d=SampleVdc -v=C:\descriptor.ovf -g SampleCatalog -n=SamplevAppTemplate
You can use the vCloud Director Web Console or the vCloud REST API to find appropriate values in your
vCloud for orgName, vdcName, and catalogName. See the vCloud Director User's Guide or the vCloud API
Programming Guide.
Understanding the HellovCloud Example
The hellovcloud.php example performs a sequence of operations that are typical of the workflow for
provisioning and operating a vApp.
Included in the example are comment blocks that explain how the steps in the example use the SDK libraries.
For additional information about vCloud API requests, see the vCloud API Programming Guide.
Chapter 4 About the Example Programs
VMware, Inc. 29