A couple weeks back I had worked on something that required me to shutdown all the vCenter Server Services on a VCSA (vCenter Server Appliance). There is no high level service that can be stopped which would properly shutdown all the different services in the appropriate order. Luckily, one can easily derive the start and stop order by just taking a look at the runlevel scripts (S* for start and K* for Kill scripts). I have extracted the order in which the vCenter Server Services must be stopped and started which is shown below:
Stop Order:
- vmcad
- vmdird
- vmkdcd
- vmware-inventoryservice
- vmware-logbrowser
- vmware-netdumper
- vmware-vpxd
- vsphere-client
- vmware-stsd
- vmware-sts-idmd
Start Order:
- vmcad
- vmdird
- vmkdcd
- vmware-netdumper
- vmware-sts-idmd
- vmware-stsd
- vmware-inventoryservice
- vmware-logbrowser
- vmware-vpxd
- vsphere-client
Note: Although I mention the VCSA, the ordering also applies to a vCenter Server for Windows which has the exact same services.
Here is a simple shell script snippet that can be used to stop all vCenter Server Services in the appropriate order:
VMWARE_SERVICE_STOP=( vmcad vmdird vmkdcd vmware-inventoryservice vmware-logbrowser vmware-netdumper vmware-vpxd vsphere-client vmware-stsd vmware-sts-idmd ) for i in ${VMWARE_SERVICE_STOP[@]}; do /etc/init.d/$i stop done }
Here is a simple shell script snippet that can be used to start all vCenter Server Services in the appropriate order:
VMWARE_SERVICE_START=( vmcad vmdird vmkdcd vmware-netdumper vmware-sts-idmd vmware-stsd vmware-inventoryservice vmware-logbrowser vmware-vpxd vsphere-client ) for i in ${VMWARE_SERVICE_START[@]}; do /etc/init.d/$i start done
Johncee says
thats cool, did you write that script for the appliance specifically? can it be used on other appliances?
William Lam says
The snippet is specifically for VCSA, however you could use the base to start/stop other services for other VMware Appliances or even just Linux systems in general as it's just the service name
JohnnyMac says
Here is the same thing in a one-liner (no need to create a script):
Stopping services in the correct order:
$ ls /etc/init.d/ | grep 'vmcad\|vmdird\|vmkdcd\|vmware-inventoryservice\|vmware-logbrowser\|vmware-netdumper\|vmware-vpxd\|vsphere-client\|vmware-stsd\|vmware-sts-idmd' | while read line ; do service "$line" stop ; done
Starting services in the correct order:
$ ls /etc/init.d/ | grep 'vmcad\|vmdird\|vmkdcd\|vmware-inventoryservice\|vmware-logbrowser\|vmware-netdumper\|vmware-vpxd\|vsphere-client\|vmware-stsd\|vmware-sts-idmd' | while read line ; do service "$line" start ; done
William Lam says
Thanks for the contribution, definitely several ways 🙂 I figured this would be easy enough to read for most folks.
JohnnyMac says
Correction - starting services in the correct order is as follows:
ls /etc/init.d/ | grep 'vmcad\|vmdird\|vmkdcd\|vmware-netdumper\|vmware-sts-idmd\|vmware-stsd\|vmware-inventoryservice\vmware-logbrowser\|vmware-vpxd\|vsphere-client' while read line ; do service "$line" start ; done
Michel Escher says
It would be nice to have an updated version of this post for VCSA 6.0. Thanks.
William Lam says
This is officially documented in this VMware KB - kb.vmware.com/kb/2054085
Jau-Ling Chou says
That KB article does not mention anything about order unfortunately. Its also specifically for vCenter/VCSA 5.x
Sai Krishna says
how to find start order of vcsa 6.5 services and its dependencies.. Please tell how to verify the same by analysing scripts..
trying to figure out start of on services on external psc and embedded psc vcsa machine's