News Stay informed about the latest enterprise technology news and product updates.

Managing VirtualCenter2 Management Service (vpxd) failures

The VirtualCenter2 management service (vpxd) is not very robust. If it cannot connect to the back-end database, the service will halt. It *should* continue to run, periodically trying to connect to the database, but this is not the case. There are also problems with the service coming up before the network when the server boots, causing the service to halt upon start. IPSec SA token mismatch/renewal issues also cause the service to halt. The vpxd service is very important — it manages DRS, collects performance statistics, and allows users to manage their VMs. This is a service that should be a lot more capable of handling foreseeable circumstances. To that end I have written a script that can be used to restart the vpxd service in case it halts or fails to start. This script can be linked to an often underutilized feature of Windows — the ability for the Service Control Manager (SCM) to restart a service upon failure.

The script is fairly basic. I will not post it in its entirety in this blog because its formatting will get munged by WordPress’ draconian style settings. You can download the script from

A description of the script can be found in the script’s source, “This script will attempt to start the vpxd service if it is not started. If the serivce is already started or it starts successfully the first time no further action is taken. This script can also be run upon a VCMS failure. It will notify a specified e-mail address of the failure. It will check the connection to the VCMS database. If the database connection is valid then the script will start the VCMS service. If the connection is not valid then the script will go into a loop, attempting to restart the VCMS service every specified number of minutes. This script assumes your VC database is on a SQL server. If it is not then please see for a good reference on how to build an ADO connection string to fit your needs.”

In addition to using this script to correct a vpxd service failure, it can also be run as a scheduled task, set to run 5 minutes after the server boots. This can correct the problem of the vpxd service not starting successfully on boot because it comes up before the network is available.

I hope this script helps to make your VMware VirtualCenter2 Management Server a little more robust, and a lot more script-diddly-licious!

Join the conversation


Send me notifications when other members comment.

Please create a username to comment.

Thanks for the great tip. I should point out that this issue has been fixed in Patch 2 for VirtualCenter 2.0.1, released at the end of February. Please see the release notes here: The only caveat is that, after installing the patch, the user has to perform a one-time manual step to set the recovery tab in the SCM for vpxd with the following settings Recovery Tab -- Use the following settings First failure -- Restart the Service Second failure -- Restart the Service Subsequent failure -- Restart the Service
Thank you for the feedback. According to the release notes you linked, Patch 2 does not actually correct the issue. The vpxd service still dies, but it will now correctly signal the SCM. I still think people should use my script instead of relying upon the SCM entirely, because my script is much more configurable and can be set to repeatedly attempt to restart the vpxd service at regular intervals, responding to any number of failures, while the SCM can only handle 3 failures. Thank you again for the comments!
The script supplied assumes that IIS with CDO is installed on the VC server, a minor modification to your script will allow it to work on systems where IIS is not installed. function SendMail( msg ) { var oMsg = new ActiveXObject( "CDO.Message" ); oMsg.Subject = SMTP_MAIL_SUBJECT; oMsg.From = SMTP_MAIL_FROM; oMsg.To = SMTP_MAIL_TO; oMsg.TextBody = msg; oMsg.Configuration.Fields.Item ("") = "2"; oMsg.Configuration.Fields.Item ("") = "YOUR_SMTP_SERVER_HERE"; oMsg.Configuration.Fields.Item ("") = "25"; oMsg.Configuration.Fields.Update(); oMsg.Send(); oMsg = null; }