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 vcloud.site.com -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

Background:

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.

https://www.vmware.com/support/vsphere5/doc/vsp_esxi50_u2_rel_notes.html

“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

Config:

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

Scenario:

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???

Explanation:

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

 2

3. Enter DNS Details

3

4. Select the relevant Network and hit OK.

4

5. Deploy the OVA

5

6. Select small deployment

6

7. Select ‘Fixed’

7

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

8

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

9

10. Browse to the VCOPS Admin interface on UIM IP address https://10.255.224.28/admin/

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

10

11. Enter vCenter Details

11

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

 12

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

 13

15. If you need to import data follow this… https://www.vmware.com/support/pubs/vcops-pubs.html

Otherwise click Next.

 14

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

15

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

16

Register the vCloud Adapter

18. Download the adapter installation PAK file anonymously from  ftp://ftp.integrien.com

19. Save the PAK file on your desktop

20. Browse to the UIM server admin interface –  https://10.255.224.28/admin/

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

17

22. Hit Update and click OK to continue

18

23. The update will take several minutes to complete.

19

24. Log in to the Custom user interface as administrator. – https://10.255.224.28/vcops-custom

25. Browse to Admin>Support

20

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

22

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

23

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

24

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

26

30. Select Add New Adapter Instance

27

31. Enter vCloud instance IP Address or FQDN

28

32. Add vCloud Director credential, Select Add

29

33. Add vCloud Director login Credentials and hit OK.

30

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.

31

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.

32