VMware Cloud Community
Miolin
Contributor
Contributor

Migrate vRO 7.6 to vRO 8

Hi,

I'm trying to migrate vRO 7.6 to new vRO 8.

I'm following the steps outlined here; Migrating Standalone vRealize Orchestrator 7.x to External vRealize Orchestrator 8.0

I Always get error that SSH Connection is not possible. But when doing "ssh [source appliance]" on new appliance I can connect and Login with provided credentials.

No Firewall between the Systems.

The vro-migrate script is not able to Login to source appliance or check SSH port is open.

vro-migration.log:

++ date

+ echo 'Migration is started at ' Wed Oct 23 10:49:33 UTC 2019

Migration is started at  Wed Oct 23 10:49:33 UTC 2019

+ SRC_VRO_HOST=cis-vro

+ SRC_VRO_ROOTUSER=root

+ set +x

+ TRG_VA_IP=

+ PATH_TO_MIGRATION_JOB_YAML=/tmp/vco-migration-job.yaml

+ touch /tmp/vco-migration-job.yaml

+ cat

+ [[ ! -e /tmp/vco-migration-job.yaml ]]

+ [[ ! -s /tmp/vco-migration-job.yaml ]]

+ kubectl -n prelude scale deployment vco-app --replicas=0

deployment.extensions/vco-app scaled

+ kubectl apply -n prelude -f /tmp/vco-migration-job.yaml

job.batch/vco-migration created

++ kubectl get pods -n prelude -o=name

++ grep vco-migration

++ sed 's/^.\{4\}//'

+ VCO_MIGRATION_POD_NAME=vco-migration-fwcwt

++ kubectl get pods -n prelude vco-migration-fwcwt -o 'jsonpath={.status.conditions[?(@.type=="Ready")].status}'

+ MIGRATION_POD_STATUS_CMD=False

+ [[ False == \T\r\u\e ]]

++ kubectl get po -n prelude vco-migration-fwcwt -o 'jsonpath={.status.conditions[?(@.type=="Ready")].status}'

+ MIGRATION_POD_STATUS_CMD=False

+ echo 'Migration container is not ready.'

Migration container is not ready.

+ sleep 5

+ [[ False == \T\r\u\e ]]

++ kubectl get po -n prelude vco-migration-fwcwt -o 'jsonpath={.status.conditions[?(@.type=="Ready")].status}'

+ MIGRATION_POD_STATUS_CMD=True

+ echo 'Migration container is not ready.'

Migration container is not ready.

+ sleep 5

+ [[ True == \T\r\u\e ]]

+ set +x

Wed Oct 23 10:49:45 UTC 2019 : Start installation of vco configuration cli.

Preparing...                          ################################# [100%]

Updating / installing...

   1:vco-cfg-cli-8.0.0.1570646260-1483################################# [100%]

Wed Oct 23 10:49:46 UTC 2019 : Installation of vco configuration cli is completed

Wed Oct 23 10:49:46 UTC 2019 : Verify ssh connection to source host is possible

Wed Oct 23 10:49:46 UTC 2019 : IS_SSH_CONNECTION=

Wed Oct 23 10:49:46 UTC 2019 : Verify connection on port 22 to the source host machine is possible.

Wed Oct 23 10:49:46 UTC 2019 : Connection to cis-vro on port 22 is not possible.

Wed Oct 23 10:49:46 UTC 2019 : Please verify that the correct hostname is provided: cis-vro.

Wed Oct 23 10:49:46 UTC 2019 : Please make sure that port 22 on the source host machine is opened while making the migration.

Wed Oct 23 10:49:46 UTC 2019 : If the port is opened then verify that the correct username and password are entered.

command terminated with exit code 1

+ startVcoDeploy

+ echo 'Start vco-app containers again.'

Start vco-app containers again.

+ kubectl -n prelude scale deployment vco-app --replicas=1

deployment.extensions/vco-app scaled

+ echo 'Delete migration job artifacts.'

Delete migration job artifacts.

+ kubectl delete job -n prelude vco-migration

job.batch "vco-migration" deleted

+ rm /tmp/vco-migration-job.yaml

+ rm /tmp/vco_migration_on

++ date

+ echo 'Migration finished at' Wed Oct 23 10:49:47 UTC 2019

Migration finished at Wed Oct 23 10:49:47 UTC 2019

+ set +x

Container migration script failed.

Any ideas what would be causing this?

Reply
0 Kudos
7 Replies
iiliev
VMware Employee
VMware Employee

The provided output shows this line:

Wed Oct 23 10:49:46 UTC 2019 : IS_SSH_CONNECTION=

The script fails because the value of this variable is wrong; instead of empty value it should be equal to the host name.

Could you make an SSH connection to vRO 8 appliance, run the following couple of commands, and provide the values they return (replace $your-vro7-appliance-password with the actual password of your vRO 7.6 appliance):

echo $HOSTNAME

sshpass -p $your-vro7-appliance-password ssh -q -oStrictHostKeyChecking=no root@cis-vro 'echo $HOSTNAME'

Reply
0 Kudos
Miolin
Contributor
Contributor

root@cis-orchestrator8 [ ~ ]# echo $HOSTNAME

cis-orchestrator8

root@cis-orchestrator8 [ ~ ]#

root@cis-orchestrator8 [ ~ ]# sshpass -p "" ssh -q -oStrictHostKeyChecking=no root@cis-vro 'echo $HOSTNAME'

cis-vro

root@cis-orchestrator8 [ ~ ]#

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee

Strange,

The output of the second command is directly assigned to the variable IS_SSH_CONNECTION which, according to the output in your first post, is empty.

I'd suggest to find the file migration_script.sh on your vRO appliance and add additional log statements in it to dump the various variables' values, to confirm that evaluation of IS_SSH_CONNECTION is indeed empty and that the comparison around line 26 indeed fails.

Update: After some internal discussions, a hypothesis appear that it could be due to some network issues between appliance and docker container(s), but this could be difficult to troubleshoot.

Is it an option for you to open official support request?

Reply
0 Kudos
EGueniffey
Contributor
Contributor

Hi,

i have exactly the same issue.

I will open a case at VMware and tell you the result.

Eric

Reply
0 Kudos
Miolin
Contributor
Contributor

Hi Eric,

any news on this? Did support team help?

Regards

Jan-Oliver

Reply
0 Kudos
denito
VMware Employee
VMware Employee

Hi,

The possible workaround is to execute the command " sshpass -p $SRC_VA_PASS ssh -oStrictHostKeyChecking=no $SRC_VRO_ROOTUSER@$SRC_VRO_HOST 'echo $HOSTNAME' " manual  and set SRC_VRO_HOST to be the same name as returned from the command. The difference  is that -q option is removed to see if there are any ssh errors.

Also you can change the script as following (I will submit this change in the latest vRO):

...

log "Verify ssh connection to source host is possible"

IS_SSH_CONNECTION=$(sshpass -p $SRC_VA_PASS ssh -q -oStrictHostKeyChecking=no $SRC_VRO_ROOTUSER@$SRC_VRO_HOST 'echo $HOSTNAME')

log "IS_SSH_CONNECTION= $IS_SSH_CONNECTION"

################################################################ Verify connection to the src host machine on port 22 ################################################################

log "Verify connection on port 22 to the source host machine is possible."

sshpass -p $SRC_VA_PASS ssh -oStrictHostKeyChecking=no $SRC_VRO_ROOTUSER@$SRC_VRO_HOST exit

if [[ "${IS_SSH_CONNECTION}" != "${SRC_VRO_HOST}" ]]; then

if [[ $? != 0 ]]; then

    log "Connection to ${SRC_VRO_HOST} on port 22 is not possible."

....

This will show the error in case ssh is not OK and will stop the execution.

Reply
0 Kudos
EGueniffey
Contributor
Contributor

Hi,

Yes Good news, after 3/4 weeks of messages and test with the support team, the issue was due to the source hostname.

In fact i past the fqdn of the source hostname and it was different from the hostname. they found it inside the logs.

Below is the summary of the support team result :

Summary

vRO migration from 7.6 to 8.0 Error : Failed to migrate vRO

Cause

found SRC_VRO_HOST="HOSTNAME", and not "hostname.toto.fr"

Resolution

  • The value of "SRC_VRO_HOST" should be the same as the result of
  • "sshpass -p $SRC_VA_PASS ssh -q -oStrictHostKeyChecking=no $SRC_VRO_ROOTUSER@$SRC_VRO_HOST 'echo $HOSTNAME'".

Hope this can help.

Regards

Eric

Reply
0 Kudos