In my previous article “vCloud Director Howto: Load balancing with free pfSense” I’ve introduced the multi cell architecture of VMware vCloud Director (vCD). A multi cell vCD environment gives you two advantages: availability and performance:
- Availability: If a cell shuts down (expected or unexpected), you have other cells available that can process requests from the cloud users.
- Performance: More cells can process more load, quite obvious I think :).
The question is, how to properly shutdown a cell?
This question was already answered in a nice article by Chris Colotti and this VMware KB article. The trick is to use the cell-management-tool, which is available on your vCD cells. It’s located in /opt/vmware/vcloud-director/bin. I will provide some additional information on top of these two articles.
If you want to shut down a cell, first run the following command:
/opt/vmware/vcloud-director/bin/cell-management-tool -u admin -p p@ssword cell -q true
This will actually quiesce your cell, which means that all running jobs will be finished but no new jobs are allowed on the selected cell. You can check the number of running tasks on your cell with:
/opt/vmware/vcloud-director/bin/cell-management-tool -u admin -p p@ssword cell -t
Quiesce your cell has nothing to do with the availability of the vCD web-interface! The interface will still be available, but new jobs will be redirected to other cells. If the cell is responsible for the connection with the vCenter Server (there’s just one cell ‘talking’ to your vCenter Server), it will remain connected. You can check which vCD cell is connected to the vCenter in vCloud Director:
In this case the first cell is still connected to the vCenter Server (forget the incorrect localhost.localdomain hostname, it’s a small misconfig in the lab), although I’ve already quiesced this cell. A ‘netstat -a | grep vcenter’ reveals the connectivity with the vCenter server from this cell:
Okay, let’s now shutdown the cell using:
/opt/vmware/vcloud-director/bin/cell-management-tool -u admin -p p@ssword cell --shutdown
Instead of –shutdown, you can also use -s…my personal experience is that this was not working. The option –shutdown really stopped the cell. If the cell you are shutting down was responsible for the vCenter connection, than the responsibility for this task will be transferred to another server! This can take a little time.
After a short while you will see the cell is not available anymore, a “/etc/init.d/vmware-vcd status” command will reveal that both the vCD vmware-vcd-watchdog and vmware-vcd-cell service are stopped.
Now you can safely reboot your cell or whatever you’re planning to do. After a reboot your vCD cell will automatically start the vCD services. If you want to start the services manually just run “/etc/init.d/vmware-vcd start”. Keep in mind the starting the vCD services can take a couple of minutes, use “tail -f /opt/vmware/vcloud-director/logs/cell.log” to monitor the startup process! This really gives you insight information on the vCD startup process.