postheadericon Video Guide: Taking VMware vCloud Director for a spin…and on the GO!

 

News Flash: Redwood is GA

A Quick Introduction:

I’m not going to talk about VMware vCloud Director (vCD), or how it’s a true game changer in the evolving world of Cloud Computing. I urge you to watch the VMworld 2010 opening keynote (a great presentation/demo by Paul Maritz and Steve Herrod) or check out the product page for high level information.

The first time I got my hands on the beta binaries of vCD, it took me one week (i repeat: one week) to get this beast up and running. I didn’t have at that time a hardware lab or even any guide to help me with the task. My idea was simple: I had a brand new 8GB memory laptop from VMware and I was so excited to run redwood on this PC (yes it was not a Mac and don’t ask me why!). This task took that long not because of the vCD software itself, in fact, and as you will see in this post, installing vCD takes less than 1 min! The task took so long with me because of the other dependencies for that software, to be more specific the Oracle DB (which I had absolutely no experience with it) and the SSL certificates generation!

With all that said, I’m going to be very practical in this post and help you experience this incredible product with the least requirements, whether it’s hardware or software.

Motivation!

By the end of this post you should have a virtual private cloud running on your laptop/desktop, and you should see the following screens on your monitor!

__

__

Lab Overview:

As you see in the diagram below, we will utilize here the VMware Workstation 7 for running our cloud. I prefer to use the Workstation “Team” here to organize things better and to have this one whole container should I choose to move, or share the VMs with someone else. As you see also, we have 4 base VMs running Win2k3 AD+DNS, Win2k3 64bit running Oracle 11G and vCenter 4.1 Server, CentOS5.5 64bit running the vCD, and last but not least the vESX 4.1.

The vESX host will run vShield Manager (vSM) as a nested VM. It will also run the nested cloud computers when you finish configuring your vCD.

 

What You Will Need?

Here are the downloads that you need to start with right away:

Before We Start: DNS, DNS, DNS!!

To avoid any issues during your installation and configuration, please make sure that your DNS server is up and running with all the entries for the VMs set in advance. This includes: vCD, vSM and the ESXi host. I can’t stress enough on this point!

Step1: Installing the Oracle DB (VIDEO)

First thing first. You need a backend database for all you apps. I chose to install here Oracle 11G on Windows rather than Linux for two reasons:

1 – It’s easier and there is no shame from that! Installing Oracle on Windows requires no tweaking, optimization or prerequisites. All what you need is to download the binaries and set it up. If for any reason you think that you really need to run Oracle on Linux, then I won’t leave you in the dark. Here is an excellent article detailing step by step how to do it if you are a newbie. (click here)

2 – We need to save memory. I’m assuming all the way through this article that you are having a maximum of 8GB memory on your laptop/desktop. By installing Oracle on Windows you will save a new VM because we will install vCenter on the same VM. It’s not just that, we will actually leverage that same Oracle server to host the vCenter DB. Bingo! No need for MS-SQL Express.

Now let’s install Oracle in this video and set it up to be ready for our vCloud Director and vCenter Server.

Click here for an iPod/iPad version of this video

The commands used in this video:

  • sqlplus system/oracle@localhost/cloud
  • create user cloud identified by oracle;
  • grant “RESOURCE”, “DBA”, “CONNECT” to cloud;

Step 2: Configuring vSphere 4.1 in Workstation

It’s never been easier. Workstation 7 now supports running vESX 4.x out of the box. All what you need is to download the ESXi 4.1 iso from vmware.com and then create a new VM and choose your GOS to be (VMware ESX) as shown in the screenshot below. After that you will need to install the vCenter Server 4.1 on top of the Oracle DB VM as described above. OF course you will need to setup before that the ODBC connection to the Oracle DB which is quite straight forward.

Step 3: Preparing the SSL Certificates

You will need to download the Java Development Kit (JDK) from the link provided above to your Guest OS (e.g XP or W7), and then generate the self-signed SSL certificates using the following commands:

  • “C:\Program Files (x86)\Java\jdk1.6.0_20\bin\keytool” -keystore certificates.ks -storetype JCEKS -storepass hypervizor -genkey -keyalg RSA -alias http
  • “C:\Program Files (x86)\Java\jdk1.6.0_20\bin\keytool” -keystore certificates.ks -storetype JCEKS -storepass hypervizor -genkey -keyalg RSA -alias consoleproxy
  • “C:\Program Files (x86)\Java\jdk1.6.0_20\bin\keytool” -storetype JCEKS -storepass hypervizor -keystore certificates.ks -list

Please note that the password in the example above is “hypervizor” and the output file is “certificates.ks”.

Step 4: Installing vShield Manager (VIDEO)

This is a fairly simple task and needs nothing but deploying the vShield Manager OVF package.

IMPORTANT NOTE: After Installing the vShield Manager there is one more step. You need to apply your vSM licenses to the vCenter Server. Without doing this step you will not be able to leverage the vSM in deploying the new edge devices for the different networking options in vCD.

Step 5: Installing CentOS Linux

I was going to record a video for installing CentOS linux but then i thought that it might be an overkill for this post. It’s pretty straight forward with the famous Anaconda GUI, so I expect no issues even for the Linux newbie. A few notes here:

  • I’m using here CentOS because it’s the closest distribution to RHEL. I knew later on that some of the SE in VMware are using the same for doing the labs and testing. Needless to say that this distribution is not officially supported by vCD and that everything you see in this post is *NOT* meant for production.
  • I recommend installing the complete packages to avoid downloading a lot of RPMs and going through the dependencies mess. This could be quite difficult for people new to Linux.
  • You have to install the CentOS VM with two network cards. The first will be used for the Web UI access, and the other one will be used for the vCenter proxy access.
  • After installing the CentOS i recommend disabling the embedded firewalls because it could affect some of the communications with vCenter Server and the Oracle DB. Don’t worry, you will see this option to disable the firewall at your first login.
  • You will need to upload some files to the CentOS before and after the vCD installation, this includes: the certificates.ks that we generated in the previous step. The vCD .bin package you downloaded from vmware.com. The sysprep files needed for the vApp customizations later on. Now, you can either do this the traditional way by enabling the FTP daemon (service vsftpd start) and then upload the files with your favorite client, or, on the other hand, you can use the Shared Folder in Workstation as shown in the screenshot below. I’m an old school so I always prefer using FTP and command line, but it’s your choice.

Please also note that you will need to install the VMware Tools for the CentOS to use the Shared Folder option. It’s always a good practice to install VMware Tools on all your VMs.

Step6: Installing VMware vCloud Director (VIDEO)

Are you ready to unleash the beast? Let’s do it:

Click here for an iPod/iPad version of this video

You will notice in the video that I had an issue with the path to the certificate. I’m not quite sure why this was happening, but I realized that if you put the file (certificates.ks in my case) to the vCD home folder (/opt/vmware/vcloud-director/) and then just type the file name with no leading path, the installer will accept it.

UPDATE: (Thanks to Kyle Smith, Sr.MTS @ VMware, for the following explanation)
For the certificates and any response file you need to make sure that they are in a directory that the vcloud user (created by the VCD installer) can read and the files themselves need to be readable by the vcloud user.

This means the files need to be outside of any user’s home directory (since they typically have a mode of 700).

Here is the command for “tailing” the log file for the application startup:

tail -f /opt/vmware/cloud-director/logs/vcloud-container-info.log | grep “Application Initialization”

What’s next?

Now you need to start exploring this incredible product and see if you can get your first vApp up and running in the cloud. You won’t be left alone. The front-page wizard will take you through the process step by step, starting from allocating your vCenter resources, all the way to creating your first service catalog. You can use the vCD evaluator’s guide as well to walk you through the process, but remember that this whole “cloud in a box” thing is limited by its nature and meant only for having a working vCD installation on the go with you!

I have a couple of ideas and I might be coming back soon with something like a demo-script to show you (on a deferent physical lab) a real-life example how you can leverage vCD in your private cloud journey.

Until then, Happy Clouding!

Share
  • http://infinitechaos.com Kyle Smith

    For the certificates and any response file you need to make sure that they are in a directory that the vcloud user (created by the VCD installer) can read and the files themselves need to be readable by the vcloud user.

    This means the files need to be outside of any user's home directory (since they typically have a mode of 700).

  • http://www.hypervizor.com Hany Michael

    Hi Kyle,

    Many thanks for the reply and explanation! Much appreciated!

    I will update the post in a min.

  • Pingback: VMware vCloud Director install errors and setup problems | Virtualization Tips

  • Pingback: Virtual Intelligence Briefing » VMware vCloud Director install errors and setup problems

  • Pingback: A Collection of vCloud Director Links - blog.scottlowe.org - The weblog of an IT pro specializing in virtualization, storage, and servers

  • Josh Coen

    So I've been messing with this install for a few days now and can't figure out the problem. I've reloaded centos a few times, performed all of the updates, and generated the certficates.ks file multiple times. In the vcloud-container-info log the first error I see is:
    “| Starting ActiveMQ Cell DiscoveryAgent listener. Cell UUID: ddee6eb1-dafd-42bf-a8f4-351358a83b49 |
    2010-10-03 15:51:19,490 | ERROR | VMTransport | AesEncryption | decryption failed”

    Then there is a bunch more stuff after that. Any ideas? When I did the CentOS install I chose everything except virtualization as it installed the xen kernel and I was having issues with vmware tools because of it.

  • http://www.hypervizor.com Hany Michael

    Hi,

    Not sure what is the problem you are having. Do you get an error creating the certificate, or when you try to install vCD? You’ve included what you see in the Cell logs, but didn’t mention what you see on your screen and at which step.

  • Pingback: Initial setup for VMware vCloud Director and setting up provider vDC | Virtualization Tips

  • Josh Coen

    It was after director finished installing and was initializing. It would get to 9% and then give me that error I put in my first post, from the container log.

    There was either an issue with my DB install, or because I was using Server 2008 R2 as the OS. I loaded 2003 SP2 64bit and installed oracle and director initialized without any issue. If I get time I will look to see if maybe there are some security policies that can be changed to allow it to work on 2K8 R2.

    Thanks for the awesome videos, once I started using the same platforms as you it worked like a charm.

  • http://www.hypervizor.com Hany Michael

    Hi,

    Good to hear that it worked for you :) .. from my experience, the 9% failing of vCD to initialize is mostly due to DNS issues like missing host entries ..etc

    Regards

  • Blaze

    This is awesome. I am trying to follow your instructions and they seem to be working great for me, except for one thing. I know you created a user named “cloud” and granted it DBA permissions in oracle, however what is this user's pwd. I have never worked with oracle so plz excuse me if this is a stupid question but I dont see you defining its pwd anywhere. Will it be the same pwd that we set for the sys, system accts during installation?

  • Blaze

    This is awesome. I am trying to follow your instructions and they seem to be working great for me, except for one thing. I know you created a user named “cloud” and granted it DBA permissions in oracle, however what is this user's pwd. I have never worked with oracle so plz excuse me if this is a stupid question but I dont see you defining its pwd anywhere. Will it be the same pwd that we set for the sys, system accts during installation?

  • http://www.hypervizor.com Hany Michael

    Hi Blaze,

    Thanks for the feedback, glad you are finding the guide useful :)

    With regards to the “cloud” user, the password is actually identified in the command itself:

    create user cloud identified by oracle;

    It’s “oracle” in my case here…I think I should have explained this better in my article, your question is valid :) – it’s just basic SQL statement, you create a user named “cloud” and identify it’s password by “oracle”.

    Hope this helps

  • Josh Coen

    Well I verified DNS, and I only replaced the DB server and didn't reinstall CentOS or anything else, so I believe it had something to do with Server 2008. Thanks again!

  • Simon

    Thanks for the instructions. If I want to play with the vCloud REST API, I need to get this entire thing installed right?

  • http://www.hypervizor.com Hany Michael

    Yes, that’s right. You will need to have at least this setup to get started.

    Good luck

  • Pingback: Want to know more about vCloud Director? « Trent Steele's Blog

  • Blaze

    Thank you so much. That saved the day.

  • Blaze

    Hanny one more issue that I am dealing with at the time, thanks to your post I have the lab up and running, but when I build a vApp using a template, it goes through a customization wizards that resets the Admin password to something else and locks me out. I am experiencing this with 2008 for which I didnt have to upload any sysprep files. I am having the same issue with windows 2003, I had to upload the sysprep file for this one. Not sure what it resets to, but I am locked out of the vApp that it creats. Do you what could I be doing wrong here?

  • http://www.hypervizor.com Hany Michael

    Hi,

    The password is reset as part of the GOS customization. To know the new password, you need to right click on the VM, then Properties, and then in the customization tab you will find it.

    Glad you had your lab up and running :)

  • Blaze

    Hanny,

    You are my fav resource now (this is not so good for you though lol). You have no idea I wasted two days scratching my head trying to figure this out. I went and reopned my books for sysprep did everything under the sun… gosh I wish there was some kind of warning that this would happen. So even if I have a pwd set in my sysprep.ini file, it will still auto generate. Is there a way to stop this from happening?

    Once again thank you so much :) ))))))

  • Blaze

    Thanks to you I know that before the first power on of the vApp I can uncheck the options that I dont want. But dont you thinks its kinda silly that those options are checked by default? I mean the idea is for users to be able to provision a VM and power it on, now with this they will have to make sure they uncheck certain options after the provision. I wonder if there is a way to change the default setting…

    BTW apart from my neediness.. I am loving this tool… working on it atleast 10-15 hrs a day… going nutz! Thanks Hanny! U the MAN!

  • http://www.hypervizor.com Hany Michael

    Thanks :) I’m glad you like vCD as much as I do…I really think it’s one of VMware’s most powerful products.

    Regarding your comment on the customization, I had a similar thought about that when I first started working on vCD. I will talk about this in details soon in a future blog post.

  • Wylee

    Another Oracle novice here:

    I have tried 3 different installs of Oracle 11g, following your guide, with Server 2008 and Server 2003.

    Every time I enter the command:

    sqlplus system/oracle@localhost/cloud

    I get:

    ERROR:
    ORA-01017 invalid username/password; logon deined

    I have tried unlocking ALL of the default accounts.

    I can login into the web management portal with the SYS account. What step am I missing here?

  • Wylee

    I had to create another account in order to create cloud and grant connection privileges. No idea why.

  • Pingback: Shorts: VMware vCloud Director installation tips « BasRaayman's technical diatribe

  • Pingback: Shorts: VMware vCloud Director installation tips – Gestalt IT

  • Gonul

    dont know if you have solved your problem but…
    it seems like something cocks up during the installation, you just have to tell it agian that its the “system” user that it needs to run as
    Username: system
    password: what ever you chose for it during the setup…

  • AnniMouse

    I had to do a lot of fighting with Oracle before I found your tutorial and FINALLY got VCD working. Thank you so much for this!

  • http://www.hypervizor.com Hany Michael

    Cool! glad you found it useful…

  • Tariq Shahzad

    Dear Sir

    Very nice & useful guide,
    when i configuring ssl certificate in vcd all process done but they not asking me syslog server/ host database please help me

    artiq

  • Mauricio Botero

    Thanks for the guide, I have one simple question. What made you use Oracle 11g instead of Microsoft SQL?

    Thanks in advance,
    Mauricio

  • Dex

    “After installing the CentOS i recommend disabling the embedded firewalls because it could affect some of the communications with vCenter Server and the Oracle DB. Don’t worry, you will see this option to disable the firewall at your first login.”

    I never received that option at boot.   Also, finding it near impossible to install VMware tool as a Linux n00b.  Doesn't seem like a layman's exercise.  Burned the greater part of 2 days on this so far without much to show.  Might have to break down and get one of our Linux resources to deploy I suppose!


My name is Hany Michael, Consulting Architect at VMware. I blog about various topics ranging from the core vSphere technologies all the way to the vCloud based products. (Read more)
Sponsors
Disclaimer
Any views or opinions expressed on this blog are strictly my own and not the opinions and views of my employer.