When a VM is deployed with in an Affinity group which has the cluster dedicated to a subdomain (zone is dedicated to parent domain) it is getting successful. We can also stop the vm and remove the affinity group, but if you want to add back the affinity it is failing.
Following are the steps to reproduce
1. I had created a Domain (Glass SA Parent Domain) and under it a subdomain (Glass SA Subdomain) and created an account to it.
2. Apply dedication to the zone for primary domain (Glass SA Parent Domain)
3. Apply dedication to the cluster for sub domain (Glass SA Subdomain)
4. Logged in with the Account of Subdomain.
5. Created an instance with the affinity (DedicatedGrp-domain-Glass SA Subdomain) - the dedication set with the cluster for the subdomain.
6. Powered off the VM, removed the affinity.
7. Tried adding back (the cluster affinity subdomain) - gives the error "Entity affinity Group () and entity Acct () belong to different accounts"