Advanced Guide: VMware vCloud Director in a Box (works on 4GB Laptops)

I’ve been getting a good feedback since I published my first guide for running vCD on a Laptop. The only problem was the requirement for an 8GB to run these loads of VMs required by vCD. Since then, I’ve been asked by a lot of people (colleagues, readers and even a customer) if it’s possible to have the same setup on a 4GB laptop, and the answer is: Yes, absolutely.

I was actually spoiled with my 8GB Laptop from VMware when I published my first guide, and I didn’t realize that many of us still use 4GB or even 2GB memory on their machines. With that said, I rethought the whole thing and came up with a slim (yet very powerful) setup to do a vCD lab on your laptops/desktops. So, without further ado let’s get started!


I’m assuming here that you are comfortable dealing with Linux. This is not an expert guide, but it’s not a beginner one either. I assume that you know how to install Linux and work with it from an intermediate level. I won’t be as thorough as i was in the first guide, and i won’t be publishing Videos or Screenshots. I will try to keep the balance between having a simple/short post yet without compromising the overall understanding of how things are done. If for any reason I failed to do that in any part, you can always drop a comment or send me an email to expand on it.

CentOS For The Win!

So, the first thing you will need is to get the CentOS 64bit iso and burn it on a DVD. After that, and depending on the base OS on your machine, you will need to have a separate partition for running CentOS as a bare metal operating system.

In my case, i have a Windows 7 64bit running on an 80GB SSD drive, and a secondary 500GB one running in the CD-ROM bay. In W7 you can shrink your current partition on the fly without messing with your filesystem. You just need to right-click on it, and then press on shrink. It’s recommended to defrag your OS first before doing that to keep things at best performance and also to guarantee the maximum space you can achieve after shrinking.

As you see in the screenshot above, i’ve shrink the SSD drive to free up 12GB of space on it. I will use this for storing the VM files and consequently have the best performance for them. Depending on your setup, you can instead use this partition for your base Linux OS. For me I thought the VMs will need the performance rather than the base CentOS, especially that the latter is running natively on the laptop hardware.

Next, I freed up 30GB from the 500GB drive to use for the CentOS base OS. The boot partition will be created automatically for you during the CentOS installation.

When you reach the Boot part in Linux installation, make sure to choose the Windows 7 as your default boot rather than Linux to avoid the hassle of accidently booting into Linux when you power on the Laptop for normal day-to-day use.

Installing VMware Workstation 7.1 for Linux

Now that you’ve installed Linux on your laptop, we will need to first install VMware Workstation 7.1. Fairly easy step, download and run the package to get the GUI installation wizard. After finishing this step the WS will create two virtual interfaces, one of which is the “Host-only” interface in which we are interested in. We’ll come to that point in a bit.

Installing Oracle DB on CentOS

Thanks to Duncan Epping for the tip, installing Oracle on Linux has never been easier. You just need to download Oracle Express, install the RPM and you are done. It’s just as simple as this. Just make sure you follow the instructions on the screen as there is a command you need to run as root.

Preparing CentOS for running vCD

As you know, vCD requires two Ethernet interfaces in the installation. Since you are running this system on a Laptop, you are actually limited to only one LAN interface (and probably the wireless won’t work or need a hell of configuration). We have two cool options here:

  • Create a sub-interface in Linux. This option makes sense if your Laptop/Desktop is hooked up to a network all the time.
  • Use the Host-only virtual interface created by Workstation. I’m more in favor of this option as it allows me to run vCD while on the road. In fact, this is the whole idea of having this setup running on my laptop.

For option number two, we will use the physical Ethernet interface on the laptop for the HTTP Proxy, and the Host-only virtual interface for the Remote console proxy (connected back to vCenter).

Next, we need to have a working DNS on our Linux. Bind is the perfect solution here, just google something like “configuring bind on centos” for a detailed guide. After you have it up and running, make sure to put the DNS entries for vCD, vCenter, vSM and ESX. It’s very important to have a working DNS service in your environment to avoid a lot of problems later on. If you don’t feel comfortable with Bind on Linux, you can install a DNS service on the vCenter VM later on, but i recommend having all your services on your base CentOS operating system to save memory and keep things clean and simple.

Installing vCD on CentOS

Now it’s time to install vCD on our base Linux system. You can check out my video guide for that, but a couple of notes here:

  • Make sure that you choose the Host-only virtual interface for the Console Proxy.
  • In the DB configuration, put “xe” as the database name.

Creating a Workstation Team for Installing vCenter and ESX

Did you notice that up this point we have not created one single VM? Well, now its the time. You have to install here two VMs, the first for the vCenter Server on Windows 2003 64bit, and the second for ESXi 4.1. Make sure you configure the networking on both VMs on the Host-only network and to set static IPs from that subnet. Needless to say that they must match the DNS entries you created earlier. The last thing needed here is to import the vSM into your ESXi as a nested VM and you are done.

Alright, so now that we have everything in place (with only 2 VMs in Workstation and a nested VM in ESX) we will need to fire up our browser in CentOS and point it to the vCD portal. Once there, you will need to finish the initial configuration (licensing and system id name), and then attached the vCenter Server + vSM to your vCD. Once this is done, you can power off your vSM and leave it as it is until you come later on to the point where you need to do your cloud networking (e.g. create network pools).

Congrats! you now have a fully working vCD setup on your laptop with 4GB memory. In fact, you can theoretically have 2GB only and work fine if you keep all your VMs down just to show the vCD interface to your customers. That’s right, you don’t need vCenter or ESX in order to login to your vCD portal and browse through it. I found this very handy when sitting with a customer who just wanted to have the look and feel of this “vCloud thing” as per his words!

Do you have 8GB Laptop? GO WILD!

So now that we’ve seen how you can run all that on 4GB, what if you actually have 8GB memory? Here are some ideas:

  • Configure NFS on your CentOS and use it as a shared storage!
  • Create and install another ESX VM and use the NFS as a shared storage.
  • Create and install a CentOS VM to run a second vCD Cell and test how a two-cell environment works!
  • Create and install a second vCenter Server VM and attache it to your vCD.

Have fun!

Share Button