Unable to migrate vRealize Orchestrator because a vmo_lock exists in the source database.
search cancel

Unable to migrate vRealize Orchestrator because a vmo_lock exists in the source database.

book

Article ID: 326108

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Symptoms:
  • Migration fails during the step "Migrate the source vRealize Orchestrator database"
  • Task finished with an error:
See vro-migrate.log files from the log bundle created and accessible from the VAMI console.
  • /var/log/vmware/vcac/vro-migrate.log: (target log bundle)
MigrateDbOptions{sourceDbUsername='vmware', sourceDbPassword='***', sourceJdbcUrl='jdbc:postgresql://<ServerFQDN>:5432/vmware', dropTarget=true, targetDbUsername='vcac', targetDbPassword='***', targetJdbcUrl='jdbc:postgresql://127.0.0.1:5433/vcac?sslmode=verify-ca&sslrootcert=/var/vmware/vpostgres/current/.postgresql/root.crt', skipTables='[vmo_vroconfiguration, vmo_vroconfigurationhistory, vmo_clustermember]'} com.vmware.o11n.cli.configuration.exception.CommandException: ch.dunes.vso.db.DatabaseException: org.postgresql.util.PSQLException: ERROR: relation "vmo_lock" does not exist


Environment

VMware vRealize Orchestrator 7.x
VMware vRealize Automation 7.x

Cause

The vmo_lock does not exist within the 7.5 database and needs to be created.

Resolution

To resolve this issue, follow these steps.
  1. Take a backup of the postgres database by running these commands:
    su -m -c "/opt/vmware/vpostgres/current/bin/pg_dump -Fc vcac > /tmp/vcac.sql" postgres
Note: -Fc switch already provides a compressed file.  No need to bzip.
  1. Connect to the database by running these commands:
    /opt/vmware/vpostgres/current/bin/psql vcac postgres
\connect vcac;
  1. CREATE TABLE vmo_lock( id VARCHAR(100) PRIMARY KEY, owner VARCHAR(100));
  2. \d+ vmo_lock
  3. ALTER TABLE vmo_lock owner to vmware;
  4. Re-attempt the migration