View Only
  • 1.  API Call to Migrate VM Between Resource Pools

    Posted Nov 09, 2020 03:41 PM

    Hello All,

    After upgrading our vCloud instances to version 10, we've found that the ability to migrate VMs between resource pools has been removed from the GUI. Support tells us this functionality is still possible, but only through an API call:

    I've searched through VMware's documentation but can only find very sparse info on this API call. I did locate an example on Tom Fojta's blog... from 2013 -

    When I craft a query and requisite parameters based on that example, I get a 404 error in return. I'm able to query each entity separately, so I'm not sure what is triggering the 404. I'm guessing the API call has changed since his post 7 years ago.

    Here is the body of my request:

     Has anyone used this API call before who might be able to give me a clue as to what I'm getting wrong?


  • 2.  RE: API Call to Migrate VM Between Resource Pools

    Broadcom Employee
    Posted Nov 10, 2020 04:30 PM

    Here is a sample request that is known to work (it's part of the vCD test suite): 

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <ns2:MigrateParams xmlns="" xmlns:ns2="" xmlns:ns3="" xmlns:ns4="" xmlns:ns5="" xmlns:ns6="" xmlns:ns7="" xmlns:ns8="" xmlns:ns9="">
    <ns2:VmRef href="" id="urn:vcloud:vm:a7dcd89e-23a0-480e-9090-ef91cec094da" name="vm-1" type="application/vnd.vmware.vcloud.vm+xml"/>
    <ns2:VimServerRef href="" id="urn:vcloud:vimserver:40412aad-523d-406a-8257-e67d3d079b3f" name="vc1" type="application/vnd.vmware.admin.vmwvirtualcenter+xml"/>

    I think you are missing proper IDs in your handcrafted body.


  • 3.  RE: API Call to Migrate VM Between Resource Pools

    Posted Nov 11, 2020 06:23 AM

    Thanks for the reply!

    I tried using the sample you posted but I still get the same 404 response.

    Is there any way to determine which ID might be wrong? I'm able to successfully query the VM ID and the vCenter server ID, so I have at least confirmed that the IDs I'm supplying are valid.

    I tried running the request without the "ResourcePoolRef" parameter just to see what would happen (since the documentation indicates it is optional) and I get the same 404. I feel like I'm missing something basic.

  • 4.  RE: API Call to Migrate VM Between Resource Pools
    Best Answer

    Posted Nov 20, 2020 08:52 PM

    I was able to figure this out with some help from support. I was using the incorrect header value for "Content-Type" and a glitch in my Postman instance was preventing me from changing it. Reinstalled Postman and was able to supply the correct header which is "application/vnd.vmware.admin.migrateVmParams+xml"

  • 5.  RE: API Call to Migrate VM Between Resource Pools

    Posted Feb 22, 2021 01:31 PM

    Hi jrapine

    I was in contact with vmware too.

    I got the same manual as you. But at my vCloud Director ist doesn't really work as ist should.

    When I run the POST statement the system create a resource pool at the destination I want, but the vm doesn't move to the created resource pool.

    Do you got something similar?