Playing with my vCloud Director lab lately, I have end up with a trouble adding one of my ESXi 5 hosts to my vCloud Director 1.5 due to an error installing the vCloud Director agent. I knew I have used the same host with beta install of vCloud Director before, & that could be the reason why the agent is missing up. Of course, I could have re-installed the ESXi host in 15 minutes and be back on track, but I decided to burn sometime trying to figure out how to fix it without re-installing it. I was able to achieve that by uninstalling the earlier installed vCloud Agent then Install the new vCloud Agent. Doing it in vSphere 4 & vSphere 4.1 was well document in KB2003486, but not how to manually install and uninstall the vCloud agent on vSphere 5. After digging it for a bit, below is how I have done it in case you need it.

1- Enter my ESXi 5 host into maintenance mode

2- SSH login to my ESXi host

3- Uninstall the older vCloud Agent from the host using the following command: esxcli software vib remove -n vcloud-agent

4- Copy the vCloud Agent for vSphere 5 from the vCloud Director servers found at: /opt/vmware/vcloud-director/agent/    using the following command:

scp vcloudagent-1.5.0-453916.zip root@192.168.2.254:/tmp

5- Manually install the new vCloud Director Agent on your ESXi 5  host using the below command:


esxcli software vib install – -depot /tmp/vcloudagent-1.5.0-453916.zip

Note: the above command assume the you have the vCloud Agent in /tmp

The above should do the trick if you are using ESXi 5, if you are using ESXi 4/4.1 then you can follow KB2003486 though for the completion of this article I will highlight the commands of doing it on vSphere 4/4.1 as well.

Manually installing the vCloud Director Agent on ESXi 4.1 / vSphere 4.1

After taking the host into maintenance mode.

1- Login to an SSH session to your host

2- Remove the old agent using the following command:  /opt/vmware/uninstallers/vslad-uninstall.sh

3- Copy the vCloud Agent installer found at /opt/vmware/vcloud-director/agent/  to your ESXi host using the following command:

scp vslad-install-esx41-1.0.0.67.bin root@192.168.2.254:/tmp

4- Change the permissions on the installer using:  chmod 755 vslad-install-esx41-1.0.0.67.bin

5- Install the vCloud Director Agent on your ESXi 4.1 host using the following command:

./vslad-install-esx41-1.0.0.67.bin

 

Note: In case if you have not figured it out on your own. 192.168.2.254 was my ESXi host IP, where you should substitute your ESXi host IP for it.

I hope this help you save sometime figure it out as I have already burned the couple hours this topic worth.