When you disable DRS on a vCenter cluster all resource pools in the cluster are deleted. When vCloud is managing a vCenter cluster it creates various resource pools to store its VMs in, and if the vCenter resource pools are deleted, vCloud will be unable to manage its VMs. In this article I’m going to how to recover from disabling DRS on a vCloud controlled vCenter cluster. The best way to recover from this issue is to restore the vCenter & vCloud databases to the same point in time. The problem with this is that you lose any information since the backups and may be left with VMs on the hosts that vCloud and vCenter don’t know about. I believe that VMware also has a tool that can fix this issue so I’d call them as well. This post is more informational and to reference if you’re all of of options. Since we will be editing the vCloud database in this post, please make sure you back it up before proceeding.
vCloud / vCenter Configuration
I have a single org vDC named ‘admin-payg’.
Here is the view from vCenter.
Inspecting the databases
Now I’m going to query the vCenter and vCloud databases to show the current data.
vCenter is vc55a
vCloud is vcd55b
Display vCenter’s resource pools
The id column contains the resource pool moref so the moref of the admin-payg resource pool is 302. Keep this in mind.
Now we will look at vCloud’s database.
Display all org vDCs and their related vCenter resource pool
We see that the vCloud org vDC ‘admin-payg’ is mapped to a vCenter resource pool with a moref of 302.
Display the vCloud vApps, their vCloud org vDC and the moref of the underlying resource pool
We can see that our Linux-Minimal vApp is in the admin-payg org vDC and that org vDC’s resource pool.
Display org vDC resource pools and their morefs from the vrp_rp table
Disabling DRS on the cluster
Starting with vCenter 5.1, you can now save resource pool trees. See Retaining resource pools when disabling VMware DRS clusters for more info.
When we disable DRS, save the resource pool snapshot.
After DRS has been disabled you can see that there are no resource pools in the cluster.
If we try to power the vApp on in vCloud, we get:
Restoring the resource pool
Turn DRS back on and then perform the following:
Select the resource pool tree snapshot and upload it.
Inspecting the databases after the resource pool tree has been restored
Here are a few queries and their results.
Getting vCloud back in sync with vCenter
From the queries above we can see that vCenter has our ‘admin-payg’ resource pool moref as 307 while vCloud still thinks it’s 302. We need to update the following tables with the new moref of 307:
vrp_rp
org_prov_vdc
update vrp_rp set sub_rp_moref = ‘307’ where sub_rp_moref = ‘302’
update org_prov_vdc set sub_rp_moref = ‘307’ where sub_rp_moref = ‘302’
After these tables have been update vCloud will be able to manage the VMs in these resource pools.
Hi,
Your page help me allot and I recovered all resource groups for my vCloud.
BTW when running the 2 queries,
update vrp_rp set sub_rp_moref = ‘307’ where sub_rp_moref = ‘302’
update org_prov_vdc set sub_rp_moref = ‘307’ where sub_rp_moref = ‘302’
it wont find/update anything, you will need to add for example ‘resgroup-307’ instead the ‘307’
Thanks,
Elad
I’m glad it helped and thanks for the correction.
It works but only for standard OrgvDC virtual machines.
What about System vDC and vshield vms – do you have any idea?
There is no System vDC resource pool in org_prov_vdc table.
Regards
LWA
Hi,
I found how to fix the problem with the System vDC resource group (this resource group is in charge of all Edge GW routers)
I used this link from VMware https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2073392
To find the new System vCD ID number on the vCenter SQL database run the command – ‘use vc.database select * from VPX_entity where TYPE_ID = 4’ look for the System vDC ID number
To find the Service_rp_moref old ID run the command on the vCloud SQL server – ‘use vcloud select * from vc_computehub’
For example:
The new ID for the System vDC that we got from the vCenter database is 51783
The old ID that we have on the vCloud database is – 1311
To fix it run the command on the vCloud database – update vc_computehub set service_rp_moref = ‘resgroup-51873’ where service_rp_moref = ‘resgroup-1311’
Reboot the vCloud server and you done.
Regards,
Elad