1.5

Table Of Contents
Response:
200 OK
Content-Type: application/vnd.vmware.admin.vimservernetworks+xml
...
<vmext:VimObjectRefList
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ... >
<vcloud:Link
rel="up"
type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
href="https://vcloud.example.com/api/admin/extension/vimServer/9" />
<vmext:VimObjectRefs>
<vmext:VimObjectRef>
<vmext:VimServerRef
type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
name="vc9"
href="https://vcloud.example.com/api/admin/extension/vimServer/9" />
<vmext:MoRef>dvportgroup-32</vmext:MoRef>
<vmext:VimObjectType>DV_PORTGROUP</vmext:VimObjectType>
</vmext:VimObjectRef>
<vmext:VimObjectRef>
<vmext:VimServerRef
type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
name=""
href="https://vcloud.example.com/api/admin/extension/vimServer/9" />
<vmext:MoRef>network-175</vmext:MoRef>
<vmext:VimObjectType>NETWORK</vmext:VimObjectType>
</vmext:VimObjectRef>
</vmext:VimObjectRefs>
</vmext:VimObjectRefList>
Retrieve a List of Virtual Machines from a vCenter Server
You can retrieve the list of virtual machines in the inventory of a vCenter server that is registered to a cloud.
To retrieve the list, make a GET request to the server's vmslist link.
When you import a virtual machine from vCenter, your request must supply a reference to the vCenter server
and a VIM object reference to the virtual machine. See “Finding Available vCenter Resources,” on page 167.
Prerequisites
Verify that you are logged in as a system administrator.
Procedure
1 Retrieve the XML representation of a vCenter server registered to your cloud.
2 Examine the response, a VimServer element, to locate the vmsList link.
This link has the following form:
<vcloud:Link
rel="down"
type="application/vnd.vmware.admin.vmsObjectRefsList+xml"
href="https://vcloud.example.com/api/admin/extension/vimServer/9/vmsList" />
Chapter 7 Using vCloud API Extensions to Provision and Manage a Cloud
VMware, Inc. 171