This was a question I received on Twitter from Christopher Wells this morning asking if it was possible to re-initialize the vCloud Director Appliance. This was not something I had done before nor had a need for. I normally deploy multiple vCD appliances in my lab for various testing without any issues. Though, Christopher does bring up an interesting use case for reinitializing an existing vCD appliance so you do not have to redeploy.
When you first power on the vCD appliance after the initial deployment and you watch the remote console as the system boots up, you will notice that vCD is actually being configured just like you would if you were to manually install the vCD binary. This gave me an idea that it just “might” be possible to re-initialize vCD if I can figure how the setup works. After a few minutes of searching in the appliance, I found an interesting script called /opt/vmware/etc/isv/firstboot and as the name suggests, it is a script that is executed upon first boot up of the vCD appliance and this is what setups and configures vCD.
Disclaimer: This is for informational/educational purposes only.
To re-initialize an existing vCD appliance that has already been deployed, you will need to first ensure the vCD service is not running. To stop the service, run the following command:
1 |
<strong><em>service vmware-vcd stop</em></strong> |
Before proceeding to the next step, anything you have configured in vCD will be destroyed after the re-initialization. After stopping the vCD service, to re-initialize the vCD appliance run the following command:
1 |
<em><strong>/opt/vmware/etc/isv/firstboot</strong></em> |
This will execute the firstboot script and it will go through the configuration process as if you were to deploy a new vCD appliance. Once the setup is complete, you should be able to open a web browser to your vCD instance and you should be prompted to run through the initial setup of vCD as shown in the screenshot below.
Note: This can take a few minutes and if the web page does not load, you may need to reboot the vCD appliance which I have seen at least once while going through this setup.
This trick may come in handy in my lab as well (without having to rely on snapshots), so thanks to Christopher for bringing this up today!
Get notification of new blog postings and more by following lamw on Twitter: @lamw