Pages

Tuesday, June 21, 2016

problem s DVS po export/import DVS do noveho vCentra - padajici VPXD proces

Hi.

The vpx process was crashing with the following error in /storage/log/vmware/vpx/vpxd.log
mem> 2016-06-13T09:05:57.713Z [7F4B0DC39700 error 'commonvpxCommon' opID=49A39FF7-0000006E-b6] [Vpxd_HandleVmRootError] Received unrecoverable VmRootError. Generating minidump ...
mem> 2016-06-13T09:05:57.713Z [7F4B0DC39700 error 'Default' opID=49A39FF7-0000006E-b6] An unrecoverable problem has occurred, stopping the VMware VirtualCenter service. Error: Error[VdbODBCE
rror] (-1) "ODBC error: (23505) - ERROR: duplicate key value violates unique constraint "pk_vpx_dvport_membership"
mem> --> Key (dvs_id, dvport_key)=(354, 152) already exists.;
mem> --> Error while executing the query" is returned when executing SQL statement "INSERT INTO VPX_DVPORT_MEMBERSHIP (DVS_ID, DVPORT_KEY, DVPORTGROUP_ID, HOST_ID, LAG_KEY) VALUES (?, ?, ?,
?, ?)"
mem> 2016-06-13T09:05:57.713Z [7F4B0DC39700 verbose 'commonvpxCommon' opID=49A39FF7-0000006E-b6] Backtrace:
mem> -->
mem> 2016-06-13T09:05:57.728Z [7F4B0DC39700 panic 'Default' opID=49A39FF7-0000006E-b6] (Log recursion level 2) Unrecoverable VmRootError. Panic!

Solution:
http://www.hivmr.com/db/skz3713kkp8kssmszcj8jsxckds8fczj   how to log into PostgreSQL DB on VCSA
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres

https://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=2092070&sliceId=2&docTypeID=DT_KB_1_1&dialogID=120672744&stateId=1%200%20120684601           how to change values in PostgreSQL DB, but error messages are different
UPDATE VPX_DVS SET PORT_COUNTER=((SELECT MAX(CAST(DVPORT_KEY AS INT)) FROM VPX_DVPORT_MEMBERSHIP WHERE DVS_ID='DVS_ID')+1) WHERE ID='DVS_ID';
Repeat for every DVS, with different DVS_ID.

http://vninja.net/virtualization/vpostgres-database-backup-vcsa-5-5/     how to backup PostgreSQL DB on VCSA
/opt/vmware/vpostgres/1.0/bin/pg_dump EMB_DB_INSTANCE -U EMB_DB_USER -Fp -c > VCDBBackupFile


After import of DVS settings (only thing that comes to mind that could have caused this, since the VCSA is a new installation, but DVS were imported from previous vCenter instance), the values in port_counter column in table VPX_DVS were zero instead of the correct value.
When creating a new port (e.g. when creating a new portgroup with static binding), vpxd picks too-small port numbers for new ports. Those number are already in use in VPX_DVPORT_MEMBERSHIP and cause primary key violation.

No comments:

Post a Comment