ricky73
Hot Shot
Hot Shot

isolate vm on host

Can I reserve only one host for a specific VM?

I have 6 hosts (HA+DRS) and 60 vm but I need to use a single host where I can run only my vm.

I have to disable DRS?

15 Replies
akblpatel
Enthusiast
Enthusiast

If you want a Virtual Machine(s) to only run on a particular ESX/ESXi host, you must create affinity rules to prevent DRS from auto-migrating the virtual machines to other ESX hosts

To create an affinity Rule in vCenter, see the below steps:

  1. Right click the Cluster > Edit Settings.
  2. Enable DRS, if it is not already enabled.
  3. Click Rules > Add.
  4. Click the DRS Groups Manager tab.
  5. Click Add under Host DRS Groups to create a new Host DRS Group containing the hosts in the cluster that you want to tie the VMs to.
  6. Click Add under Virtual Machine DRS Groups to create a Virtual Machine DRS Group for all of the virtual machines that you want to tie to hosts listed in the Host group created above
  7. Click the Rule tab, give the new rule a name and from the Type drop-down menu, click Virtual Machines to Hosts.
  8. Under Cluster Vm Group select the newly created VM group.
  9. Select Must run on hosts in group
  10. Under Cluster Host Group select the newly created Cluster Host Group and click OK.
ricky73
Hot Shot
Hot Shot

I want that the specific VM was the unique one which will run on single host.

If I have 6 hosts and 50 vm, I'd like to choose host "number 2" and to free of all VM excluded my specific VM.

I need to have exclusive use of host for only one VM.

I think it's not possibile by DRS rules.

0 Kudos
IBM_India
Enthusiast
Enthusiast

yes you can reserve with the help of DRS rules

no need to disable DRS, but set rules for you VM that must be kept VM o this Host

if you think this post is helpful, please provide points accordingly thanks Zubair Technical Specialist
akblpatel
Enthusiast
Enthusiast

You can create an anti-affinity rule for that host so that DRS will not migrate no more VMs on that host.

0 Kudos
vAMenezes
Enthusiast
Enthusiast

When creating the DRS rule, make sure you use "should run on host" if you want that VM migrated to another host in case that host crashes. Otherwise your VM will not be powered on in case that host fails. That might just be what you need, but please keep that in mind.

IBM_India
Enthusiast
Enthusiast

yes you can

if you think this post is helpful, please provide points accordingly thanks Zubair Technical Specialist
0 Kudos
kanishks
Enthusiast
Enthusiast

Hello Ricky,

Yes you can do that by creating Host Group and VM Group and you can create must rules which will ensure that your VM is not being load balanced by DRS and will continue to Run on the same Esxi host which you want.

Kindly mark this as helpful or correct if this answered your question.

Rgds

Kanishk

ricky73
Hot Shot
Hot Shot

Example: 5 host + 70 vm

I'll associated VM1 to HOST4 creating affinity rule (vm DRS group to host DRS group) but now I can free HOST4?

I thought...I have to create new vm DRS group (which will contain all VM except VM1), to create new affinity rule which will associate this new DRS group by "should not run to" HOST4.

What do you think?

By the way when I will create a new VM... I'll have to remember to add it to "vm DRS group".

0 Kudos
kanishks
Enthusiast
Enthusiast

When u are creating a Must rule than yes your VM will never be moved to another host (That specific VM) but others VMs will also be running on that host because DRS will ensure load balancing is their and will keep other VMs also on that host with that VMs.

If you dont want that anyother VM except the first one should run on this host in that case you can define a soft rule (VM Group -Put all your VMs their should not run on Host Group- That Esxi host) In this scenario VMs will only be moved to this Esxi if the other one hosting them fails as it a soft rule.

Hope this helps.

Rgds

Kanishk

ricky73
Hot Shot
Hot Shot

Infact you are saying me the same thing I told you in previuos post Smiley Wink

My question: in this way every time I'll create new machine I'll have to add it to vm drs group which contains all vm except VM1. Right?

Himanshu_vmware
Enthusiast
Enthusiast

I will suggest to create a new cluster and put the that host alone in it and host your VM their, because most of the times what happens the DRS rules fails to apply when HA happens.

Could you please tell me why do you want to dedicate a host for this VM.

Please mark the answer helpful or correct, thnx

0 Kudos
ricky73
Hot Shot
Hot Shot

I'm not able to understand:

<<because most of the times what happens the DRS rules fails to apply when HA happens>>

I want to dedicate single VM to single host for to create a test environment (where VM will host databases) so I want that Hypervisor dedicates all host resources to single VM.

Perhaps I could to set pool for this scope?

0 Kudos
R_Brightwell
Enthusiast
Enthusiast

Why not just take it out of your DRS cluster and have it as a stand-alone if you never want anything else on it?

0 Kudos
vAMenezes
Enthusiast
Enthusiast

Yeah, seems like in this case you might be better off removing the host from the cluster and leaving it alone. Keeping in mind that if it crashes, that VM will go down.

But if that's not a problem, then that's the way to go, easier management.

0 Kudos
Himanshu_vmware
Enthusiast
Enthusiast

Using pools you can not dedicate the host to your VM.

Its better to move that host out of the cluster and make it standalone and then host the VM on it.

But in that case only risk is that if host goes down the VM will also go down.

0 Kudos