Upgrading VMware vCenter Server to 6.0 fails with the error: VMware VirtualCenter failed firstboot
search cancel

Upgrading VMware vCenter Server to 6.0 fails with the error: VMware VirtualCenter failed firstboot

book

Article ID: 315291

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • Upgrading vCenter Server to 6.0 fails with the error:

    VMware VirtualCenter failed firstboot
    An error occurred while starting service 'vpxd'
    Please refer to vSphere documentation to troubleshoot or Please contact VMware Support.

     
  • In the C:\Documents and Settings\All Users\Application Data\VMware\VirtualCenter\logs\vpxd.log file, you see entries similar to:

    error vpxd[06220] [Originator@6876 sub=Default] A database error occurred: VPX_DEVICE_SEQ
    error vpxd[06220] [Originator@6876 sub=Main] [Vpxd::ServerApp::Init] Init failed: VpxdVdb::Init

     
  • In the vcs_logs/uninstall/vc-HOSTNAME-DATE--TIME/ProgramData/VMware/vCenterServer/logs/vmware-vpx/vcdb_inplace.err file, you see entries similar to:


    [Microsoft][SQL Server Native Client 11.0][SQL Server]The INSERT statement conflicted with the FOREIGN KEY constraint "FK_HOST_TEXT_HOST".
    The conflict occurred in database "VC_DB", table "dbo.VPX_HOST", column 'ID'.2 [01000](3621) [Microsoft][SQL Server Native Client 11.0][SQL Server]The statement has been terminated.
    ERROR: Cannot execute statement(rc=-1).
    INSERT INTO VPX_HOST_TEXT
    SELECT MO_ID, TYPE_ID, VALUE FROM VPX_TEXT_ARRAY WHERE MO_TYPE='host' and TYPE_ID IN(13, 22, 25, 26, 59, 67);


Environment

VMware vCenter Server 6.0.x

Cause

In vCenter 6.0, a new table called VPX_HOST_TEXT is created in the database and populated with entries from VPX_TEXT_ARRAY.
This issue occurs if there are host entries in VPX_TEXT_ARRAY without a matching host ID in VPX_HOST.

To determine if the VPX_TEXT_ARRAY table has host entries without a matching host ID in VPX_HOST, run this SQL statement:

SELECT * FROM VPX_TEXT_ARRAY WHERE MO_TYPE='host' AND MO_ID NOT IN (SELECT ID FROM VPX_HOST);

This SQL statement returns 0 for a healthy database.

If this statement returns any other value, the VPX_TEXT_ARRAY table must be fixed before the upgrade.

Resolution

Note: This procedure modifies the database. Ensure to take a backup of the database before proceeding.

To resolve this issue, delete the host entries in the VPX_TEXT_ARRAY table without a matching host ID in the VPX_HOST table.
  1. Return the environment to a backup prior to the upgrade.
     
  2. To delete the host entries in the VPX_TEXT_ARRAY table without a matching host ID in the VPX_HOST table, run this SQL statement:

    DELETE FROM VPX_TEXT_ARRAY WHERE NOT EXISTS(SELECT 1 FROM VPX_ENTITY WHERE ID=VPX_TEXT_ARRAY.MO_ID);
     
  3. After the entries are deleted, run the installation again.


Additional Information

More information on Error: VMware vCenter Failed Firstboot 
VMware vCenter Server を 6.0 にアップグレードすると次のエラーで失敗する: VMware VirtualCenter は最初の起動に失敗しました
将 VMware vCenter Server 升级到 6.0 失败,并出现以下错误: VMware VirtualCenter 首次引导失败