5.5, VMware

Vmware Affinity

in the last blog “VMware DRS” i show you how to migrate machine automatically and this was the result, it moved my VM Machine “Windows 10-A” & “Windows 10-B” to the ESXi host “192.168.208.210”
8
but what if i do not want those two machines to be together and i want “Windows 10-A” & “Windows 10” to be together and “Windows 10-B” to be far away from “Windows 10-A” and not share the same host.
well there is one solution “Affinity and Anti-Affinity”
so if you go also to your Cluster – Related Objects -Virtual Machines
1
Okay lets adjust the component so we can see the host of each Machine2
Add the Host Field
3
As you can see here
Windows 10 on host (192.168.208.209)
Windows 10-A on host (192.168.208.210)
Windows 10-B on host (192.168.208.210)4
lets create first rule that will join Windows 10-A & Windows 10 Together
so lets go to Cluster – Manage – Settings – DRS Rules
5
Add a new Rule – Choose a Name
Select to Keep Virtual Machine Together
Now Add the Machine
6
I choose Machines:
Windows 10
&
Windows 10-A
7
Now Choose OK
8
as you can see if you highlight the rule it will show you the machine affected by that rules 9
Now if you go back to Cluster – Related Object – Virtual Machines
you can see that Machine Windows 10 Joined the other Machines and now become hosted by host 192.168.208.21010
and you can see the Task Detail here11
As i remembered we mention that we want “Windows 10-B” to be far away from “Windows 10-A”
so lets add another rule and this time we choose to (Separate Virtual Machines)
12
Lets choose Machines Windows 10-A & Windows 10-B13
Now press OK
14
and if you highlight the Rule you will see the affected Machines15
and if we go to the Task we will see that Machine Windows -A is moving from host 192.168.208.210 and since there is a rule to keep Windows10-A and Windows 10 together in that case also Machine Windows 10 will be moving to the other host
16
and Yup both machine now faaaaaar away from Windows 10-B
and both of Windows 10 & Windows 10-A hosted on 192.168.208.20917

Okay now we finish with VM to VM Relationship
what if i want to Keep a specific VM tagged to a specific Host
Here we go to a new thing called : DRS Group
20
Add a DRS Group and choose a name
and choose a Type should be VM DRS Group
21
First Select the VM Machine and i selected Windows 10-B
Note: make sure you dont select the wrong VM cause it will cause an issue since you have another rule that separate Windows 10-A from Windows10-B
22
and its added
23

24
Now Add another DRS Group and choose a name and Type should be Host DRS Group25
and select the Host needed
26
and then press OK
27

28
Now go back to the DRS Rule and add a rule
Type: Virtual Machine to a Host
and select the VM DRS Group and Host DRS Group that you created
29
and if you highlight the rule you will see the affected Machine30
Now you can see VM Windows 10-B moved to 192.168.208.209
an since there is an older rule that separate windows 10-A from Windows 10-B so the VM windows 10-A moved to host 192.168.208.210
also there is a rule that Join VM Windows 10-A & Windwos 10 together then the VM Windows 10 moved to host 192.168.208.210
i know that a really confusing but i suggest you read it couple of time and test it your self to get the matter
31
and that is the beautiful result
32
and you can go to the Cluster – Monitor – vSphere DRS – History to see the procedure 33

;D

 

 

 

Standard

One thought on “Vmware Affinity

  1. Pingback: Install VMware ESXi 5.5 | Root

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s