What is a virtual machine?
It is something I mentioned in the previous videos, but it is important for us to fully understand
what it is.
I can just give you a definition and say virtual machine is a machine within our physical computer that
is using its hardware resources.
But for most of you, this will be a new term that you haven't encountered before, so I would like
to explain it further, more for you as well as mentioned, why are we going to use it?
Let me start like this.
All of us are running an operating system and ninety nine point nine percent of us are running one of
the three main operating systems.
You either have windows.
Mac OS or Linux, most of you will have either Windows or Mac OS.
I doubt anyone will be running Linux, but nonetheless, these are the three main ones.
And what if we wanted to, for example, run two different operating systems on the same machine?
For example, let's say you have windows installed on your machine and you want to install Linux or
even better in case you want to install five operating systems running on different virtual machines.
Can you do that?
You can how would that work?
Well, picture it like this.
Imagine this rectangle representing our computer.
And we already know that any computer will have one of the three main operating systems, Windows,
Mac OS or Linux.
But operating system is not the only thing that is defining our machine.
Our machine also has its computer parts.
We have hard disk processor, RAM memory motherboard and many more computer parts that with the operating
system, make our machine work.
These computer parts are also known as hardware.
But wait a second, Alexa, why are you telling us this?
Thought this was a lecture on explaining how machines work and not on hardware components.
Hang on just a second.
We're slowly getting there.
Picture a virtual machine to build a smaller rectangle within our physical machine, which is this larger
rectangle.
And let's imagine that our physical machine is running Windows operating system.
But if you took a look at this course content, you would notice that we're going to be doing all of
our hacking stuff, mostly over Linux.
Does that mean that we must delete our Windows and install Linux?
No, we will install Linux as a virtual machine.
And for this machine to work.
It will need to have access to our hardware components.
What does this mean?
Well, since Virtual Machine will act as a machine of its own, it must have its own computer parts
and what we will do is we're going to borrow our physical machine, CPU power, ram memory, hard disk
memory to our virtual machine so it can run just like our physical machine.
In other words, we are splitting the power of our physical machine into two different machines or more
if we decide that we want to create multiple virtual machines.
Does that mean that they will be slower since they will be splitting the resources?
Well, technically, yes, but it will not be noticeable for us.
However, the more powerful your PC is, more virtual machines, it will be able to run effectively.
Another important thing is that once you shut down your virtual machine, all of the hardware resources
used by it will get feedback for your physical machine to use.
OK, good.
And what are the other benefits that we have if we create a virtual machine?
Well, since we are hackers and we will be doing a lot of things and running a lot of programs on that
virtual machine, we want to make sure we are doing it first in a safe environment, at least while
we learn.
The good thing about virtual machines is that if, for example, our machine starts getting some annoying
error or we get locked out of our files, or another case would be that we delete the file that we shouldn't
have deleted and it crashes our virtual machine.
What if we simply just get infected by a malware or virus by accident or another possible scenario would
be that we just installed the wrong version of operating system, which we don't need.
Will any of this present a problem?
Don't worry, with two clicks, we can delete entire virtual machine, all of its files, and it will
have no effect on our physical machine, then we can proceed to create a new one for as many times as
we want.
We can also create something called a snapshot, which will allow us to save the current state of a
virtual machine, and with it we can reverted back to that state whenever we want.
It can be useful if we, for example, ran into some error or we get infected with the virus, we can
simply just reverted back and our virtual machine will act as none of that happened.
Sounds cool, right?
Now that we know how virtual machines work and why are we going to use one, you must be wondering how
can we create a virtual machine?
Actually, it is pretty easy.
All we need are two things.
We need an operating system that we want to install in that virtual machine.
And we also need something called virtualization software.
Now, what is that, even though it sounds harsh saying virtualization software, what it essentially
is, is a program that will allow our physical machine to borrow hardware components to our virtual
machine, or we can also define it as a program that will allow us to run multiple operating systems
on a single host.
So with these two, we can create our virtual machine and in the next few lectures, we're going to
see exactly how we can do that.