Link to home
Start Free TrialLog in
Avatar of Mr.X
Mr.X

asked on

how to make virtual machines fall back to their original servers when 2 host are in HA mode.

Hi,

i got 2 vpshere hosts. - running esxi 6.5.0 in HP Proliant servers.
host 1 running - 5 vm
host 2 running - 5 vm
both hosts are in HA mode.
so when host1 goes down, all 10 vm starts to run on host2 .  - this part is working good as expected.

but again when host1 comes up- the vm are not falling back again to host 1 from host2 .. -- how do i make it to work ? ? ? currently i had to manually move vm from host2 to host1.
Avatar of Aaron Tomosky
Aaron Tomosky
Flag of United States of America image

does it matter ?

do you have DRS enabled ?

Interesting case...although i am not quite familiar..the way i see it is by running scripts on Host1 startup...if Host2 has "taken" the machines you can check on them and use esxi cli to get them back

Execute ESXCLI commands during ESXi startup

How to migrate a vm from one host to another by command line




Hi,

yes it can, you have to create VM/host affinity rule on the cluster (cluster / configure / configuration / VM/Host rules)
DRS must be licensed and enabled on the cluster
Avatar of Mr.X
Mr.X

ASKER

Hi Mr tortu(r)e,

i got vmware vcentre 6 server essential license.

can i enable vsphere DRS when the hosts are turned on ? ? and what automation level i should be selecting ? (manual/partial/automatic)


i already have a host rule- which says VM1 needs to run on host1.  - - i dont want this to be affected regardless of what automation level i select. because vm1 runs a specific software which can run only on host1.    
so which automation level i should select ? ?  and how to set other host rules ?
Avatar of Mr.X

ASKER

hi,
I actually checked my license . it’s essential plus
and DRS is not available. even though it shows in my vcebtre web client , it’s not gonna work.

so am trying to figure out with HA, why vm are not going back to its original host.
If you are not licensed you cannot use DRS.

Manually move them back, vMotion.
Avatar of Mr.X

ASKER

I found that I cannot use DRS

so with HA, does it not gonna work ?
 I mean will it not move back the vm to its original host, when it comes online ?
Manually move them back, vMotion, is it such an issue, if HA has done it's job?

Even with DRS, in the event of a HA event, because a host has crashed you may end up with an un-balanced Cluster, until 5 minutes has passed for DRS to kick in and start moving VMs around your cluster.

You need to think of it this way, what would you rather have VMs down, or running ?

and how often are your ESXi hosts crashing ? <---- this is more important to work out why they are not stable.
Avatar of Mr.X

ASKER

ok. am trying to understand what HA really does .
if there are 2 hosts, each has 5 vm . if host 2 is shutdown.
all 5 vm from host2 goes to host1.
so host1 has 10 vm. —— does HA do only this ???

or when I turn on host2 again, does the HA move back those 5 vm again back to host2. so both host1&2 has 5 vm as original ?
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mr.X

ASKER

ok. got it .
so if the host comes back online again from uncontrolled shutdown .  will the vm move back again to its host ???  
that’s my question
ok. got it .
so if the host comes back online again from uncontrolled shutdown .  will the vm move back again to its host ???  
that’s my question

 no.
Avatar of Mr.X

ASKER

ok. thanks for it.
that’s what am trying to find. - you answered it now.

because recently I was doing service pack upgrade on host2, so while restarting, it moved back all my vm to host1. and when host2 came back online again, no vm moved back from
hsot1 to host2.   that’s the reason I started this question and thought my HA function not working properly

anyway I got the answer as no and it has to be manually moved. thanks