1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to correctly set up HA / VMotion in VMWare Vcenter

Discussion in 'Virtual Computing' started by Mikeyboy, Aug 19, 2011.

  1. Mikeyboy

    Mikeyboy Kilobyte Poster

    278
    2
    32
    Hello all VMWare experts...

    Just a quick question about my VMWare lab setup, I just wondered if it was possible to have HA setup so that if the vswitch which houses the vm network (the one which my VMs are currently sat connected to) fails, they will vmotion across to the other host, using the second network port? If i just give an example of what I am on about, it might make more sense...

    vcener.jpg

    If you see how I have one of my hosts set up, it has two physical NICs, and as you can see I added vswitch1 with backup service console, and vmkernel for vmotion on this one so it is using a separate switch. I know it works as I have connected to the service console at the other backup IP address OK, so do I need to add vmkernel to vswitch1? Or add vmnic1 to vswitch0 as a backup/failover physical NIC?

    the reason I am asking is, i noticed the port speed was only 100mb on my NICs, so decided to change to 1000mb, next thing I know i had lost connection, so had to connect to the console, and change the speed back to auto. When network connection came back up, all my VMs had moved to the host (the one i hadnt messed around with) but I am pretty sure they only did this after I restored the network connection. So, is it possible for vmotion to occur as soon as I mess up the network connection again? Obviously not planning on messing around with things like this all the time, just would be good to know how to do it properly :)

    Also, why did I lose all connectivity with the host? After all, what is the second vswitch there for? after I lost network connection in vsphere, I couldnt ping either service console address, but when i connected to the console on the host, and ran the esxcfg-nics -l command, it reported the first NIC as link down, but the other one as link up, so presumably, still active, why could I not connect to it?

    If someone could kindly explain what I need to add to my networking, or if what I am expecting is not possible? I am quite new to the whole ESX thing, so bear that in mind :) I have not long had my home lab set up.

    Just if anyone is interested how my lab is setup, it is 2x Dell PowerEdge 2850 servers, each with 2x CPUs, 8gb RAM (thought that was enough to be going on with), and only a measly 100mb switch, will have to upgrade to a gigabit switch at some point but it works OK for now! Using Starwind as an iscsi SAN to house my LUNs.

    Thanks for reading :eek:
     
    Certifications: VCP,MCSA, MCP, MCDST, MCITP, MCTS, A+, N+
  2. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    You would just edit the VMkernel that you want to use for vMotion

    vmotion.JPG

    You should have a read over this and then come back to update your question as HA and vMotion are two different beasts and seem to be confusing them a little ;)

    HA Deepdive » Yellow Bricks


    p.s both your NICs are on the same network which won't be helping you to much, just group them into the same vSwitch or have one on 192.168.0.x and the other on 192.168.1.x
     
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
  3. Mikeyboy

    Mikeyboy Kilobyte Poster

    278
    2
    32
    Hi,

    Thanks for the link, looks like some good bedtime reading there - my understanding at the moment is vMotion is where you move a VM from one host to another, while it is still active - HA is where the VMs are migrated automatically if there is a failure on one of the hosts.

    In that picture there, can you just explain what exactly you are showing me? just to confirm, vMotion IS enabled and working on both my hosts, and works, but I just wondered why it didnt work (or why nothing worked) when one of my NICs was down.

    Perhaps you could show me your network configuration layout screen? thanks :)
     
    Certifications: VCP,MCSA, MCP, MCDST, MCITP, MCTS, A+, N+
  4. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    After you read the HA DD and look at my "p.s" you should be able to find the answer :) unless you just want me to tell you.


    vsphere networking.JPG
     
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
  5. Mikeyboy

    Mikeyboy Kilobyte Poster

    278
    2
    32
    I will read it later :) am in work at the moment so a bit much to digest there probably :D

    two things I notice from your configuration there, you have 4 physical NICs, I have two, is this an issue, do I need more than 2? Was looking at adding an additional 2 NICs to each server. Also, you have no service console in either of your vswitches? Is that not essential? or are you on esxi...

    Also I have not set up any different subnets at home, all just on your typical 192.168.0.1 /24 network, am just learning about subnetting at the moment for 70-291 so perhaps when I am more confident I will set up a different subnet.

    This is just my home lab, but I want to learn about it all in depth as we are likely to be virtualising in work soon and it will probably be me doing most of it! So I'd like a good idea :D
     
    Certifications: VCP,MCSA, MCP, MCDST, MCITP, MCTS, A+, N+
  6. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    Not really since its only a lab

    ESXi buddy, no point messing with ESX since it will die with vSphere 4.1

    does your switch and router support vlans?
     
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
  7. Mikeyboy

    Mikeyboy Kilobyte Poster

    278
    2
    32
    Don't think so to be honest, router is just a netgear dg834, switch is an old zyxel 10/100 24 port, again pretty basic. I could still use different subnets I should imagine though?

    I have just been working with ESX 4.0 as I cant really use vcenter 4.1, as it needs to be 64 bit I believe? And my servers dont support 64bit VMs, so stuck to ESX 4.0 as I wanted to have my vcenter as a VM as well. But there we go... I can update all my software if need be I just wanted to get a good idea of how things worked intially :)
     
    Certifications: VCP,MCSA, MCP, MCDST, MCITP, MCTS, A+, N+
  8. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    Ah right, did you manage to read that article?
     
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
  9. Mikeyboy

    Mikeyboy Kilobyte Poster

    278
    2
    32
    Read that article, a lot about resources etc for HA, I dont think that answered my question really though! Am I missing the point? I just wanted to know how my networking is incorrectly configured, take HA out of the equation then, I have two NICs, I only fiddled with one, this was the one which contained one vm port group, service console, and physical NIC.

    Why would I group them into the same switch? The reason I added the additional switch etc was, I was getting warnings saying I am not configured correctly for HA, so would I be better putting both NICs on one vswitch, just having the second NIC as a failover? Will everything still function with just one vswitch? I am tempted to put additional NICs in there, I may not need them exactly but I want to set things up as they would be in a live environment if possible!
    I should be able to (or at least I want to) be able to continue as normal if one of the NICs fail, not necessarily vmotion them... If that is possible... So how is the question :)
     
    Certifications: VCP,MCSA, MCP, MCDST, MCITP, MCTS, A+, N+
  10. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    Thought I would bring this one back up to see if you worked out what was wrong?
     
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
  11. dales

    dales Gigabyte Poster

    1,997
    46
    97
    If you lost connection to the vswif's would it be possible that by changing the speed to something unsupported by whatever there was some kind of broadcast storm, did you notice if you switch was going nuts by any chance. It would be an interesting experiment to try it again and look to see what the physical switch does.

    p.s. if both switch and nic is rated a 1GB you should purchase a couple of new network cables. My iomega Nas box came with a cable that for whatever reason caused it to autoneg to 100 which was annoying.
     
    Certifications: vExpert 2014+2015+2016,VCP-DT,CCE-V, CCE-AD, CCP-AD, CCEE, CCAA XenApp, CCA Netscaler, XenApp 6.5, XenDesktop 5 & Xenserver 6,VCP3+5,VTSP,MCSA MCDST MCP A+ ITIL F
    WIP: Nothing
  12. Mikeyboy

    Mikeyboy Kilobyte Poster

    278
    2
    32
    Hi,

    I have a different switch now, everything is connecting at 1gb as it should, so fine on that front - my main question in this thread was about the configuration of my setup, what I had set up wrong...

    As far as I see it, I should be able to pull the cable from one NIC connected to vswitch 1, and the VMs should use vswitch 2 (or the other NIC) when they detect there is a loss of connection on the one NIC. I just wanted to know how this should be configured? I had to start my setup from scratch as I lost all the VMs due to HD failure (including the vcenter server itself)...

    Would be interested if anyone can shed some light, if they get what I mean, not sure I am explaining what I want to achieve correctly :D
     
    Certifications: VCP,MCSA, MCP, MCDST, MCITP, MCTS, A+, N+
  13. dales

    dales Gigabyte Poster

    1,997
    46
    97
    I dont think HA works like that all it does is detect problems with the host and not necessarily the vm's (although if the main management network is also the vm's uplinks then they should be protected by default.

    What your talking about is covered by Nic Teaming when you bond two nics to one port group you can either have them working together at the same time or configured so that one will take over from the other should someone yank a cable out of it or similar. You can set up nic teaming to either use the the link state of the nic (whether its connected or not) or beacon probing which will send out broadcast through all nics in the team, because all hosts should send these probes in a team a host should expect to receive them also, if it stops receiving the probes then it will declare the nic failed.
     
    Certifications: vExpert 2014+2015+2016,VCP-DT,CCE-V, CCE-AD, CCP-AD, CCEE, CCAA XenApp, CCA Netscaler, XenApp 6.5, XenDesktop 5 & Xenserver 6,VCP3+5,VTSP,MCSA MCDST MCP A+ ITIL F
    WIP: Nothing
  14. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    The reason HA never triggered is because the hosts where still communicating with each other over your redundant service console port (vswif1), just because it wants a redundant service console port it doesn’t necessary mean you need 2 of them, if you do what dale said and team them in a single vswitch(Active/Standby) then it would still be redundant up until your physical switch so your VMs would have just used the standby NIC when the first one failed and HA playing no part at all
     
    Last edited: Sep 22, 2011
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
  15. dales

    dales Gigabyte Poster

    1,997
    46
    97
    All HA itself does is detect whether a Host (esxi server as a whole) is having connectivity issues. you could think of it this way as well, if you had for example 2 nics which were assigned as below would you want a HA to keep the vm running but swap it to the other nic on the same host or move it to a new host on the same port group

    Domain controller --Nic1 -- Production network
    ? Nic2 -- DMZ (outside firewall)

    Nic teaming is meant as above to look after nic failures within port groups not HA which looks after hosts only.
     
    Certifications: vExpert 2014+2015+2016,VCP-DT,CCE-V, CCE-AD, CCP-AD, CCEE, CCAA XenApp, CCA Netscaler, XenApp 6.5, XenDesktop 5 & Xenserver 6,VCP3+5,VTSP,MCSA MCDST MCP A+ ITIL F
    WIP: Nothing
  16. Mikeyboy

    Mikeyboy Kilobyte Poster

    278
    2
    32
    One more question then - if I am likely to be missing the point of HA (think I'm getting there now at least) - Is it possible to automatically move, via vMotion, a VM from one host to another, if the host is shutdown / dies?

    eg. if I go along and just shutdown the one ESX host, should it detect this failure and the VM be moved to my other host, without me even noticing any interruption on the VM? Or am I right in thinking that HA moves the VM when it senses this failure, and restarts it on another host? Is it possible for the VM to stay "alive" when a host fails?
     
    Certifications: VCP,MCSA, MCP, MCDST, MCITP, MCTS, A+, N+
  17. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    Yes but HA doesn't use vMotion

    No

    Yes and Yes with FT(Fault Tolerance)
     
    Last edited: Oct 5, 2011
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
  18. Mikeyboy

    Mikeyboy Kilobyte Poster

    278
    2
    32
    you removed my "is shutdown" - what happens if i shutdown the host then? would this not have the same effect, ie. the VMs would move to another host?

    And yeah I discovered it required FT, my test servers dont support it though so cant test... nevermind!
     
    Certifications: VCP,MCSA, MCP, MCDST, MCITP, MCTS, A+, N+
  19. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    Can't really find what I was looking for and can't get onto the lab until tomorrow but I would say that by shutting down the Host it would also shutdown the running VMs(Normally you would put into maintenance mode and let DRS move the VMs before shutting down) and HA works on the last known state which I reckon will be powered off although if you have you lab up now then try it and look at the console to see if it shutdown the VMs
     
    Last edited: Oct 6, 2011
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
  20. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    I asked Duncan Epping what would happen if you shutdown a host with running VMs and he said that HA would class it as a failure
     
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
    dales likes this.

Share This Page

Loading...