Starting with System Center 2012 Sp1 Microsoft gives the oportunity to configure Availability Sets which work the same as the Anti-Afinity rules that can be configured in Failover Cluster Manager through PowerShell. By creating an Availability Set for two VMs, VMM will take care that those VMs will run on different hosts and that will never be placed on the same host. This is an improvement, especially if you are using guest clustering or you are running virtualized Domain Controllers. Also, Dynamic Optimization will never move 2 VMs with the same availability group onto the same host, but will try to keep them seperated.
In order to configure Availability Set you have to open the properties of one of the virtual machines and go to Hardware Configuration and then choose Availability.
Click on Manage Availability and create a new availability set for your virtual machine. You now have to choose a name that represents the scope of that availability set.
After you have created the availability set and saved on the first virtual machine you can go on the second one and assign the same Availability set.
Now Virtual Machine Manager will try to keep those virtual machines on separate hosts.