Welcome back to vSphere 8 in the real world and now we're going to discuss fault tolerance.
So this is a scenario where when we discussed HA previously we talked about we had a host that
failed and when the host failed all the VMs went down and we restarted the VMs up on other hosts
and there was you know this period of downtime and it was minimal right it was minutes you know
not hours or days it was you know single digit minutes hopefully and we also discussed when we
talked about HA preventative HA or preemptive HA to where we can say oh a host isn't doing well
and so maybe we need to evacuate the VMs off this host using DRS and vMotion them off before we had
this host failure but all those things kind of revolve around the host right and then we also
have HA for VMs and we were going to say okay we're going to shut this VM down and we're going
to start the VM up someplace else because we're having you know this VM seemed to have crashed or
something like that and again we're seeing downtime with right with both those scenarios most of the
time we see at least a few minutes of downtime what if we have an application that we can't
afford to have downtime we need this application up you know 24-7 and we can't afford to be any
downtime that's what fault tolerance is about so fault tolerant VMs is not a host by host scenario
it's a VM scenario we're protecting a VM not protecting the VMs on the host we're protecting
an individual VM and so we have this mission critical VM it'd be very you know catastrophic
to my business if it was down even for you know 10 minutes or something like that and so we want
to protect this VM and so what we can do is we can enable fault tolerance on a virtual machine
all right and this will protect whatever workloads are on that VM from seeing anything
more than maybe a couple of seconds of of interruption in service
so what can happen is we can go into a VM and we can say we want to enable
fault tolerance on a VM on you know on a VM by VM basis and what happens is then it will create
start this wizard and say okay where do you want to put this other VM we're going to put it onto
another host because if both the VMs are on the same host and we have a say a host failure then
our fault tolerance is no good so we're going to put the VM onto another host and we're going to
run a second copy of the VM on that host now that second copy though isn't really live what's
happening is everything's happening on the first on the primary and then all the changes are being
logged to that secondary so the RAM is being replicated over the CPU registers everything
in the CPU state is being replicated over so if that primary one fails the secondary one
is at the exact same place it has the exact same memory it has the exact same CPU state
and it can just then kick in and take over with only like a momentary you know uh interruption
and the two keep track of each other so if the primary fails then that secondary becomes my
primary and it takes over and it picks up right where the first one left off and then it creates
a new secondary on another host okay so we can keep this kind of scenario going we can keep that
protection live so if we lose our primary and we fail over to our secondary that becomes primary
we're not no longer protected because a secondary a new secondary is created all right so we can
take over anytime applications are going to be right where they left off uh data is you know
on the on the hard drives right where you know it was but nothing changes there we point the same
spot and that VM just takes over right away all right so one thing to consider when you're doing
this you might think well that's awesome why don't we just do fault tolerance on all of our VMs well
because you'd be doubling the capacity of the compute capacity needs of your cluster you're
going to need twice as much RAM twice as much compute you know so you'll need basically twice
as many hosts because those hosts are running a copy of that VM even though all the work's really
being done on that primary one all the copies and changes are you know being copied over to the
secondary one so all the RAMs being utilized and things like that still CPUs are being assigned to
that secondary even though they may not be doing the actual work CPUs assigned to them
so you want to you know do this sparingly to the VMs that are really critical that are worth
basically taking up twice the resources for because you're using the same amount of resources
with that primary on that host as you are on the other host using the secondary so make sure you
really do need fault tolerance because it does you know take up a lot of resources all right
so if you haven't that sense of the failures so this is not a batch process what that means is
that there's certain jobs that are just going to kind of build up you know queue them and then we'll
run this job right and so if that were to be interrupted for a little bit for a few minutes
it may not be really that impactful to your business that queue can build up and then we
can run those jobs when it when it comes back up again a few minutes later HA can handle that
but if it's something that needs to be done in real time it needs to be responded to right away
you have users clicking buttons expecting responses back or or maybe the other applications
or you know IOT devices anything that's going to be expecting a response right away and an
interruption is going to cause a problem with you know an assembly or with you know an end user
doing something or something like that you want to then consider using fault tolerant VMs so fault
tolerant VMs will ensure that end users don't even notice a hiccup on the network at all okay
so again only the very critical VMs that are going to be sensitive to any small interruption
and services okay it also says if HA is too complicated to configure you might consider
fault tolerant VMs they both have their challenges and you can't run fault tolerant VMs without HA
so if you have fault tolerant VMs you're also running HA so to use fault tolerance you're going
to want to enable the fault tolerance on the VM so you're going to find the VM that you want to
enable fault tolerance on right click on it you're going to go to fault tolerance and you can
say you want to turn on fault tolerance and you're going to go through a little wizard and you're
going to specify you know where you want the fault tolerant log for the second VM to be stored
a data store for those and it will actually create a second VM so when you go and you look at you
know the first host you'll see the name of the VM and it'll say primary and on this other host
you'll see the name of the VM and it'll tell you it's secondary
so best practices for fault tolerance you need to keep your CPU frequencies consistent you want to
have very identical hardware across your host you don't want to have platinum processors on some
and bronze or silver on others that kind of thing you want to make sure that you have
you know the same processors across the board same hardware you don't want any problems with
VMs being compatible on one versus another obviously you don't want different generations
of processor even they're all intel and they're all the you know same family you don't want to
different generations and things like that you want identical hardware across them all
okay disable the DPM on the host so for your fault tolerant VMs you don't want to have any
problems executing the code on those virtual machines and check the time again you don't
want your clocks out of sync you're going to see in a lot of different services a lot of scenarios
with VMs vSphere it's very time sensitive make sure your clocks are always in sync so basically
use NTP make sure you have NTP configured and NTP is working correctly in your environment
how specific NICs receive the traffic types in this case your fault tolerant logging you want
NICs dedicated to the VM and you want a NIC dedicated to your VM kernel that you're using for
your fault tolerant logging so you want to go to your VM kernel port on all the hosts that are
being that cluster for fault tolerance and you want to make sure that fault tolerant logging is
enabled on them right and you want them to be you know across the board the same and you want your
VMs to be across the board your host for your VM networks across the board you want that to be the
same too you want your network behavior to be consistent 10 gig NICs for your fault tolerant
logging will be good you want very low latency very low latency high throughput enable jumbo
frames get as much through those as you can when you're doing your fault tolerant logging
so for the cluster ensure all the nodes are compatible so that goes back to not just the
processors you know make sure all your nodes are compatible for for ha for you know it basically
works with vMotion you're probably in a pretty good shape for ha but you want your you know your
network cards network port groups all that configuration the same your processors the same
common data store access you want all your hosts to be able to see the same storage if one host can
see the storage for that VM and the other host cannot see the storage of that VM lives on then
it won't be able to participate with fault tolerance on for that VM so make sure all the
hosts can see all the all the data stores and that goes back to vMotion too right because you
can't be motion of VM from one host to another so that's another example vMotion works there's a
better than average chance that fault tolerant logging will also work consistent network
configuration consistent BIOS settings you want your BIOS is to be the same you want to make sure
you have the same features turned on and turned off on all the different hosts in your cluster
and then check compliance often so make sure that a great idea would be to use like a host profile
and make sure that all the hosts are using that same host profile and that they're all
in compliance with the host profile make sure all your hardware is on the hardware compatibility
with you know VMware and then make sure that all the hosts are running the same
type of processors and things like that in your cluster
okay so for your ISO storage if a VM is using an ISO it's best to have it on shared storage
so that way the when the VM moves from one to another it can access it basically you don't
want to have a VM attached to a like an ISO for example for cd-rom drive that's on local storage
for that host because obviously that's not going to work when that VM happens to be running on
another host later that goes back to again vMotion right vMotion wouldn't happen on either so good
idea just to make sure that we have all of our ISOs and things that are going to be connected
to the VMs in some kind of shared storage that all the hosts can see so vSAN you don't want to
mix your data stores right you want to have a consistent you know data stores a type different
types of disks same number of disks in a you know in a data store that kind of thing and when you're
working with vSAN you can have what's called a fault tolerant domain and so we can say that we
don't want the secondary VMs logs to be in the same fault tolerant domain on vSAN as what the
VM is the primary VM is running on so just make sure that we have things separated so that we
don't have a single point of failure in our vSAN environment or in our vSphere environment for our
fault tolerant VMs so with fault tolerance we discussed when to use it and some best practices
let's just go ahead and jump into our lab environment and look at how to enable fault
tolerance on the VM so here we are in our vSphere environment and if we go in and we look one thing
that we have done already on our network is I went in on these hosts and I enabled fault
tolerant logging on the VM kernel port vmk1 on both the hosts there so we had that part already
done so now if I were to go to this virtual machine I could say okay I want to go in and I
want to enable fault tolerance on this VM and I'll go to fault tolerance and you notice I can't
there all the options are selected default tolerance is completely disabled
so what I probably need to do is go to my cluster and high availability is turned off
so if I go to edit high availability and I turn this on and say okay I'll go ahead and I'll let
the cluster get reconfigured this does take a few minutes for all the different things to take effect
to reconfigure the cluster configure the host we'll let this run and when this is done running
we'll come back and we'll try to enable fault tolerance on this VM again all right so ha is
configured that did take a few minutes and you can see all the different tasks that were completed
you know during this it did some things on the cluster it did configure the host for ha
right and then it finished up with you know a configuration of the cluster so now ha is
configured on my host so now if I go to my virtual machine and say fault tolerance now
I can turn on fault tolerance on this on this particular virtual machine so I'll say turn on
fault tolerance and I have my database or my data store here I can choose I'll go ahead and say next
and I only have one host that's available because it's running on the other host so I'm going to
say I want my secondary to be on 38 there say next and finish that and notice my demo VM is
what I have running here now I'm turning on fault tolerance and now it tells me this is my primary
now there is some problems with these virtual machines these are all these hosts are just VMs
and there's some hiccups on there but we'll see if we go to 38 and go to VMs I have my secondary here
and this should be running but because of the virtual environment running on it doesn't
but normally you would see that VM running there 38 my primary is 39 and so we see that the system
did try to configure fault tolerance and we did create the virtual machines that we are hoping for
we just have a little hiccup with compatibility because the hosts are not physical hosts or
virtual machines and some configuration jokes on there but basically we were able to go in and
configure fault tolerance and it's really that easy so these were actual physical hosts and we
had host profiles configuring them so our configurations were exactly the same and we had
the right you know CPUs settings on them on the physical boxes in our BIOS this guy was started
right up and we would actually have the secondary running and if the primary were to fail it would
fail over and this guy would take over you very very quickly like like in a second or so so that
is how you configure fault tolerant VMs