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.
Prerequisites
This operation is restricted to system administrators.
Procedure
Example: Retrieve a List of Virtual Machines from a vCenter Server
Request:
GET https://vcloud.example.com/api/admin/extension/vimServer/9/vmsList
Response:
200 OK Content-Type: application/vnd.vmware.admin.vmsobjectrefslist+xml ... <vmext:VmObjectRefsList xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" page="1" numberOfPages="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ... > <vmext:VmObjectRef name="RH5u3_32bit"> <vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml" name="vc2-v41u1" href="https://vcloud.example.com/api/admin/extension/vimServer/9" /> <vmext:MoRef>vm-41</vmext:MoRef> <vmext:VimObjectType>VIRTUAL_MACHINE</vmext:VimObjectType> </vmext:VmObjectRef> <vmext:VmObjectRef name="W2K3 64 R2"> <vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml" name="vc2-v41u1" href="https://vcloud.example.com/api/admin/extension/vimServer/9" /> <vmext:MoRef>vm-43</vmext:MoRef> <vmext:VimObjectType>VIRTUAL_MACHINE</vmext:VimObjectType> </vmext:VmObjectRef> <vmext:VmObjectRef name="Ubuntu91_32_vt4"> <vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml" name="vc2-v41u1" href="https://vcloud.example.com/api/admin/extension/vimServer/9" /> <vmext:MoRef>vm-44</vmext:MoRef> <vmext:VimObjectType>VIRTUAL_MACHINE</vmext:VimObjectType> </vmext:VmObjectRef> </vmext:VmObjectRefsList>