Cloud Director VM compliancy
If you create a VM in VMware Cloud Director you can choose a compute policy (T-shirt size) and/or placement policy.
With a placement policy, you can control where the VM should run. This can be useful for VMs with a specific OS (Windows) where you want to pin them on one or more specific hosts. Or for VMs that need to run at a dedicated data center.
With the compute policies you can control the configured resources but also if those resources will be reserved or not. Even if you didn’t create a compute policy there will always be a default one. However, in this default system policy, nothing is configured.
So with these policies configured, what would happen if you changed the VM from vCenter instead of Cloud Director? Simple, the VM would become non-compliant.
An example…
Consider a virtual data center (VDC) configured with some CPU and/or memory reservations and you want to get rid of those reservations. You can change this from the Allocation settings in the VDC and set the guaranteed resources to 0%. But if there were VMs already running those VMs would still have the old configured guarantees. So you go to vCenter and change the reservations to 0.
If you do this you would end up with a VM that is no longer compliant. To make the VM compliant again you can run the following PowerCLI command:
foreach ($vm in $vms) {if ($vm.ExtensionData.IsComputePolicyCompliant -eq $false) {$vm.ExtensionData.ReapplyComputePolicy()}}
Better is to avoid these compliancy warnings and never change a VM from vCenter! Always do the configuration from Cloud Director!