The AutoLab is brought to you by APAC vBrownBag host Alastair Cooke (web/twitter), and our mad genius behind the boards, Nick Marshall (web/twitter). Its mission is simple: to provide an easy way to deploy a vSphere lab on ESXi or Workstation. If you have a laptop with about 8GB RAM and a modern CPU, then you can probably run the AutoLab! Sure, it won’t be like running a quad-socket 8 core beast with 1TB of RAM and EFD, but it’ll get you labbing, and that’s all that counts. If you’d like to get started, head over to labguides.com and download the AutoLab. I won’t go into detail on getting it setup, but I do want to outline a few minor alterations I did to get vCloud Director up and running.
First, I changed up the way Workstation manages the memory. I only have 8GB of RAM in this laptop, so overhead is a bit tight, especially if I’m running my WinXP VM as well, which I use as a personal VM inside my corporately imaged laptop. The AutoLab instructions say to go into Workstation’s Preferences menu and set the memory to “Fit all virtual machine memory into reserved host RAM”, which is essentially a memory reservation within Workstation. That approach works well, and I imagine that it helps to reduce swapping, especially on computers with spinning disks. Since my laptop runs SSD, I wanted to have more VMs running at once without having Workstation complain about running out of memory. I changed the memory setting to “Allow most virtual machine memory to be swapped”.
Another change I had to make was to increase the memory allocated to the Host1 and Host2. Staying with the default 2GB works for vSphere labbing, but once you install vCloud Director, you might want some memory available to power on VMs within vCD. I also went into the DC VM’s DHCP panel and increased the lease times. My reasoning for that is since I’m using the vCloud Director appliance; it does all of it’s setup business based on the DHCP addresses it receives at first power-on. If those addresses change, your vCD won’t run. Sure, you can go in and fix it, but it’s a PITA (IMO), so why bother?
After your AutoLab is setup, download the vShield Manager and vCloud Director appliances. The vShield Manager appliance has a EULA that goes crazy on my copy of Workstation, so I “fixed” it by unzipping the ova (it’s a zip file, after all, just a different extension), deleting the .mf & .cert files, and removing all the text between the <License> tags within the .ovf file’s XML. Before you delete the EULA, you should probably read and understand what you’ll be agreeing to. Don’t bother rezipping into an .ova, just open the .ovf file with Workstation, agree to the now non-existent license (remember, you agreed when you read then deleted it) and let the install complete. Once it finishes, change the network from Bridged to the VMnet3 you created when you deployed the AutoLab, and set the memory to 384MB instead of 3GB. Power on the vShield Manager VM and wait for the startup to complete. Login to the vShield VM using the credentials of admin/default, enter privileged mode with the en command and the password default and type setup. You’ll be presented with a setup wizard of sorts; I used 192.168.199.8 for the IP, 255.255.255.0 for the subnet mask, 192.168.199.2 for the gateway, 192.168.199.4 for DNS, and lab.local for the DNS domain search list. After the vShield Manager setup completes, go over to the DC VM’s DNS panel and create a forward and reverse lookup for the vShield Manager VM, whose hostname will be manager by default. You may also want to setup a DHCP reservation for that IP address (if you want to be extra sure it won’t lose its IP); you can find the vShield Manager’s MAC address by logging into privileged mode and issuing the command show interface.
If you haven’t installed vCD previously, or if you have previous vShield experience outside of vCloud Director, the process is a bit different when using vShield in conjunction with vCenter. First, you won’t need to register your vShield Manager VM within vCenter, as it will be controlled by vCloud Director. Second, if you need to license it for whatever reason, the licensing is handled via vCenter’s Licensing panel. vCenter becomes aware of it once you connect vShield to vCloud Director and vCloud Director is connected to a vCenter.
Next up, open the vCloud Director appliance’s .ova file and add it to Workstation. Be sure to change the two bridged network adapters over to VMnet3, or your appliance will either wait forever for an IP address, or get one from the DHCP server on your Workstation’s LAN. Either way, at this point it’s simpler just to delete the VM and start over. The vCloud Director initial setup will take a while, so be patient until it completes. Interrupting it will most likely break it, so you’ll be back to the “delete and re-install shuffle” if you’re impatient. You’ll know it setup correctly if you can browse to the address displayed on the VM console (minus the 5480 port) and see the vCloud Director setup page.
At this point you can complete the vCloud Director web-based setup, but don’t go so far as to connect vCenter. If you have any troubles with name resolution to either vCenter or your vShield Manager VM, check DNS. When that is done, hop back over to the vCloud Director VM’s console and choose the Configure Network option. Change the hostname to something other than localhost, take note of the IP addresses it pulled from DHCP, save your changes and exit the network configuration screen. Next, choose the Login option, use the root/Default0 credentials and issue the command ifconfig to get the MAC addresses for the network interfaces if you want to do DHCP reservations over on the DC VM. You will want to add forward and reverse DNS records for the vCloud Director VM.
Once all the setup is completed, you can head over to the VC VM and use that to launch the vSphere client and point the browser towards the vCloud Director web page. If the rest of your lab is up and running, feel free to connect vCenter and start building out your provider virtual datacenter.