YouTube Transcript:
Virtual Machines explained in 15 Mins
Skip watching entire videos - get the full transcript, search for keywords, and copy with one click.
Share:
Video Transcript
View:
in this lecture we're going to learn
about a very important concept in the it
world
which is virtualization and virtual
machines
we're going to see what virtual machines
are and why are they so useful
and learn all the main concepts of
virtualization
once we learn the concept of how virtual
machines work
we're going to see it in action in the
demo part by
creating a linux virtual machine on our
computer
using a popular open source software
called virtualbox
i am nana and i have taught hundreds of
thousands of people around the world
how to advance their devops skills
through my youtube videos
online courses in the six month devops
bootcamp
if you're new here be sure to subscribe
as i upload new videos
all the time now let's see what a
virtual
machine is imagine you have a windows
computer
and as we learned a computer has
hardware like cpu
ram and storage so we would have windows
operating system
on top of that that controls how
applications
use these hardware resources and on top
of the windows operating system you
would have applications
that talk to windows so everything's
cool here
now what if you wanted to use linux
instead
maybe for your work or maybe you just
want to learn a
new operating system for that you will
need a machine
with hardware resources and linux
operating system
on top of that and then you could run
applications
on that linux operating system so
basically you would need another
computer another laptop
where you would install that linux
operating system
now what virtualization is is that
you don't need a separate physical
hardware or physical computer
to install an operating system you can
install linux operating system on top of
the windows os or vice versa
you can install windows on linux or
windows and linux on mac os
you can do any combination basically you
can even do windows
on windows or linux on linux and you can
achieve that
using something called a hypervisor
hypervisor is a technology that allows
hosting multiple virtual computers on a
physical
computer on top of the operating system
that you already have
installed and one of the most popular
hypervisors out there
is virtualbox from oracle
and one of the main reasons for its
popularity is because it's
open source and virtualbox actually
works on
all operating systems and it's pretty
easy to use so virtualbox will
let you create a virtual computer on
your windows computer
by telling the windows operating system
hey can i have some of your hardware
resources
that you manage to create a virtual cpu
virtual ram virtual storage for my
virtual computer
and as i said you can have multiple
virtual machines that are running on
your
computer through a hypervisor
now note here that you can only give the
virtual computer the hardware resources
you actually
have available on that computer if you
have
eight gigabytes of ram and your windows
is using
four gigabytes and you give your virtual
machine
another four gigabytes then you have no
ram
left to be used for another virtual
machine so you can't create another one
so basically now you are sharing the
hardware resources of
one machine to run multiple
virtual machines so this means that as
long as you have one computer with one
operating system
using the hypervisor like virtualbox you
can install
other operating systems on top of it but
these virtual machines
actually don't see each other and
they're completely isolated
so the virtual machine itself thinks
that it is an independent computer it's
the only one
running on that computer it doesn't even
know that it's a virtual machine
and it doesn't know that it's hosted on
top of another operating system
and that separation is actually great
because
if something happens to that virtual
machine
something breaks inside or someone hex
inside that virtual machine
it won't affect the main operating
system
the main os probably won't even know
that the vm has
some issues and it doesn't care so
when this happens you can just delete
that vm and create a fresh new one
super easily now you're probably asking
what is it actually good for
what is the usage or benefits of having
a hypervisor and having virtual machines
on your computer first of all it's
really great for learning new operating
systems so now you don't have to go and
buy a new computer and install
and linux on it you can basically just
host it
on your windows machine if you want to
maybe you want to
just experiment and play around with an
operating system but you don't want to
actually
destroy or endanger your main operating
system
so you can quickly spin up a virtual
machine
you can play around with it and do all
the stuff that you want
and then once you're done with it you
can just basically remove it
another great use case for virtual
machines
is if you want to test an application
like a web application that you're
developing
maybe you want to see how that works and
how it looks like
in different operating systems in
different browsers so you may be
developing on a mac os laptop
and you want to see how your application
performs on linux machine in a firefox
browser and you may
also want to see how your application
runs on windows
in internet explorer browser so you can
create virtual machines
for both of these combinations and test
your application
there and when you're done you can just
delete them
before moving on i want to give a shout
out to kesten who made this video
possible
castings k10 is the data management
platform for kubernetes
k10 basically takes off most of the load
of doing backup and restore in
kubernetes
from the cluster administrators it has a
very simple ui so it's super
easy to work with and has an intelligent
logic which does
all the heavy lifting for you for my
viewers
casting provided an ebook kubernetes
backup and recovery for dummies
which you can download for free so be
sure to check out the link in the video
description
and now let's see what's the difference
between type 1
and type 2 hypervisors and this type of
hypervisor
that i just described which is basically
creating virtual machines on top of an
existing operating system
is called a type 2 hypervisor
so you have the host operating system or
the main operating system which is
already installed on the hardware on
your machine
on that operating system you install a
hypervisor like virtualbox
right so on windows you install your
virtualbox and then
using the virtualbox you can now install
guest operating systems and the guest
operating systems as i said
will borrow the hardware resources from
the host operating system
and the type 2 hypervisors are typically
used for personal computers
for the use cases that i just described
however for big servers that companies
are using
you have the second type of hypervisor
which is
type 1 hypervisor which actually works
in
exactly the same way however the main
difference here is that
instead of installing a hypervisor on a
host
operating system you basically install
it directly
on the hardware and that's why the type
1 hypervisors are also called
bare metal hypervisors so the hypervisor
actually controls the hardware resources
instead of
talking to the host operating system
whether it can borrow the resources for
its virtual machines
so it sits directly on top of that
hardware
and controls everything and some of the
popular examples of
type 1 hypervisors are vmware
esxi or microsoft's hyper-v
and once installed basically the concept
is the same
as with type 2 hypervisors you basically
just install
any operating system on top of it so for
big servers you'll have
one physical server with a bare metal
hypervisor
installed on it and then you would have
multiple
virtual machines that are running on
that hypervisor
all sharing the same hardware resources
and type one hypervisor
is mostly what those big companies
and big cloud platforms actually use to
create and run their whole
infrastructure
so when you create a server instance on
a cloud platform like aws
or digitalocean or google cloud or
whatever platform
you're creating these virtual machines
on a physical server
and other users who create an instance
may get a virtual machine on the same
exact physical server
as your virtual machine but as i said
these vms are completely isolated they
don't know anything about each other
so if something happens in one virtual
machine if someone gets
hacked whose vm is on the same physical
server
you won't even know it because each vm
is running in its own isolated
environment right
they don't share network they don't
share any resources they don't share
anything they're completely independent
from each other
now i give you some examples of why type
2
or also called hosted hypervisors are
useful right
for using them on personal computer but
what are the use cases
of the type one hypervisors so what is
basically the big advantage of companies
going out there
and using this virtualization
on their server infrastructure one big
advantage
of using virtualization and hosting
multiple virtual machines
on one physical machine is efficient
usage of hardware resources
because now you may have these
performant big servers on a cloud
but you can actually or cloud provider
can actually let the users
put together any combination of
resources
they want in their instance by picking
and choosing
how much cpu how much ram how much
storage they want
so they have this flexibility of
choosing the size of their instances
because everything is virtualized right
the ram
and cpu and storage so all of these
resources are virtualized
so that's one big flexibility so now the
cloud providers they can actually use up
all their server
physical server resources by actually
dividing them
into small pieces that are then used
by virtual machines now there is one
more
very important benefit and basically
transformation that happened
in it industry because of virtualization
and that is basically abstracting away
the operating system that is running on
the hardware
from the hardware itself and that
abstraction actually is a really big
deal and let's see
why so before virtualization when a
company had a server like
their own database server or a server
where jenkins was running
they would manage it themselves like
install an operating system directly on
it and then start
installing applications on that
operating system like installing and
configuring jenkins
or installing database application etc
and when the operating system is
installed directly on a hardware without
that
hypervisor layer in between that
operating system is then tightly
coupled to the hardware that means
if the hardware component of the
computer failed
like the hard disk exploded or the
motherboard failed whatever
and you couldn't replace that component
because maybe it was an
old server and you couldn't find that
component anymore or maybe it was just
not
repairable anymore for whatever reasons
it meant your whole computer would be
useless
and the operating system and the
applications you installed and
configured on it
and all the data would be gone so
relying on that one physical box
meant one point of failure and therefore
high risk of losing all the services
running on that machine with
virtualization however
you have your operating system as a
portable
file that you can move around and these
files are
virtual machine images so that portable
file
that image will have the operating
system all the applications
the browser applications the editors
jenkins whatever applications you would
usually install on an operating system
all the configuration
files pictures documents basically
everything
would be inside that portable file
and since it's a file just like a
picture or a text document
you can make copies of it and you can
have backups of it
which is amazing and really useful
especially for companies
that means you could take your whole
jenkins
server operating system and pack it into
this portable image where all your
jenkins configuration
all your plugins all your data basically
would be inside
exactly as you configured it and you can
make backups of that
image which are called snapshots right
so you'd have
operating system image snapshots so now
if something happens
to that virtual image where jenkins is
running
like you mess up jenkins configuration
or someone hacked into it or
the hardware breaks you can simply take
that snapshot that operating system
image and simply run it on a different
computer
with hypervisor on it so by containing
the operating system and the application
layer of it in a portable file
you can secure your application and your
work
very easily and you can move it around
machines
without being dependent on any
physical server so the virtual machines
and the virtualization concept
generally is very powerful and that's
why you see it
everywhere in it it has completely
changed the way we work
so whether you want to become a cloud
engineer a system administrator software
developer
or devops engineer you need to
understand the virtualization because
you will be working with
virtual machines this video is actually
a small part of a linux module in the
complete
devops educational program linux is an
important
prerequisite for devops engineers so in
the linux module you learn everything
you need to know about
operating systems and linux as a devops
engineer
so if you want to become a devops
engineer or build up your devops skills
from xero to knowing all the required
devops concepts and tools
be sure to check out our bootcamp and
learn
from a docker captain aws container hero
and cncf ambassador with that
thank you for watching i hope you
learned a lot
Click on any text or timestamp to jump to that moment in the video
Share:
Most transcripts ready in under 5 seconds
One-Click Copy125+ LanguagesSearch ContentJump to Timestamps
Paste YouTube URL
Enter any YouTube video link to get the full transcript
Transcript Extraction Form
Most transcripts ready in under 5 seconds
Get Our Chrome Extension
Get transcripts instantly without leaving YouTube. Install our Chrome extension for one-click access to any video's transcript directly on the watch page.
Works with YouTube, Coursera, Udemy and more educational platforms
Get Instant Transcripts: Just Edit the Domain in Your Address Bar!
YouTube
←
→
↻
https://www.youtube.com/watch?v=UF8uR6Z6KLc
YoutubeToText
←
→
↻
https://youtubetotext.net/watch?v=UF8uR6Z6KLc