VMware Cloud Community
TheoThym
Contributor
Contributor

Vcenter Migration from vCenter 6.0 on Windows to VCSA 6.7

Hello,

I am trying to migrate our vCenter witch is on Windows 2012 R2, 6.0.0 9313458, to VCSA 6.7 U3.

I am using the migration tool, and it is aparently working fine until the the start of the new vCenter.

During the second step of the installation process for the new vCenter, when the system is trying to start vPostgres, it fails.

When consulting the logs, there is no information :

------------------------

2020-03-02T16:04:31.951Z  Upgrade import step failed

2020-03-02T16:04:31.951Z  vPostgres firstboot(action=firstboot) failed

------------------------

I tried to purge the DB (events, tasks, stat), I even tried to disable the statistics in vCenter setting but the migration still fails...

I tried tiny and small deploiment, still fails.

Could anyone help me ?

Sorry if my english is not perfect, not my native language.

Best regards,

0 Kudos
14 Replies
Alex_Romeo
Leadership
Leadership

Hi,

Try to review these steps:

https://www.techcrumble.net/2018/05/how-to-migrate-windows-based-vcenter-server-to-vcsa-6-7/

https://esxsi.com/2018/04/26/vcsa67m/

and

Migrating vCenter Server for Windows to vCenter Server Appliance

you can resume the second phase by typing "https://<ipvCenter>or<FQDN>:5480"

ARomeo

Blog: https://www.aleadmin.it/
0 Kudos
TheoThym
Contributor
Contributor

Hello and thank you for your answer.

for all the migrations that i did and that failed, i did as shown in your links.

But, as I said, when the new vCenter had to start postgres, il failed.

pastedImage_0.png

The error message sent me to a log file

/var/log/firstboot/vpostgres-firstboot.py_####_stderr.log

This log file contained only the 2 lines that I put in the previous message :

2020-03-02T16:04:31.951Z  Upgrade import step failed

2020-03-02T16:04:31.951Z  vPostgres firstboot(action=firstboot) failed

0 Kudos
vwaghule
VMware Employee
VMware Employee

You would need to look at the log file postgresql-xx.log

It is located at below location in the target appliance.

/var/log/vmware/vpostgres/

0 Kudos
Ajay1988
Expert
Expert

Need the upgrade failure logs to confirm the issue and resolution

If you think your queries have been answered
Mark this response as "Correct" or "Helpful".

Regards,
AJ
0 Kudos
Alex_Romeo
Leadership
Leadership

Hi,

Alternatively, you can think of creating a new vCenter and migrating only the configurations.

When the vCenter is ready, the Esxi hosts are detached from the old vCenter and connected to the new vCenter 6.7.

ARomeo

Blog: https://www.aleadmin.it/
0 Kudos
TheoThym
Contributor
Contributor

Hello,

thanks for yours answers.

I just retried with VCSA 6.7U1 instead of U3, in case there was a problem with that but I have the same issue.

I checked the logs as recomended by vwaghule, here is what I found :

in the log file "postgresql-04.log", there is the following :

2020-03-04 10:21:28.837 UTC 5e5f811a.3a54 11257 VCDB postgres ERROR:  insert or update on table "vpx_nic" violates foreign key constraint "fk_vpx_vn_ref_vpx_vm"

2020-03-04 10:21:28.837 UTC 5e5f811a.3a54 11257 VCDB postgres DETAIL:  Key (entity_id)=(7961) is not present in table "vpx_entity".

2020-03-04 10:21:28.837 UTC 5e5f811a.3a54 11257 VCDB postgres STATEMENT:  ALTER TABLE vpx_nic ADD CONSTRAINT fk_vpx_vn_ref_vpx_vm FOREIGN KEY (entity_id) REFERENCES vpx_entity(id) ON DELETE CASCADE;

2020-03-04 10:21:29.252 UTC 5e5f8104.39b5 0   LOG:  received fast shutdown request

2020-03-04 10:21:29.252 UTC 5e5f8104.39b5 0   LOG:  aborting any active transactions

2020-03-04 10:21:29.252 UTC 5e5f8104.39be 0   LOG:  Shutting down health status worker...

2020-03-04 10:21:29.254 UTC 5e5f8104.39bc 0   LOG:  autovacuum launcher shutting down

2020-03-04 10:21:29.256 UTC 5e5f8104.39b9 0   LOG:  shutting down

2020-03-04 10:21:29.266 UTC 5e5f8104.39b9 0   LOG:  checkpoint starting: shutdown immediate

2020-03-04 10:21:29.759 UTC 5e5f8104.39b9 0   LOG:  checkpoint complete: wrote 7439 buffers (16.7%); 0 transaction log file(s) added, 0 removed, 1 recycled; write=0.091 s, sync=0.337 s, total=0.502 s; sync files=358, longest=0.252 s, ave

rage=0.000 s; distance=75069 kB, estimate=75069 kB

2020-03-04 10:21:29.789 UTC 5e5f8104.39b5 0   LOG:  database system is shut down

2020-03-04 10:21:31.068 UTC 5e5f812b.3afa 0   LOG:  database system was shut down at 2020-03-04 10:21:29 UTC

Could that be of any help ?

AlessandreRomeo68, this would be the solution if I can't find a solution here, but I have an EVC cluster with dvswitch, so it would be better if I can use the migration tool

FYI : my vCenter 6.0 is with embeded postgres, not Microsoft SQL.

Anyway, VMWare indicates that the migration is supported

VMware vCenter Server 6.0 Update 3h Release Notes

0 Kudos
vwaghule
VMware Employee
VMware Employee

Can you run below queries on vcenter database and update with the outcome,

select * from VPX_ENTITY where entity_id=7961;

select * from VPX_NIC where entity_id=7961;

select count(*) from vpx_nic where entity_id not in (select entity_id from vpx_entity);

0 Kudos
Alex_Romeo
Leadership
Leadership

You have already seen this Kb:

VMware Knowledge Base

ARomeo

Blog: https://www.aleadmin.it/
0 Kudos
TheoThym
Contributor
Contributor

vwaghule​, each of the requests that you gave me didn't return anything

pastedImage_1.png

0 Kudos
vwaghule
VMware Employee
VMware Employee

Can you run this query again,

select * from VPX_ENTITY where entity_id=7961;

the screenshot you shared shows id instead of entity_id.

Also update with the output on below query.

select * from vpx_nic;

0 Kudos
vwaghule
VMware Employee
VMware Employee

sorry,

select * from VPX_ENTITY where entity_id=7961;

this is not required.

0 Kudos
TheoThym
Contributor
Contributor

I put id instead of entity_id because the later don't exist in the table

pastedImage_0.png

Is there a filter that I can apply on the second query ?

there is a lot of information in the outcome

0 Kudos
TheoThym
Contributor
Contributor

Hello,

I previously ran the queries on the source vcenter.

I did run it on the target vcenter today (I blacked my IPs) :

pastedImage_0.png

Does that help you helping me ?

Thank in advance.

Regards

0 Kudos
TheoThym
Contributor
Contributor

Does anyone can help me on that matter ?

Strange thing, when I run the following query :

select entity_id from vpx_nic where entity_id not in (select id from vpx_entity);

there are 8 results, but then when I run :

select * from vpx_nic where entity_id =<one of previous result>;

nothing is return.

Regards

0 Kudos