Some time back I showed a way on how one can change the placement while provisioning. The central problem is that the placement takes place in that moment when the user submits his machine request. So at any step during the provisioning the placement has already been determined and resources already have been allocated.

During my research regarding the import of existing virtual machines I came across the ‘RegisterExistingVirtualMachine()’ SOAP action the VMPS ProvisionService in vCAC. As it turns out that same method also allows for changing a reservation of machine during provisioning.

PS > $vmps.RegisterExistingVirtualMachine;
void RegisterExistingVirtualMachine(
  VMPS.IdentityToken securityToken,
  string virtualMachineID,
  string hostReservationID,
  string hostStorageReservationID,
  string virtualMachineTemplateID,
  string owner

So in order to use this basically your placement logic only has to determine a HostReservation and a StorageReservation based upon any custom properties you define. (And it is still advisable not to rely on a ‘Vrm.DataCenter.Location’ field as this lives at the Compute Resource level and does not make sense for stretched clusters or physical machines.) Once you determined your two reservations (by taking into account free space, inactive resources, permissions of provisioning grooups and the like …) you only have to submit a SOAP call with these parameters and your reservation will be changed. The good thing is, that you can now be sure that vCAC is informed about what you are up to (and that you do not perform any actions behind its back.)

If you want to achieve the same with vCO or any other tool you will have to generate a SOAP call with a payload similar to this:

Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 749
Expect: 100-continue
Accept-Encoding: gzip, deflate

<s:Envelope xmlns:s="">
  <RegisterExistingVirtualMachine xmlns="">
   <securityToken xmlns:a="http://DynamicOps.VMPS.Model" xmlns:i="">
    <a:ImpersonatingUser i:nil="true" />

HTTP/1.1 200 OK
Content-Length: 170
Content-Type: text/xml; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
Date: Sun, 16 Feb 2014 15:09:54 GMT

<s:Envelope xmlns:s="">
  <RegisterExistingVirtualMachineResponse xmlns="" />


  1. I have created a blueprint with those properties : VirtualMachine.Storage.Name and Vrm.DataCenter.Location . On the dictionnary, I specified a drown list type to choose the name of the datacenter and the storage.

    My question is: is it possible to don’t show to the user the real names on the choices?

    For example :

    Storage name : Store 1, Store 2 which refers for Disk1, Disk2 ( real names).
    Thank you for your help and this articl

    • Hi Hamoussi, it is not really possible ot adjust the names, as when the user clicks “submit” the placement is already taking place, so rewriting the properties will not work. However, depending on whether you are using the (Kendo) SelfServicePortal or the original Administration Portal in vCAC 5.x you can customise the UI. When using the Kendo SelfServicePortal you can acutally use a (dirty?) workaround to have an event on the page to rewrite the the properties from the “display” names to the “real” names. You can actually use the REST service from the client portal to do this lookup dynamically. But it is a not so clean approch. Also, keep in mind that the whole request portal will change in vCAC v7 and already changed in vCAC v6 (so most of the stuff you are customising on the Portal will have to be done again). Hope this helps. Otherwise contact me directly so we can think of a solution for it. Regards, Ronald

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.