Virtual machine is associated with a wrong resource pool was the warning i had on two virtual machines in vCD. Those 2 virtual machines were also disappeared from the resource pool view in the vCloud Director GUI. Because of that, I wasn’t able to vMotion those virtual machines to the new resource pool (cluster).

In this blog post i will show you how to troubleshoot and eventually fix this type of issue.

Troubleshooting

In the resource pool view of vCloud Director 9.7 as shown below, we can only see 3 virtual machines when filtering on the customer prefix name. This amount of virtual machines was not equal to the amount of virtual machines on the cluster view of the vCenter server.

virtual machine
We have a total amount of 3 virtual machines

vcd
We have a total amount of 5 virtual machines

In the vSphere cluster virtual machine overview, we can see a total of 5 virtual machines when filtering on the customer prefix name. As mentioned before the total amount of virtual machines are not equal to the amount of virtual machines in the resource pool view of the vCloud director GUI.

We now know the virtual machine names of the missing virtual machines. The next step is to go the OrgvDC view of the customer. In the OrgvDC view of the customer, we see an error reported for the vApp that contains the missing virtual machines.

system alerts
Error: System Alerts

The warning showed in the picture below is quite clear and is also what we have have found already. There are 2 virtual machines in vCloud Director that are associated with a wrong resource pool.

warning vcd
Warning: virtual machine is associated with a wrong resource pool

If we proceed with clicking on the vApp to get into the vApp view, we now see two system alerts error messages on the two affected virtual machines.

vapp
The 2 missing virtual machines shows an error

Resolution

The first thing I did was a refresh of the vCenter instance. This will update the vCloud Director database with the underlaying vCenter server resources.

This action can be done in vCD gui (https://vcd-url.com/provider) with a system administrator user by opening the vSphere resources from the main menu. Click on vCenters in the left panel, select the vCenter server you would like to refresh and click on refresh.

Official VMware documentation about refreshing a vCenter server instance: url

Unfortunately, that did not solve the issue. The next step was to refresh the VM config in vCloud Director.

I used the flex GUI in the picture below. Open the virtual machine properties of the affected virtual machine. Add a dummy entry in the description field and click on the button OK. This will update the virtual machine config but also with the underlying vCenter resources.

Virtual machine is associated with a wrong resource pool  in vCloud Director 9.7 2
Add for example a space entry, removed the entry and clicked on ok

The 2 virtual machines are back in the resource pool view after performing a refresh of the virtual machine config. I was now able to go ahead and migrate those virtual machines to the new cluster.

Virtual machine is associated with a wrong resource pool  in vCloud Director 9.7 3

Final words

In this blog article, I showed you how to refresh the vCenter and VM config. These two troubleshoot steps could be done on the fly without any downtime.

How did we got this type of issue? It could be caused by doing any changes on the vSphere layer instead of doing it in the vCloud Director GUI. Virtual machine configuration and vMotion tasks should be handled by the vCloud Director.

If you need any help you with VMware related products, please do not hesitate to contact me.

Thank you for reading and visiting my blog.