Category Archives: vCloud Director

vCloud Director related posts

Hot Modify disks in vCloud Director using PowerCLI

I did not write this script, I found it on this excellent blog, I had a few problems getting the original code to work so thought I would share what I used to get this working. The script below increases the disk size to 70GB on a powered on VM.

Connect-CIServer -User administrator -Password password 

#Get VM called diskresize
$vm = Get-CIVM diskresize

#Define new size in MB
$newsize = "70240" 

#Modify the extension data with the new size
(($vm.ExtensionData.Section|where {$_-is  [VMware.VimAutomation.Cloud.Views.OvfVirtualHardwareSection]}).item|where {$_.ResourceType.value-eq17}).hostresource[0].AnyAttr[0]."#text" = $newsize

# Final step, update server data
($vm.ExtensionData.Section|where {$_-is[VMware.VimAutomation.Cloud.Views.OvfVirtualHardwareSection]}).updateserverdata()

‘Not free; Lock’ error messages and high CPU on ESXi host causes VMs to momentarily freeze


We’re running vCloud Director 1.5.2  and vsphere 5.0 update 1 in a 11 host cluster/PVDC, customers began complaining that virtual machines we’re locking up and losing pings for between 5 and 30 seconds, we were seeing Not free;Lock errors as below in /var/log/vmkernel.log.

2013-04-24T08:33:41.546Z cpu28:6869)DLX: 3901: vol DATALUN’: [Req mode: 1] Not free; Lock [type 10c00001 offset 207360000 v 123467, hb offset 3854336

gen 69, mode 1, owner 5176c50b-7452087c-b21a-mtime 133636 nHld 0 nOvf$

2013-04-24T08:33:48.541Z cpu21:6869)DLX: 3394: vol : [Req mode 1] Checking liveness of [type 10c00001 offset 207360000 v 123467, hb offset 3854336

gen 69, mode 1, owner 5176c50b-7452087c-b21a- mtime 133636 nHld 0$

2013-04-24T08:33:52.552Z cpu21:6869)DLX: 3901: vol : [Req mode: 1] Not free; Lock [type 10c00001 offset 207360000 v 123467, hb offset 3854336

gen 69, mode 1, owner 5176c50b-7452087c-b21a-mtime 133636 nHld 0 nOvf$

This was a real head scratcher, we spent the best part of a week troubleshooting with VMware and EMC, we were seeing the error messages in /var/log/vmkernel.log on random esxi hosts in the same cluster.  When the messages appeared virtual machines running on the datastore and esxi host would momentarily lock up, you can work out which ESXi hosts is causing the lock as the mac address is visible in the error message, we also noticed that the CPU would shoot up to 100% on the host holding the lock.  We went through the storage configuration on the hosts and at the backend, we found some performance issues which we adressed but it did not fix the problem.  At first we thought it might be a LUN zoning problem but this all checked out and everything appeared to be in order.  So we went back to VMware and after a week or so of extensive troubleshooting they confirmed we were hitting the bug described below. The fix is to upgrade to ESXi 5.0 Update 2.

“ESXi hostd agent might consume very high CPU resulting in performance degradation”
“When vCloud Director fetches the screen shot of virtual machine desktop from the ESXi host, hostd agent might enter into an infinite loop resulting in 100% CPU usage and the CPU usage might not reduce until you restart hostd.

Hopefully this post will save you some time and hair!!

vShield Edge Static Routing between External networks


1 x VCNS Edge Gateway with Public IP Block – VLAN 200

External Network 1 – with Public IP Block – VLAN 201

External Network 2 – with Public IP Block – VLAN 202

I recently came across a customer requirement where they wanted to set up some static routes between External Network 1 (VLAN 201) and External Network 2 (VLAN 202) as above.  Both networks had been created in vCloud Director as external networks and did not have any Organisation Networks attached to them. 

We had an existing VCNS Edge Gateway with a public IP block assinged on VLAN 200, my assumption was that we add both external networks to the existing VCNS Edge Gateway and apply the static routes between them.  It turns out that it’s not that simple! when I attempted to apply the routes between Network 1 and Network 2  I got the following message… “Static routing between overlapping networks is not supported”, it seems that the because they are connected to vCloud Director as external networks it will not allow you to add static routes as VCD sees them as overlapping networks.

This was a misunderstanding on my part on how static routing works on VCNS Edge Gateways, it seems that I’m not the only one as several of my colleagues had the same misconception.  In the end we applied the static routes on an upstream switch as we could not get the routes to stick on the VCNS Gateway.  Static Routes work well on VAPP networks and Organisation networks on the internal side of the vShield Edge, but there is very little information on there on using them for external networks, I aim to do some more research in this area so will update the blog in due course.

vCloud Director and vRAM Datastore usage


VDC Storage Allocation = 120GB

1 VAPP with 2 virtual machines

4GB of RAM in each and a 40GB Disk per VM.

Total disk usage – 8OGB right?

Customer attempts to create a new VM with exactly the same specs as above, (4GB of RAM and 40GB disk) they are told that they will exceed there storage allocation!

The customer checked their storage usage and vCloud Director reports that they are using 88GB of their 120GB allocation, they have no templates in their catalog so cannot understand where the extra 8GB of storage has gone???


Whatever the size of the virtual machine memory, vCloud Director will reserve the equivalent data store space for the swapfile, so a virtual machine with 4GB of RAM will consume 4GB of disk space on the datastore.

vCloud Director does not take into account memory reservations, it effectively treats it as 100% memory reservation.  This is also irrespective of the power state of the virtual machine.

Memory of virtual machines stored in the catalog is not included in the space allocation.

Something worth taking into conisderation when sizing vCloud Director implementations!

VCOPS 5.6 vCloud Director Adapter – Configuration Guide

In this post we’ll go through the basic steps to get VCOPs running with the vCloud Director Adapter, the vCloud instance in this example is running vCloud Director 1.5.

1 .Create an IP Pool and allocate 2 IP addresses, 1 for the UIM server 1 for the Analytics server

 2. From the “Data Center” view select the IP Pools tab and click Add.

      Name the IP Pool and define the IP Subnet Mask and Gateway


3. Enter DNS Details


4. Select the relevant Network and hit OK.


5. Deploy the OVA


6. Select small deployment


7. Select ‘Fixed’


8. Enter IP the addresses of the UIM and Analytics Virtual Machines and hit Next to finish the deployment.


9. Once the Deployment has completed you should see the VCOPS VAPP with 2 VMS.


10. Browse to the VCOPS Admin interface on UIM IP address

Enter username = admin and password = admin to follow the initial set up wizard.


11. Enter vCenter Details


12. If using self-signed certs, click Yes to trust the vCenter Server certificate

13.  Enter new admin and root passwords for both VMs. Default passwords are Admin/admin and root/vmware


14. Register your vCenter, leave Collector user and password blank.


15. If you need to import data follow this…

Otherwise click Next.


16. If you are using linked vCenters, select the linked VC from the list, otherwise click Finish to complete the registration.


17. Once registration is complete the the VCOPS icon should appear in the solutions and Appplications view of the registered vCenter


Register the vCloud Adapter

18. Download the adapter installation PAK file anonymously from

19. Save the PAK file on your desktop

20. Browse to the UIM server admin interface –

21 . Go to the Update TAB and select the PAK file by browsing to your desktop


22. Hit Update and click OK to continue


23. The update will take several minutes to complete.


24. Log in to the Custom user interface as administrator. –

25. Browse to Admin>Support


26. On the Info tab, find the Adapters Info pane and click the Describe icon, highlighted in yellow on the screen grab below.


27. Select Yes to begin the describe process, it should take several minutes to complete.


28. The vCloud adapter should now appear in the Adapters Info window.


29. To create the adapter Instance – Go to Environment > Configuration > Adapter Instances


30. Select Add New Adapter Instance


31. Enter vCloud instance IP Address or FQDN


32. Add vCloud Director credential, Select Add


33. Add vCloud Director login Credentials and hit OK.


34.  When you get back to the ‘Add adapter Instance’ page, select ‘Test’ to test the connection to vCloud Director, if the test is successful hit OK to complete the config. VCOPs will access the API so bare this in mind if you’ve got Firewalls or Load Balancers in front of your VCD cells.


35. That completes the installation of the vCloud Director adapter.

VCOPs will begin collecting DATA so you can go ahead and start creating some custom dashboards.