vCenter upgrade from 6.0 Error “vpx_vdevice_backing_rel_seq”

I have seen the error “ERROR: must be owner of relation vpx_vdevice_backing_rel_seq; ” a few times when upgrading from vCenter 6.0 til 6.5 or 6.7.

This is a problem with the sequence owner ship.

Brian Knutsson have a blog about how to resolv this here: https://vm.knutsson.it/2017/10/things-to-know-about-upgrading-vcsa-6-0-to-vcsa-6-5/

I do this a little different but the result is the same, I does all the work from the PSQL.

Note: take a snapshot of the vCenter before you begin.

Login to the source vCenter appliance with ssh, and go to the bash shell, and run this command to enter the PSQL command interface:

/opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB

To see all the display sequence command:

\ds

Now we can see that some of the database sequence have a different owner then “vc”, to change this run this commands:

ALTER SEQUENCE vpx_vdevice_backing_rel_seq OWNER TO vc;
ALTER SEQUENCE vpx_access_seq OWNER TO vc;
ALTER SEQUENCE vpx_alarm_seq OWNER TO vc;
ALTER SEQUENCE vpx_ansfile_seq OWNER TO vc;
ALTER SEQUENCE vpx_array_seq OWNER TO vc;
ALTER SEQUENCE vpx_binary_data_seq OWNER TO vc;
ALTER SEQUENCE vpx_change_tag_seq OWNER TO vc;
ALTER SEQUENCE vpx_compliance_status_seq OWNER TO vc;
ALTER SEQUENCE vpx_drsrules_seq OWNER TO vc;
ALTER SEQUENCE vpx_entity_seq OWNER TO vc;
ALTER SEQUENCE vpx_event_seq OWNER TO vc;
ALTER SEQUENCE vpx_ext_client_seq OWNER TO vc;
ALTER SEQUENCE vpx_ext_server_email_seq OWNER TO vc;
ALTER SEQUENCE vpx_ext_server_seq OWNER TO vc;
ALTER SEQUENCE vpx_field_def_seq OWNER TO vc;
ALTER SEQUENCE vpx_file_system_mount_info_seq OWNER TO vc;
ALTER SEQUENCE vpx_host_bus_adapter_seq OWNER TO vc;
ALTER SEQUENCE vpx_image_lib_seq OWNER TO vc;
ALTER SEQUENCE vpx_ip_pool_seq OWNER TO vc;
ALTER SEQUENCE vpx_license_seq OWNER TO vc;
ALTER SEQUENCE vpx_profile_seq OWNER TO vc;
ALTER SEQUENCE vpx_psa_adapter_seq OWNER TO vc;
ALTER SEQUENCE vpx_psa_device_seq OWNER TO vc;
ALTER SEQUENCE vpx_psa_path_seq OWNER TO vc;
ALTER SEQUENCE vpx_psa_target_seq OWNER TO vc;
ALTER SEQUENCE vpx_role_seq OWNER TO vc;
ALTER SEQUENCE vpx_sample_seq OWNER TO vc;
ALTER SEQUENCE vpx_sample_time1_seq OWNER TO vc;
ALTER SEQUENCE vpx_sample_time2_seq OWNER TO vc;
ALTER SEQUENCE vpx_sample_time3_seq OWNER TO vc;
ALTER SEQUENCE vpx_sample_time4_seq OWNER TO vc;
ALTER SEQUENCE vpx_scheduledtask_seq OWNER TO vc;
ALTER SEQUENCE vpx_scsi_lun_seq OWNER TO vc;
ALTER SEQUENCE vpx_scsilun_descriptor_seq OWNER TO vc;
ALTER SEQUENCE vpx_sn_vdevice_backing_rel_seq OWNER TO vc;
ALTER SEQUENCE vpx_sn_virtual_device_seq OWNER TO vc;
ALTER SEQUENCE vpx_stat_def_seq OWNER TO vc;
ALTER SEQUENCE vpx_stat_id_seq OWNER TO vc;
ALTER SEQUENCE vpx_tag_seq OWNER TO vc;
ALTER SEQUENCE vpx_task_seq OWNER TO vc;
ALTER SEQUENCE vpx_template_seq OWNER TO vc;
ALTER SEQUENCE vpx_usage_sample_time_seq OWNER TO vc;
ALTER SEQUENCE vpx_virtual_device_seq OWNER TO vc;
ALTER SEQUENCE vpx_vm_fle_disk_layout_seq OWNER TO vc;
ALTER SEQUENCE vpx_vm_fle_snapshot_disk_seq OWNER TO vc;
ALTER SEQUENCE vpx_vm_fle_snapshot_layout_seq OWNER TO vc;

At one customer, there was 2 more sequence that need changing owner, they are not in this command line, but you can put them in your self, just run the display sequence again to check if all sequences have “vc” as owner”.

to exit out of the PSQL, use this command:

\q

Run the upgrade again.

Note: uses this solution at your own risk.

Please share this page if you find it usefull:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.