(...)DeployVmOnFabricsActivity,urn:uuid:XXXXXXXXXXXXXXX)
java.lang.IllegalArgumentException: [vcId=XXXXXX, moref=vm-XXXX] not on same VC as [vcId=XXXXXX, moref=resgroup-XXXX](...)
10.3.3
The error states that is not possible to move the VM vm-XXXX to the correct resource pool, while powering on since resgroup-XXXX belongs to a different vcenter ID
This can be caused by incorrect migration or move of VMs that stay on old places inside vcd database
Read 'Additional Information' section before running these steps
From the logs collect bellow information:
Find inside vcd database where is this VM moref located:
select name,moref,resource_pool_moref,vc_id from vm_inv where moref='vm-XXXX';
Notes:
With this value you will need to find the provider VDC running this command:
select name from prov_vdc where id in (select prov_vdc_id from org_prov_vdc where sub_rp_moref='resgroup-XXXX');
With the name of the provider vdc from the previous command, you can now list all details from this Provider, filtered by it's Organization VDC: (replace ProviderVDC_NAME)
select
ovdc.name as Org_vDC,
vrp.id as vrp_id_vcd,
rpinv.moref as sub_rp_moref,
rpinv.parent_moref as cluster_moref,
vrp_rp.*
from org_prov_vdc ovdc
left join vrp_rp on vrp_rp.sub_rp_moref = ovdc.sub_rp_moref
left join vrp on vrp.id = vrp_rp.vrp_id
left join resource_pool_inv rpinv on rpinv.moref=ovdc.sub_rp_moref
where ovdc.name in (select name from org_prov_vdc where prov_vdc_id in (select id from prov_vdc where name like 'ProviderVDC_NAME'));
The output will list:
Now you know the correct computehub_id, vrp_id and sub_rp_moref so keep it in your notes.
List the current (incorrect information) with this command: (use the correct VM moref you got on previous step)
select deployment_status,id,vmmoref,computehub_id,vrp_id,vc_id from computevm where vmmoref='vm-XXXX';
This output will show:
update computevm set vrp_id='Correct_vrp_id',computehub_id='Correct_compute_hub_id',deployment_status='DEPLOYED' where id='Replace_with_id_from_previous_step';
Test the Power on
sudo -i -u postgres psql vcloud
\q