Curious SQL database issue with vCenter Update 1
Ran into this error this morning, which of course took down one of our (1000+ VM) vCenter environments:
The vCenter Server’s vpxd logs contain entries similar to:
An unrecoverable problem has occurred, stopping the VMware VirtualCenter service. Check database connectivity before restarting. Error: Error[VdbODBCError] (-1) “ODBC error: (23000) – [Microsoft][SQL Native Client][SQL Server]Violation of PRIMARY KEY constraint ‘PK_VPX_GUEST_DISK’. Cannot insert duplicate key in object ‘dbo.VPX_GUEST_DISK’.” is returned when executing SQL statement “INSERT INTO VPX_GUEST_DISK (VM_ID, PATH, CAPACITY, FREE_SPACE) VALUES (?, ?, ?, ?)”
The link to the VMware knowledgebase article is here: vCenter Server service fails with the error: Violation of PRIMARY KEY constraint ‘PK_VPX_GUEST_DISK’
The curious part? That issue is addressed specifically by vCenter Update 1, Build 208111 and we’re running 208111. In any case, shutting down the vCenter service (ok, it wouldn’t run anyway) and running the SQL script supplied in the KB article did the trick and fixed that which should probably already have been fixed. Still super happy we’re not running on Oracle anymore, though…
Categorised as: Virtualization