If your vCenter SSO single node or primary node instance is corrupted, you can restore a backup to ensure continued vSphere access for vCenter Server and vCenter Server components.
Back up the vCenter SSO configuration in these circumstances:
- After you install, update, or change the location of a vCenter SSO instance.
- Before the vCenter Server virtual machine is restored from a snapshot.
- Before the vCenter Server virtual machine is installed from a backup of the database from a prior vCenter Server instance.
Backing up a vCenter SSO 5.5 configuration
To manually back up a vCenter SSO 5.5 configuration:
Note: This procedure modifies the Windows registry. Before making any registry modifications, ensure that you have a current and valid backup of the registry and the virtual machine. For more information on backing up and restoring the registry, see the Microsoft Knowledge Base article
136393.
Note: The preceding link was correct as of April 7, 2015. If you find the link is broken, provide a feedback and a VMware employee will update the link.
- Gather a log bundle from vCenter SSO:
- Go to Programs > VMware.
- Right-click Generate vCenter Single Sign-On log bundle and click Run as administrator.
Note: This generates a log bundle on the desktop of the user logged into the vCenter SSO server. To redirect where the log bundle is to be generated, execute this script from an elevated command prompt, replacing <Absolute Path_To_Folder> with your preferred path:
cscript "C:\Program Files\VMware\Infrastructure\VMware\cis\vmware-sso\vm-support\sso-support.wsf" /s:<Absolute Path_To_Folder>
- Back up associated Windows registry keys:
- Click Start > Run, type
regedit
, and press Enter. The Registry Editor window opens. - Back up this registry folder:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\VMwareDirectoryService
- Back up SSL certificates, certificate server data, and KDC data folders:
- To back up the SSL certificates, back up the
C:\ProgramData\VMware\CIS\runtime\VMwareSTS\conf
folder and its contents.
- To back up the certificate server data, back up the
C:\ProgramData\VMware\CIS\data\vmca
folder and its contents.
- To back up the KDC data, back up these folders and their contents:
C:\ProgramData\VMware\CIS\cfg\vmkdcd
C:\ProgramData\MIT\Kerberos5
- Back up the VMware Directory Service (VMdir) database:
- Open a command prompt. For more information, see Opening a command or shell prompt (1003892).
- Create a new directory to store the database backup by running the command:
mkdir C:\MDBBackup
- Change directory to
C:\Program Files\VMware\Infrastructure\VMware\CIS\vmdird
by running the command:
cd C:\Program Files\VMware\Infrastructure\VMware\CIS\vmdird
- Run the
vdcbackup
command to back up the database. For example:
vdcbackup C:\ProgramData\VMware\cis\data\vmdird C:\MDBBackup
Note: This command creates a copy of the data.mdb
and lock.mdb
files and places them in the C:\MDBBackup
directory.
- Back up the
MDBBackup
folder where the copies of the two database files were stored.
Restoring the vCenter SSO 5.5 configuration
Restoring from a full operating system-level vCenter Server 5.5 backupThis procedure manually restores a vCenter SSO single node or primary node instance from a full operating system-level vCenter Server 5.5 backup.
Prerequisites - Restore the vCenter Server 5.5 system from backup according to vendor best practices.
- Shut down the corrupt vCenter Server system after completing the steps in the Backing up a vCenter SSO 5.5 configuration section.
To manually restore from a full operating system-level vCenter Server 5.5 backup:
- Stop all SSO services on the restored vCenter Server system in this order:
- VMware Secure Token Service
- VMware Identity Management Service
- VMware Certificate Service
- VMware Kdc Service
- VMware Directory Service
Note: For more information, see Stopping, starting, or restarting vCenter services (1003895).
- Restore the VMware Directory Service (VMdir) database:
- Ensure the VMware Directory Service is stopped.
- Navigate to the VMdir directory (located at
C:\ProgramData\VMware\cis\data\vmdird
). - Copy the backed up
data.mdb
and lock.mdb
files to the VMdir directory.
- In a Multisite SSO deployment, run VMdir in restore mode to allow it to import the database files and replicate with the other nodes:
- Open a command prompt. For more information, see Opening a command or shell prompt (1003892).
- Change directory to
C:\Program Files\VMware\Infrastructure\VMware\CIS\vmdird
by running the command:
cd C:\Program Files\VMware\Infrastructure\VMware\CIS\vmdird
- Start the restore operation by running the command:
vmdird.exe -c -m restore
This command starts the VMware Directory Service
(VMdir) in restore mode. The VMdir
process terminates when the restore it complete.
- Start all SSO services on the restored vCenter Server system in this order:
- VMware Directory Service
- VMware Kdc Service
- VMware Certificate Service
- VMware Identity Management Service
- VMware Secure Token Service
Note: For more information, see Stopping, starting, or restarting vCenter services (1003895).
Restoring from a vCenter Server 5.5 database backupThis procedure manually restores a vCenter SSO single node or primary node instance from a database backup.
Prerequisites - Prepare a host machine for the restored vCenter SSO instance. The host machine can be a physical machine or a virtual machine and must satisfy the hardware requirements for vCenter SSO. For more information, see the Hardware Requirements for vCenter Server, vCenter Single Sign-On, vSphere Client, and vSphere Web Client section of the vSphere Upgrade Guide.
- Download the vCenter Server installer from the VMware Downloads to the new host machine.
- Give the new host machine the same name as the failed SSO instance.
To manually restore from a database backup:
Note: This procedure modifies the Windows registry. Before making any registry modifications, ensure that you have a current and valid backup of the registry and the virtual machine. For more information on backing up and restoring the registry, see the Microsoft Knowledge Base article
136393.
Note: The preceding link was correct as of April 7, 2015. If you find the link is broken, provide a feedback and a VMware employee will update the link.
- Install only SSO 5.5.x on a fresh virtual machine as per the Prerequisites section.
- Stop all SSO services on the restored vCenter Server system in this order:
- VMware Secure Token Service
- VMware Identity Management Service
- VMware Certificate Service
- VMware Kdc Service
- VMware Directory Service
Note: For more information, see Stopping, starting, or restarting vCenter services (1003895).
- Restore the
VMwareDirectoryService
registry folder:
- Click Start > Run, type
regedit
, and press Enter. The Registry Editor window opens. - Click File > Import and select the backup key.
- Restore the SSL certificates by restoring the backup copy of the
conf
folder and its contents to this directory:
C:\ProgramData\VMware\CIS\runtime\VMwareSTS\conf
- Restore the Certificate server data by restoring the backup copy of the
vmca
folder and its contents to this directory:
C:\ProgramData\VMware\CIS\data\vmca
- Restore the KDC data by restoring the backup copy of the
vmkdcd
and Kerberos5
folders and their contents to these directories:
C:\ProgramData\VMware\CIS\cfg\vmkdcd
C:\ProgramData\MIT\Kerberos5
- Restore the VMware Directory Service (VMdir) database:
- Ensure that the VMware Directory Service is stopped.
- Navigate to the VMdir directory (located at
C:\ProgramData\VMware\cis\data\vmdird
). - Copy the backed up
data.mdb
and lock.mdb
files to the VMdir directory.
- In a Multisite SSO deployment, run VMDir in restore mode to allow it to import the database files and replicate with the other nodes:
- Open a command prompt. For more information, see Opening a command or shell prompt (1003892).
- Change directory to
C:\Program Files\VMware\Infrastructure\VMware\CIS\vmdird
by running the command:
cd C:\Program Files\VMware\Infrastructure\VMware\CIS\vmdird
- Start the restore operation by running the command:
vmdird.exe -c -m restore
This command starts the VMware Directory Service
(VMdir) in restore mode. The VMdir
process terminates when the restore it complete.
- Start all SSO services on the restored vCenter Server system in this order:
- VMware Directory Service
- VMware Kdc Service
- VMware Certificate Service
- VMware Identity Management Service
- VMware Secure Token Service
Note: For more information, see Stopping, starting, or restarting vCenter services (1003895).
- Continue with the installation of vSphere 5.5.
Finding Update Sequence Number (USN) for a restoring node The restoring node itself does not have an automated way to reliably retrieve the restored USN from the peer nodes. The administrator has to manually retrieve that USN and pass in to vmdird as an argument. When running the vmdird command in restore mode, a
-n option is needed for specifying a USN to restore to.
Adminstrators can follow these steps to find the USN:
- Download, install, and launch JXplorer
- To find the restore USN, maintain a record, key in MAX_USN, of the maximum lastLocalUsnProcessed for the restoring node seen from peer nodes. Initialize it with zero.
- In JXplorer, connect to the nodes that have replication relation with the restoring node, one by one, or all together in different JXplorer sessions, and follow the next steps. Following are some example connection parameters:
- IP address of the node, port 11711
- protocol: LDAP v3
- Security level: User + Password
- User DN: cn=Administrator,cn=users,dc=vSphere,dc=local
- Navigate to World > local > vsphere > Configuration > Sites > Default-First-Site > Servers > PEER_NODE > Replication Agreements > RESTORING_NODE_LDAP_URL
- On the right hand side panel, click Table Editor if it is not turned on, then at the bottom click Properties button
- Read and note the lastLocalUsnProcessed if it is bigger than the current maximum USN you have seen (MAX_USN). Otherwise skip that value. Repeat the above for all peer nodes.
- On restoring node, run vmdird -n usn -c -m restore, where usn is the maximum USN (MAX_USN) you have found.