vmware vcenter恢复时数据库无法连接,服务无法启动

来源:互联网 发布:怎么看淘宝粉丝有谁 编辑:程序博客网 时间:2024/04/27 18:45

项目环境

win2008

vmware esxi

vmware vcenter

oracle 10g(小型机上)

nbu7.1

问题描述:

项目要求将所有的虚拟机备份,当然vcenter的备份是必须的,用nbu进行备份,在vcenter挂的时候,从备份中恢复vcenter,这时候就出现了无法连接数据库或者说vcenter几个重要服务无法启动。

解决方法

个人觉得在vcenter应用里面也有相应的时间点记录,当用nbu备份的vcenter虚拟机的时候,相应的数据库和vcenter一些自身的数据库也有一个时间点,应该全部备份,恢复的时候这些数据库都需要恢复。这样保证处在一个时间点。


这是vmware给的建议:

一、VC application还原后的ADAM数据库信息与当前的Oracle数据库记录的信息不匹配。


什么是ADAM数据库,见以下解释:
vCenter Server uses ADAM (Active Directory Application Mode) database to store information related to licensing, custom roles, and Linked Mode configuration. This data is regularly backed up to the vCenter Server database in the VPX_BINARY_DATA table.

如果要对VC进行备份,除了要备份VC数据库以外,同时还要对ADAM数据库进行备份。
以下是关于备份和还原VC 4.x和VC 5.x版本的文章,供您参考:
《Backing up and restoring vCenter Server 4.x and 5.0 (1023985) 》
http://kb.vmware.com/kb/1023985


截取了KB1023985的部分内容,在这里提到了ADAM数据每5分钟写入到VC数据库中。
vCenter Server 4.x and 5.0 require that the database and ADAM (VMwareVCMSDS) data be backed up.

Note: The ADAM data is backed up every 5 minutes into the vCenter Server database. To back up the latest update of ADAM data, ensure that the VMware VirtualCenter Management Webservices service has been running for at least 5 minutes before stopping the other vCenter Server services.

当还原VC application后,ADAM数据再尝试写入到VC 数据库,但是发现已经存在相同条目,导致VC 登录数据库时失败,VC服务无法启动。

二、VC application crash,Oracle数据库中锁定了这个客户端连接。
VC日志中会出现以下报错信息:
06200 error 'App'] ODBC error: (HY000) - [Oracle][ODBC][Ora]ORA-12537: TNS:connection closed
[2011-05-11 09:05:54.984 06200 error 'App'] Error getting configuration info from the database

Oracle对于“ORA-12537”这个Error的解释,请参考:
《What to do with ORA-12537: TNS: connection closed error》
http://www.oradev.com/ORA-12537_TNS_connection_closed.jsp

其中一个原因是:
====================================
2. A time-out occurred on the client-connection.
====================================

VMware KB中相关案例:
《VirtualCenter Server service fails to start with the error: Oracle - ORA-12537 (1039228) 》
http://kb.vmware.com/kb/1039228



【建议】
如果要备份VC,建议您参考如下KB进行操作。同时备份VC application、ADAM database、VC database.

《Backing up and restoring vCenter Server 4.x and 5.0 (1023985) 》

http://kb.vmware.com/kb/1023985


Purpose

This article provides instructions for backing-up and restoring vCenter Server 4.x and 5.0.

Resolution

vCenter Server 4.x and 5.0 require that the database and ADAM (VMwareVCMSDS) data be backed up.

Note: The ADAM data is backed up every 5 minutes into the vCenter Server database. To back up the latest update of ADAM data, ensure that the VMware VirtualCenter Management Webservices service has been running for at least 5 minutes before stopping the other vCenter Server services.

This requires a procedure similar to upgrading vCenter Server 2.5 to vCenter Server 4.x or from vCenter Server 4.x to 5.0. For more information, see the vSphere Upgrade Guide.

Back up

  1. Stop the VMware VirtualCenter Service, VMwareVCMSDS, and the Database service. For more information, see Stopping, starting, or restarting vCenter services (1003895).
  2. Back up the vCenter Server database. For more information, see Backing up the vCenter Server database running on Microsoft SQL or SQL Express server (2012138). 

    This backup includes backing up ADAM information. For more information, see the vSphere Upgrade Guide. 

  3. Backup the SSL certificate folder at:

    • Windows 2003: %ALLUSERSPROFILE%\Application Data\VMware\VMware VirtualCenter
    • Windows Vista and 2008 Server: %ALLUSERSPROFILE%\VMWare\VMware VirtualCenter

Restore

  1. Restore the database. For more information, see the vSphere Upgrade Guide.
  2. Restore SSL certification. Copy the backed up SSL certificate folder to the same path on the destination. Create the folder if it does not already exist. 

    Note: If you are using a custom rui.crt file, ensure that the file starts with -----BEGIN CERTIFICATE----- and ends with -----END CERTIFICATE-----. For more information, see Upgrading to vCenter Server 4.x fails with the error: Setup cannot create vCenter Server Directory Services (1015887).

  3. Prepare a DSN that points to the database. For more information, see the vSphere Upgrade Guide for your version of vCenter Server.
  4. Install vCenter Server 4.x or 5.0 and connect it to the database during the installation. ADAM information is restored by this process. If vCenter Server 4.x was installed on the target operating system to restore, you need to uninstall it before the restoration.

Note: On vSphere 5.0 you should also back up the Inventory Service database as part of your regular vCenter Server database administration. For further details on backing up and restoring the Inventory Service Database, see the vSphere Installation and Setup guide.

For more information on these steps, see the Upgrading to vCenter Server on a Different Machine and Keeping the Existing Database section of the vSphere Upgrade Guide.


原创粉丝点击