I was just building a vCD Lab and thought I would document the process. I know Hany has done something similar recently but mine is slightly different. I wanted to have a slim config from a memory perspective and virtual machine count perspective. Before I start, let’s give a warning… ***this is totally unsupported***
Pre-requisites:
- CentOS 5 – 64 Bit
- Oracle 10g Express
- Windows 2008 – 64 Bit
- ESXi 4.1
- vCenter 4.1
- vCD 1.0
- vShield 4.1
We will be creating multiple VMs but for the sake of simplicity will be combining functionality where possible. First you will need to install multiple ESXi hosts and a vCenter server. I am assuming all of you know how to do this so I won’t go into detail here. If you don’t drop me a comment. I did list some of the recommendations/requirements:
vCenter / DNS / ESXi
- Create a VM with 1 vCPU and 1 GB of memory. I used a 20GB thin disk, which should be more than sufficient as we will not be using VUM.
- Connect the Windows 2008 – 64 Bit ISO and walk through the standard installation process. I will not describe every step, as all of you should be able to install an OS. However the following is recommended:
- Fixed IP Address
- I changed the host name to “vcenter”
- Install DNS
- pre-populate DNS with records for your two esxi hosts, vShield Manager and your vCD server.
- I will not tell you how to install ESXi or vCenter for that matter. Just ensure you have two ESXi hosts with shared storage in a DRS enabled cluster, those are the requirements. Preferably with some memory resource. I gave both my ESXi hosts 3GB. There are a couple of options for shared storage:
- You could use Openfiler as your iSCSI target for ESXi hosts (preferred), if you don’t know how to set it up read this excellent this article by Kiwi_Si.
- You could enable NFS on your CentOS which also hosts your vCD and Oracle database
- If you are using VMware Workstation enable “clustering” of disks… I haven’t tested this in a while though.
Result: vCenter Server, 1 Cluster containing at least 2 ESXi hosts with DRS enabled.
vShield Manager
You could run vShield Manager as a VM within your virtualized ESXi host, but from a performance perspective that is probably not the smartest thing to do. So we are going to import it into Fusion. For those using Windows VMware Workstation is also fine, or even Player.
I guess this is the most tricky part of the whole setup, you will need to convert the vShield OVA to a VM. Now this is not a must, you can also run the vShield on your virtual ESXi hosts, but I like to avoid this for performance reasons. So this is how I converted it:
- Go to the folder which contains the OVA and go into the OVA and copy all files included into a separate folder
- Download the OVF Tool to convert the vShield Manager OVF Files to a format that Fusion supports
- Open a terminal window and “cd” to the folder which contains “VMware-ovftool-2.0.1-260188-mac.i386.sh”
- Make the script executable by typing the following:
chmod +x VMware-ovftool-2.0.1-260188-mac.i386.sh - Run the installer script by typing the following:
./VMware-ovftool-2.0.1-260188-mac.i386.sh - Confirm the installation with “yes”
- Accept the EULA with “yes”
- Confirm the path by pressing enter/return
- The install should complete literally within seconds
- Go to the folder that contains the “OVF” file and type the following:
/opt/vmware/ovftool/ovftool.bin “VSM.ovf” . - Accept the EULA by typing “yes”
- The conversion should now start and when it is completed a new folder should be created which contains your VMX file and your VMDK files. These can be imported into Fusion.
- Copy the VSM Folder to the place you store your local VMs and open the VM within Fusion and fire it up
- Now that you have VSM running on your Laptop/Macbook you will need to configure it. These steps are pretty straight forward, but they will need to happen in order for VSM to function correctly:
- Open the vShield Manager console and login with user “admin” and password “default”
- Type “enable”, enter the password “default” again and type “setup” to configure your VSM
- Enter your IP, Subnet, Gateway and DNS details and exit to ensure these are active
- That is it! Now you can use your internet browser to see if you can login to your VSM “https://<ipaddress”
Result: vShield Manager running within Fusion.
vCD VM
- Create a VM with 1 vCPU and 1 GB of memory. I used a 20GB thin disk, which should be more than sufficient.
- Connect the CentOS 5 – 64 Bit ISO and walk through the standard installation process. I will not describe every step, as all of you should be able to install an OS. However the following is recommended:
- Default partitioning scheme
- Fixed IP Address
- Disable IP v6
- Server GUI install
- After the install is done you will need to reboot the VM and configure the OS. I recommend the following:
- Disable the Firewall
- Disable SELinux
- Enable NTP
- Create an additional user
- Now that the VM has rebooted again we will need to upgrade all packages to the latest version and install VMware Tools all the required packages:
- Install VMware Tools (extract the files from the archive and run the installer via a terminal window by going to the path where you extracted it and type:
./vmware-install.sh
use all the default settings - Open a terminal window and type the following:
yum update
yum upgrade - Now install all the Oracle and vCD required packages:
yum install alsa-lib bash chkconfig compat-libcom_err coreutils findutils glibc grep initscripts krb5-libs libgcc libICE libSM libstdc libX11 libXau libXdmcp libXext libXi libXt libXtst module-init-tools net-tools pciutils procps sed tar which
- Install VMware Tools (extract the files from the archive and run the installer via a terminal window by going to the path where you extracted it and type:
- Install Oracle 10g Express (again note that this isn’t officially supported):
- Copy the Oracle RPM file to your vCD VM
- Open a terminal window and go to the path where you copied the Oracle RPM file
- rpm -i oracle-xe-10.2.0.1-1.0.i386.rpm
- /etc/init.d/oracle-xe configure
- Use the default ports (8080 and 1521)
- Enter the password twice
- Select “y” to ensure the database daemon is started when the VM restarts
- After the Oracle 10g Express server has been installed test if you can actually access it by opening a web browser. Try http://<ipaddress>:8080/apex
- I would recommend to create a new user for the vCD environment:
- Click “Administration”
- Go to “Database Users” and click “Create User”
- I would recommend to give it the name “vcloud” and an easy to remember password. Also make sure you tick the “DBA” tick box.
- Click “Create”
- Now it is time to install vCD (copy the bin file to your vCD VM)
- First we need to create a virtual interface so that we have two IP addresses that vCD can use. Of course you can also add a second NIC, but I use this method to keep the VM configuration as simple as I possibly can:
- Open a terminal windows and type the following:
nano /etc/sysconfig/network-scripts/ifcfg-eth0:1 - Add the following to the file you just opened, of course add the approriate IP address and net mask!
BOOTPROTO=static
DEVICE=eth0:1
IPADDR=<ip address>
NETMASK=<net mask>
ONBOOT=yes - Save the file and restart the network by typing the following:
service network restart - When you do an “ifconfig” it should show you two devices…
- Open a terminal windows and type the following:
- Open a terminal window and go to the path where you copied the vCD BIN file and make the bin file executable:
chmod +x vmware-cloud-director-1.0.0-285979.bin - type the following to do the install
./vmware-cloud-director-1.0.0-285979.bin - It will ask you if you want to run the installer on an unsupported distro, type “y”
- It will ask you if you want to run the configuration script, type “n”
- Next we will create self signed certificates, open a terminal window and do the following:
- Go to /etc and copy and paste the following:
/opt/vmware/cloud-director/jre/bin/keytool -keystore certificates.ks -storetype JCEKS -storepass password -genkey -keyalg RSA -alias http -dname “cn=vcloud, ou=vmware, o=vmware, c=US” -keypass password
/opt/vmware/cloud-director/jre/bin/keytool -keystore certificates.ks -storetype JCEKS -storepass password -genkey -keyalg RSA -alias consoleproxy -dname “cn=vcloud, ou=vmware, o=vmware, c=US” -keypass password - Now you should have a file called “certificates.ks” in /etc
- Next we will need to configure vCD, type the following to start the configuration:
/opt/vmware/cloud-director/bin/configure
- Select your first IP address, this will be the IP address which is used for vCD Portal access
- Select your second IP address, this will be the IP address which is used for the VM Remote Console
- Type the path to your certificates store, which is “/etc/certificates.ks
- Type the password, which is password
- Press enter to skip the “syslog server”
- Enter the host (or IP address) for the database
127.0.0.1 - Press enter/return to use default database port (1521)
- Type the database service name
xe - Type the database username, in my case:
vcloud - Type the database password, in my case:
vmware - Now the database will be initialized and the vCD install will be completed
- Type “y” to start the vCD service
- You can monitor the progress of the vCD service start up as follows
tail -f /opt/vmware/cloud-director/log/cell.log - It will show you the percentage of the initialization of the application that has completed. Of course it should say “Application Initialization: Complete. Server is ready in” at some point.
- First we need to create a virtual interface so that we have two IP addresses that vCD can use. Of course you can also add a second NIC, but I use this method to keep the VM configuration as simple as I possibly can:
Result: VM with both Oracle 10g Express and vCloud Director 1.0.
Final Steps
That is it for the command-line stuff… All we need to do now is configure vCD through the web interface… here we go:
- Open a browser and point it to “https://<vCloud Director Address>/cloud/
- Click “Next” on the welcome screen
- “Accept” the License Agreement
- Type your license key and click “Next”
- Create an Administrator account and type a password and click “Next”
- Give the system a name, I called it “vCD”, and click “Next”
- Review your settings and click “Finish” if they look okay
Now you should be presented with the following screen and you should be good to go!
So what’s next? Hany has listed a nice set of videos in his article that will describe how to create a Provider vDC, how to attach a vCenter server etc. Go ahead play around, have fun… enjoy the vCloud!
kopper says
nice article
I’d would like to know what is your laptop configuration? memory, #Procs…
thanks
alan says
hi
really nice guide. congrstulation.
i’d like just to know if vShild is mandatory?
thx
Duncan Epping says
1) yes vShield is mandatory
2) Macbook Pro i7 with 8GB, and an i7 desktop with 12GB. I will verify how much free mem i have tomorrow when all VMs are running…
stoz says
Today i’ve started with similar setup on windows 7 64, i’ve only 4 GB of RAM, will add 16 GB ReadyBoost tomorrow. I will let you note if any progress.
Andrew Miller says
I’ve frankly wondered at times if Parallels Desktop would make more sense for some of this stuff as it only pulls memory from the Mac as the VM needs it (sorry for speaking heresy ;-)….I just really with Fusion wouldn’t hard allocate all memory up front).
But….knowing how much free memory you have with all this runnin would be very helpful…
stoz says
Currently struggling with vshield manager. Import to workstation 7.1 goes fine but setup is not working, somehow network interface is not recognized. Guess Fusion handles things better than workstation. Still trying.
Duncan Epping says
try changing the NIC to E1000. That should do the trick!
stoz says
thanks Duncan, but it seems like you cannot choose which type of NIC you have under Vmware workstation. At least it looks so at first glance.
Duncan Epping says
you need to edit the vmx directly to do that.
stoz says
i’ve figured that one out. Nic was already E1000. tried them all, no one works. Seems like dead end here.
Duncan Epping says
you could always import it into ESX through vCenter, although it will not be fast at least it will work.
stoz says
yeah, and get a speed king 🙂
Anthony says
Hi, I have the same problem :/ CentOS 5.5 x64 on ESX 4.0 i tried flexible,E1000 and vmxnet 3.
“VMware Cloud Director requires at least two IPv4 addresses in order to
operate.”
I tried with 1 nic and virtual interface, 2 nic, 3 nic and 4 nic.
Every time it failed 🙁
How do you manage to make it works ?! 🙂
Anyway tkx for your tutorial 🙂
Anthony says
Here is the solution that i found 😉
I just reinstall CentOS from the begining with 2 nic card (E1000) and now it works !! changing the nic card type after the installation did not work (in my case).
Tkx again for your clear tutorial !! 🙂
kris says
I am getting this error when I open remote console
” Unable to connect to the MKS: Connection terminated by server , ret -1 err o. “
kris says
Above error was gone after a reboot. But I been getting this sometime when I launch the remote console “Error opening the remote virtual machine \vm-814: An internal error occured.”
stoz says
Problem finally solved. Just got myself a brand new beast. Still doing machine setup but it looks fine so far. Six-Core Phenom with 8 Gigs 🙂
bhanukiran says
Everything went perfectly with only issue with generating the certificate where it was throwing a java.execption.So tried without “-dname “cn=vcloud, ou=vmware, o=vmware, c=US”” and manually entered the CN and other values.
/opt/vmware/cloud-director/jre/bin/keytool -keystore certificates.ks -storetype JCEKS -storepass password -genkey -keyalg RSA -alias http -keypass password
And flashplayer was not installed on the CENTOS box so had to install that.
Thanks for your post Duncan.
Just wanted to post about memory utlization of vmware workstation on windows that the memory is not fully allocation, it does the same way as on ESX utilize only as much memory as required for the VMs.
kris says
HI,
Am getting below error once i login to vcloud director after a minnute or so.
Cannot open connection
– Listener refused the connection with the following error:
ORA-12516, TNS:listener could not find available handler with matching protocol stack
Anyone see this issue ?
AshokV says
HI,
first of all Thanks for the simlyifing the steps to install VCloud. my problem is, i was able to complete the installation sucesful without any errors but when i try to access the url it throws an below mentioned error.
Error 404 – Not Found
No context on this server matched or handled this request,
Context know to this server are:
tried reinstalling VCD couple of times.
please guide me how to go about this
Duncan says
which url are you using? did you check the log files?
Barry says
I can’t make this work.
Everything seems fine until configuring the director to connect to the database
Connecting to the database: jdbc:oracle:thin:@127.0.0.1:1521/xe
Could not connect to database. Please reenter.
I get this is the debug log
2011-02-14 21:54:42,267 | ERROR | main | ConfigAgent | Could not connect to database: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found
Roger says
Hi Duncan,
Got it all working! No troubles at all. Thank you!
Kind regards,
Roger
Kent Livingston says
Your setup notes were great! That really helped speed up our testing setup for vCloud Director. I do have one question on your setup. Is it required to have two ESXi hosts with shared storage in a DRS enabled cluster to simply use vCD?
Duncan Epping says
Yes, DRS is a requirement. Single node cluster would also work, but doesn’t make a lot of sense does it.
Phil says
Hi Duncan,
Instead of using the OVF tool to change vSM to run on Fusion, I just imported the vSM ovf into vCenter. Then, I used the datastore browser to copy the files – through a shared folder – to my Mac. You end up with a ready to run vSM without having to use the OVF tool.
HTH
Phil Callahan
Chakrit says
Thank you, it worked brilliantly! vCD 1.0.1-356485 appears to be using “-genkeypair” for keytool.
Ranvir says
Hello Duncan,
thanks for such a nice article.
I have setup my vcloud director lab and installed vcloud director.It was working fine last week but then i had to reboot vcloud director host VM for some reason ,since then i am not able to access vcloud director host via web ( tried to solve the prob and re-installed 2-3 times) but no success and below are cell logs with error
——————————————————-
Successfully bound network port: 443 on host address: 10.20.30.28
Application Initialization: 9% complete. Subsystem ‘com.vmware.vcloud.common.core’ started
Successfully connected to database: jdbc:oracle:thin:@10.20.30.24:1521/vcloud
Successfully bound network port: 443 on host address: 10.20.30.26
Successfully bound network port: 61616 on host address: 10.20.30.28
Successfully bound network port: 61613 on host address: 10.20.30.28
Uncaught Exception. Originating thread: Thread[SpringOsgiExtenderThread-11,5,spring-osgi-extender[4a57ea52]-threads]. Message: Error creating bean with name ‘hibernateCacheRegions’: Cannot create inner bean ‘org.springframework.cache.ehcache.EhCacheFactoryBean#8071a97’ of type [org.springframework.cache.ehcache.EhCacheFactoryBean] while setting bean property ‘sourceList’ with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.cache.ehcache.EhCacheFactoryBean#8071a97’ defined in URL [bundleentry://159/META-INF/spring/common-persist-context-cache.xml]: Cannot resolve reference to bean ‘cacheManager’ while setting bean property ‘cacheManager’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘cacheManager’ defined in URL [bundleentry://159/META-INF/spring/common-persist-context.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Problem creating connections: Error decrypting data.
Application shutdown event: Beginning
*DEBUG* Scheduling task Thread[Configuration Updater,5,main]
Application shutdown event: Application stop requested. Shutting down.
——————————————–
service vmware-vcd status
vmware-vcd-watchdog is running
vmware-vcd-cell is dead, but pidfile exists
———————————————–
Sorry if its not the right place to post a query but any help would be really appreciable.
Scott says
Awesome article. I had one problem with the VCD install though that I would like to share. Connecting to the Oracle DB service XE, on my CentOS install, i would consistently fail, no matter what I put in for credentials and IP address. Further investigation into the logs (/opt/vmware/cloud-director/logs/vcloud-container-debug.log) found the error “ORA-01882: timezone region not found” Turns out that if you live in some of the more rural parts of the US, away from all the big cities, and you choose a small town for your timezone, JDBC will not connect. Once I chose “Chicago/CDT” as my timezone, the install proceeded without error.
Michael Dickinson says
Hi,
Great article, but perhaps someone else has come across this issue. When attempting to install the pre-requisites for vCD, yum tells me that there is no libstdc package available. Googling around for it leads me to lost of libstdc++ libraries, but I don’t want to install the wrong package. Do I need to add specific repositories for libstdc?
Any help would be much appreciated.
Regards,
Michael
mike p says
Can you please send me a link that will help me get ESXi and VC installed on my mac. Thanks.
Confucius Say says
vCD VM
Create a VM with 1 vCPU and 1 GB of memory. I used a 20GB thin disk, which should be more than sufficient.
To run VCD && Oracle 11g? Could this still hold true?