VMware Cloud Community
discatcher
Contributor
Contributor

VirtualCenter Server service stopping out of the blue

Anyone seen this. I can manually start the server service and literally less than a minute later it stops on its own.

I checked the properties of the db_owner schema properties and the owner is dbo as is recommended.

Anyone have any ideas?

This problem literally began about 2 hours ago.

0 Kudos
32 Replies
acr
Champion
Champion

Have a quick look through this troubleshooting ESX and VC..

http://download3.vmware.com/vmworld/2006/mdc9694.pdf

Hope it helps..

cheeko
Expert
Expert

What says event log?

0 Kudos
debelvi
Contributor
Contributor

Check if there is space on your database server. May be one of the tablespaces are full or it has less room than what it needs.

0 Kudos
discatcher
Contributor
Contributor

Event Type: Error

Event Source: VMware VirtualCenter Server

Event Category: None

Event ID: 1000

Date: 2/7/2007

Time: 2:59:13 PM

User: N/A

Computer: JULIET

Description:

The description for Event ID ( 1000 ) in Source ( VMware VirtualCenter Server )

cannot be found. The local computer may not have the necessary registry information

or message DLL files to display messages from a remote computer. You may be able

to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for

details. The following information is part of the event: An unrecoverable problem

has occurred, stopping the VMware VirtualCenter service. Check database

connectivity before restarting. Error: Error\[VdbODBCError] (-1)

"ODBC error: (23000) - \[Microsoft]\[ODBC SQL Server Driver]\[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 (?, ?, ?, ?)".

0 Kudos
discatcher
Contributor
Contributor

First let me say, I am a noob to VMware. Have been on the job 3 days now and nobody I work with has any more ideas than I do. I'm brushing up on SQL but would qualify myself as a noob with it as well. Sorry.

0 Kudos
bister
Expert
Expert

Yes, check the database. Create mainenance tasks to keep transaction logs small. Think about setting backup option for the VC-DB to "simple".

After changing statistics level of VC to 3 to get device performance data we had massive problems with VC randomly stopping. In the end it was the database: transaction log full.

Respectfully,

Christian

0 Kudos
discatcher
Contributor
Contributor

The recovery model is set to 'simple'

0 Kudos
acr
Champion
Champion

0 Kudos
jeh72c
Contributor
Contributor

I have seen a similiar message in my environment last year. We have an oracle database but the error was very similiar:

Event Type: Error

Event Source: VMware VirtualCenter Service

Event Category: None

Event ID: 1000

Date: 9/7/2006

Time: 8:56:11 AM

User: N/A

Computer: SERVERNAME

Description:

\[1844] \[ARCHIVER] Q: INSERT INTO STATS_VM_DATA(VAL,VM_ID,HIST_ID,COL_ID,ROW_ID) VALUES(?,?,?,?,?)

I think the service is failing because it is trying to perform an insert into the database but the procedure is failing.

In our situaton it was because one of the tablespaces on the database server was full (even though we had plenty of free disk space).

The DBA extended the tablespace and we were good to go!

If your database is up and running and you are not out of space in one of your tablespaces, check your ODBC driver version. I believe MDAC 2.8 sp1 is the latest version available from microsoft. Does anyone know which version of the MDAC/ODBC driver Vmware recommends?

0 Kudos
discatcher
Contributor
Contributor

I've tried updating the SQL Server native client to no avail. It says the version is older than the one I have.

0 Kudos
gus27
Enthusiast
Enthusiast

"Violation of PRIMARY KEY constraint" means that there already exists an database entry with the same key so that a new entry cannot be inserted. IMHO this issue cannot be fixed with database maintenance operations. I would try a reinstall of VC with a fresh database...

I can read from the error message that you're using a MS SQL Server.

Which version do you have installed? MSDE? MSSQL 2000? MSSQL 2005?

Guido

Message was edited by:

gus27

0 Kudos
discatcher
Contributor
Contributor

We are using MSSQL 2005

0 Kudos
gus27
Enthusiast
Enthusiast

0 Kudos
discatcher
Contributor
Contributor

yes, thank you. dbo was the owner already.

0 Kudos
gus27
Enthusiast
Enthusiast

If your keen on making new experiences you could try to delete the contents of the table by a simple "delete from VPX_GUEST_DISK" and see if it works. The table just contains path, capacity and free space of your VMs disks. Maybe the table is refilled after VCS starts.

But I suggest to reinstall on a fresh database.

Guido

0 Kudos
gus27
Enthusiast
Enthusiast

But I suggest to reinstall on a fresh database.

This procedure from acr's linked document should do it too:

Reinitializing the VC DB

\- Wipes out and resets all data stored in the VC DB

\- Use only as a last resort

\- If vpxd is running under a user account, log in as that user

\- From a command prompt:

C:\>"\Program Files\VMware\VMware VirtualCenter 2.0\vpxd.exe -b"

Message was edited by:

gus27

0 Kudos
bister
Expert
Expert

But don't use "DELETE FROM ...". Use "TRUNCATE TABLE ..." instead. It took me 1h to delete all rows (about 5500) out of VPX_SAMPLE with "DELETE". I was scared when thinking of deleting 31 million rows in VPX_HIST_STAT (hope thats the correct name).

TRUNCATE doesn't force any transaction logging to be done.

Regards,

Christian

0 Kudos
RobMokkink
Expert
Expert

Have had the same issue with a fresh install with sql 2005.

Installation goes fine but after that service fails.

It looks like a problem with rights.

The sql service account used for the VC database must be db owner.

With sql 2005 its best to create the service account first and then the DB and specify the service account as DBO.

Otherwise you can fix it as described in the following Doc ID: 6565318:

http://kb.vmware.com/vmtnkb/search.do?cmd=displayKC&docType=kc&externalId=6565318&sliceId=SAL_Public...

0 Kudos
gus27
Enthusiast
Enthusiast

The VPX_GUEST_DISK table usually doesn't have very much entries. In our installation it has roughly

\[count VMs] * \[average disk count per VM] => 25 * 4 = 100

entries.

0 Kudos