In VMware vCenter Server 6.0 and later, VMware recommends to use the vSphere Web Client or Service Control command-line tool to check, stop, start, or restart vCenter Server Appliance services.
Status of vCenter appliance services can be checked either from vCSA appliance shell or by using web client.
Note: To access vCSA appliance shell, same like ESXi, access to the appliance console and press Alt+F1, we can also access appliances shell over ssh using putty but for that we should have enabled ssh first and that can be done either from vCSA direct console or from web client console.
6. To view the current status of the vCenter Server Appliance services, type the command:
service-control --status
service-control --start servicename
To perform a dry run of the command, add the option --dry-run to the command, doing so will display what actions the command will run without executing the actions. For example, type the command:
service-control --stop --all --dry-run or service-control --start --all --dry-run
Reference: VMware kb# 2109887, VMware vSphere 6.5 Documention
Note: For VCSA 5.x appliance services, please refer to kb# 2054085
That's it... :)
Status of vCenter appliance services can be checked either from vCSA appliance shell or by using web client.
Note: To access vCSA appliance shell, same like ESXi, access to the appliance console and press Alt+F1, we can also access appliances shell over ssh using putty but for that we should have enabled ssh first and that can be done either from vCSA direct console or from web client console.
Listing the vCenter Server Appliance services
To list the vCenter Server Appliance services within the vSphere Web Client:
- Log in to the vSphere Web Client with a vCenter Single Sign-on administrator account.
- Navigate to Administration > Deployment > System Configuration.
- Click Nodes, select the vCenter Server Appliance node and click the Related Objects tab.
To list the vCenter Server Appliance services using the command-line:
- Log in as root through an SSH or console session on the vCenter Server Appliance.
- Run this command to enable the shell:
shell.set --enabled true - Run this command to launch the shell:
shell - Run this to change directories to /bin:
cd /bin - Run this command to list the vCenter Server Appliance services:
service-control --list
service-control --status
To check the status of any specific service, for ex. vmware-vpxd
service-control --status vmware-vpxd
To Start / Stop or Restart a vCenter Server Appliance services
To start/stop/restart the vCenter Server Appliance service using the vSphere Web Client:
- Log in to the vSphere Web Client with a vCenter Single Sign-on administrator account.
- Navigate to Administration > Deployment > System Configuration.
- Click Nodes, select the vCenter Server Appliance node and click the Related Objects tab.
- Right-click on the service you would like to start/stop/restart and select desired option.
To start the vCenter Server Appliance service if it is was stopped using the command-line:
- Log in as root through an SSH or console session on the vCenter Server Appliance.
- Run this command to enable the shell:
shell.set --enabled true - Run this command to launch the shell:
shell - Run this command to change directories to /bin:
cd /bin - Run this command to list the vCenter Server Appliance services:
service-control --list
service-control --start servicename
or
Run this command to stop a specific service:
service-control --stop servicename
service-control --stop servicename
You may also start all services by typing the command:
service-control --start --all
service-control --start --all
or
Stop all services by typing the command:
service-control --start --all
service-control --start --all
To perform a dry run of the command, add the option --dry-run to the command, doing so will display what actions the command will run without executing the actions. For example, type the command:
service-control --stop --all --dry-run or service-control --start --all --dry-run
Note: To restart a vCSA appliance server you first need to stop and then start the services as there is no restart switch via shell cmd.
Note: For VCSA 5.x appliance services, please refer to kb# 2054085
That's it... :)