Save to My DOJO
In days gone by, managing vCenter services was exclusively carried out using the Windows services console unless you were one of the few who took the plunge and deployed vCSA. With every major release of vSphere there’s always some change, however minor, to the component architecture of vCenter Server. This is often reflected by a change in the number of services and/or processes comprising the core of vCenter.
One example that springs first to mind is the introduction of the Platform Services Controller (PSC) in vSphere 6.0. More recently, vSphere 6.5 introduced the VMware Service Lifecycle Manager (vmware-vmon) which is the parent process for all vCenter Server services and some PSC services. Incidentally, this is the reason why you will see fewer services listed on vCenter Server for Windows 6.5 apart from the fact that most of them are no longer registered with the service control manager.
Figures 1a-c, list the services related to vCenter and some of its components for vSphere versions 5.x to 6.5. As can be seen, these keep changing with every major release of vSphere.
In today’s post, I’ll show you how to properly stop, start and restart vCenter 6.x services using the service-control command-line tool and the vSphere Web Client. This applies to both vCenter Server for Windows and vCenter Server Appliance. Additionally, you can use the vmon-cli command line tool on vCSA as I’ll explain later on.
Method 1: The Service-Control Tool
The service-control tool is the method recommended by VMware when it comes to managing vCenter Services. The exact location of the service-control executable varies according to the vCenter version you’re running i.e. vCSA or the Windows version.
On Windows, the path to the tool is C:\Program Files\VMware\vCenter Server\bin as shown in Fig. 2a.
On the appliance version, the path is /usr/bin/ as per Fig. 2b.
The parameters specified for service-control are listed in Figure 3.
In the following video, I demonstrate how to list running and stopped services on vCenter Server as well as starting the vmcam service (Authentication Proxy) using the –start parameter. As always, you’ll need to SSH to vCSA using something like putty or similar. Log in as root and type shell at the command prompt to change over to the bash shell.
Method 2: The vmon-cli Tool
vSphere 6.5 introduces one more tool called vmon-cli which, like service-control, allows you to manage services pertaining to vCenter. From what I gather, this tool is available only on the appliance version of vCenter. I was unable to find any related official documentation so I am not 100% sure how this tool differs from service-control and whether or not there is a Windows counterpart. Credit goes to this article and author for bringing the tool to my attention.
Compared to service-control, the tool provides some extra options such as the ability to restart a service using the restart parameter as well as changing a service’s startup type via the update and starttype parameters.
The path to the tool is /usr/lib/vmware-vmon which needs to be executed from the parent folder using ./vmon-cli since the folder is not referenced by $PATH. If you wish to run vmon-cli independently of the current folder, do the following:
PATH=$PATH:/usr/lib/vmware-vmon export PATH
As an example, let’s say you’d need to restart the vCenter Server service (vpxd) including any dependencies. As per Figure 5 you would run the following:
cd /usr/lib/vmware-vmon ./vmon-cli -r vpxd
Method 3: Using the vSphere Web Client
Assuming that the vSphere Web Client service (vpshere-client) is still up and running, you should be able to use it to manage vCenter services.
As shown in Figure 6, click on the Home (1) icon at the top of the screen and select System Configuration (2) from Navigator. Click on Services (3) and highlight a service you wish to manage. Right-clicking on the selected service allows you to restart, start or stop it. In addition, you can change the startup type as well as the service’s settings wherever applicable.
The System Configuration window also provides a holistic view of the health status of all services running on the currently selected node (vCenter Server instance). Figure 7 shows how my test node is running 23 services in total, all of which are in good health. A further 4, as listed next to Not applicable under Services Health, are services that are currently disabled or in a stopped state.
This wraps up today’s post on how to manage vCenter 6.x services using the service-control and vmon-cli command line tools and the vSphere Web client. If you have any questions or suggestions just drop me a comment in the box below.
[the_ad id=”4738″][the_ad id=”4796″]
Not a DOJO Member yet?
Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!