I'm trying to migrate / update from a Windows vCenter (6.5 build 6816762) to a VCSA 6.7 U2.
I've checked that the upgrade path is supported, however am running into some issues when the postgres database is being imported into the VCSA.
The deployment completes the VCSA deployment, and captures the source DB / info. Then when running through step 2 of the migration phase it fails at 40% with the following;
Error
Encountered an internal error. see /var/log/firstboot/vpostgres-firstboot.py_xxxx_stderr.log
Resolution
This is an unrecoverable error, please retry install. If you run into this error again, please collect a support bundle and open a support request.
within the log "vpostgres-firstboot.py_xxxx_stderr.log" it says:
2019-07-01T06:47:52.496Z Upgrade import step failed
2019-07-01T06:47:52.496Z vPostgres firstboot(action=firstboot) failed
If i dig a bit further into the logs I can see the following warning under the /var/log/vmware/vpostgres/postgresql-01.log file;
"2019-07-01 06:47:52.496 UTC 5d19ac88.357a 18284 VCDB postgres STATEMENT: ALTER TABLE vpx_vm_sn_virtual_device ADD CONSTRAINT fk_vpx_vm_sn_virtual_device FOREIGN KEY (id) REFERENCES vpx_snapshot(id) ON DELETE CASCADE;"
"2019-07-01 06:47:52.496 UTC 5d19ac88.357a 18284 VCDB postgres ERROR: insert or update on table "vpx_vm_sn_virtual_device" violates foreign key constraint "fk_vpx_vm_sn_virtualdevice"
In /var/log/vmware/vpxd/vcdb_import.err the file ends with;
psql.bin:/storage/seat/cis-export-folder/vcdb/create_constr.sql:1073: ERROR: insert or update on table "vpx_vm_sn_virtual_device" violates foreign key constraint "fk_vpx_vm_sn_virtual_device"
DETAIL: Key (id)=(12246) is not present in table "vpx_snapshot"
The error suggests to me that there is a referenced snapshot or something that is not 'right'. After shutting down the VCSA and powering on the original Windows server, I've checked all the VMs for snapshots and non have any (none need disk consolidation and no delta files exist).
If i connect to the postgresql VCDB database and run SELECT * FROM vpx_snapshot;
It returns (0 rows).
I've logged a ticket with VMware support, but thought I'd try my luck here in case anyone else has had the same issue and been able to resolve it while I wait.
TIA
It is saying it is not present in vpx_snapshot table but is expecting
DETAIL: Key (id)=(12246) is not present in table "vpx_snapshot"
can you check the output of select * from vpx_entity where id =12246;
validate what is that object and check if it has any snapshots etc because it is failing to insert that value in different table "Insert or update on table "vpx_vm_sn_virtual_device"
Thanks,
MS
Hi,
I'd like to know was it a External DB or embedded one, your windows VM that houses your current VC does it's folder " The VM on the datastore" contains any other flat vmdks?
grep scsi [vmname].vmx
Hello,
Did you find a resolution to this issue ?
I'm facing something very similar.
Search for that entry in table vpx_vm_sn_virtual_device
select id, vm_id from vpx_vm_sn_virtual_device where id=12246;
Note the vm_id, search for vm by running below query :
select dns_name, ip_address from vpx_vm where id=vm_id_that was noted;
Remove that vm from inventory and proceed for upgrade. Add the vm back to inventory after the upgrade with the new name.