WEBVTT

00:00:00.240 --> 00:00:04.000
Welcome back to vSphere 8 in the real world. Now we're going to discuss virtual machines.

00:00:07.200 --> 00:00:13.440
So what's a VM? So a VM is basically a operating system and applications and or applications,

00:00:13.440 --> 00:00:19.120
right, using software instead of hardware. So we have physical hardware and we install ESXi on

00:00:19.120 --> 00:00:26.559
there, for example, within a vSphere environment. And then we create this container that we call a

00:00:26.559 --> 00:00:33.599
virtual machine. And the virtual machine is going to virtualize things like hard drives and access

00:00:33.599 --> 00:00:38.880
to memory and processor access and network adapters and all those, a bunch of different

00:00:38.880 --> 00:00:44.480
types of things, USB controllers and disk controllers and all this stuff. And that

00:00:44.480 --> 00:00:50.799
software is virtualizing to the software that we're running inside that container. For example,

00:00:50.799 --> 00:00:55.279
we have ESXi installed on the hardware and we may be running Linux inside that container. We might

00:00:55.279 --> 00:01:01.040
be running Windows inside that container. But it's just software that's virtualizing the hardware.

00:01:01.040 --> 00:01:07.360
So that way we can have multiple operating systems running on one physical piece of hardware, but they

00:01:07.360 --> 00:01:13.279
don't know about each other. They're all being containerized, being separated from each other

00:01:13.279 --> 00:01:17.279
by the hypervisor, which is in this case ESXi, as we were just talking about.

00:01:19.360 --> 00:01:23.680
All the VMs function separately. They're not aware of each other. If one of them wants to

00:01:23.680 --> 00:01:27.040
talk to the other one, they're going to do it the same way they would do it if there are physical

00:01:27.040 --> 00:01:30.959
boxes. They're going to put packets onto their virtual network adapters, which they think are

00:01:30.959 --> 00:01:37.440
real network adapters, and send it over the wire. One thing that's interesting about virtualization

00:01:37.440 --> 00:01:43.519
as it's gotten more mature is that vendors like Microsoft and Linux, everybody, have started

00:01:43.519 --> 00:01:48.959
writing the software to be more aware of virtualization. The VMs don't all of a sudden

00:01:49.279 --> 00:01:54.320
behave completely differently, but they're more aware of the virtualization to make them run

00:01:54.320 --> 00:01:58.879
more efficiently in that hypervisor environment. They have drivers that run more efficiently

00:01:58.879 --> 00:02:04.720
inside a virtualized environment and things like that. The operating system isn't really

00:02:04.720 --> 00:02:10.479
fully aware, but it does have some tweaks to make it more efficient. It provides applications

00:02:10.479 --> 00:02:18.559
resources. Multiple users can be running different platforms on one physical box running,

00:02:18.559 --> 00:02:25.600
for example, again, ESXi. I might have several Windows boxes. I might have Windows 2016 and

00:02:25.600 --> 00:02:31.119
Windows 2024, and I might have some different versions of Linux. I might be running Alma,

00:02:31.119 --> 00:02:36.080
Linux, and Red Hat Linux, and maybe Ubuntu. I can run a bunch of different things on one

00:02:36.080 --> 00:02:40.720
piece of hardware. They can all be running different applications. I might have Apache

00:02:40.720 --> 00:02:44.720
running. I might have Microsoft SQL Server running. I might have something from Sage

00:02:44.720 --> 00:02:48.479
software running. All these different things are all running on this one piece of hardware.

00:02:48.479 --> 00:02:54.080
So, I'm utilizing that hardware much more fully than if I use it to just install one service,

00:02:54.080 --> 00:02:56.479
like Active Directory and Directory Services or something like that.

00:02:58.720 --> 00:03:04.960
So, before virtual machines, I had a piece of hardware. I installed Windows on it or Linux on

00:03:04.960 --> 00:03:09.839
it and my application. Maybe I made it a domain controller, so I was running, you know, AD,

00:03:09.839 --> 00:03:13.919
or maybe I was running Linux on there and it's running Apache or something like that.

00:03:13.919 --> 00:03:19.520
But it was really kind of dedicated. That OS controlled all the hardware on that box

00:03:19.520 --> 00:03:22.000
and is available to the application running on that box.

00:03:23.440 --> 00:03:29.759
Now, with virtualization, I'm able to take that same box and maybe that same server, that box,

00:03:29.759 --> 00:03:36.320
has, you know, way more CPU than my applications need and way more RAM than my applications need.

00:03:37.279 --> 00:03:41.679
I've got, you know, four different 25-gig network interfaces in there,

00:03:41.679 --> 00:03:47.520
way more than my applications need. So, what I can do is install multiple operating systems

00:03:47.520 --> 00:03:51.919
inside of virtual machines on that hardware, put different operating systems on there,

00:03:51.919 --> 00:03:56.320
put different applications on there. They can be patched differently. We can create policies

00:03:56.320 --> 00:04:01.039
and we patch them the same. That would be efficient. But they can be completely different,

00:04:01.039 --> 00:04:06.880
running different applications and all on that same hardware, right? Those are virtual machines,

00:04:06.880 --> 00:04:15.839
those little virtual boxes. So, files. Virtual machines are just files on the hard drive. So,

00:04:15.839 --> 00:04:23.839
I might have on a Windows box a file that is just an EXE file. But that file, when I click on it,

00:04:23.839 --> 00:04:28.559
it runs SQL Server and it knows what it's supposed to do. SQL Server knows all these jobs it's

00:04:28.559 --> 00:04:34.959
supposed to run. On a hypervisor, I might have files. And when the operating system, for example,

00:04:34.959 --> 00:04:40.799
ESXi, loads those files, it knows what to do with them. So, it says, okay, I'm going to load this,

00:04:40.799 --> 00:04:46.079
which is a VMX file. And that VMX file says, here's where your virtual hard disk is and here's

00:04:46.079 --> 00:04:51.440
where your RAM is and how much RAM you have. Oh, by the way, create a swap file of a certain size.

00:04:52.160 --> 00:04:56.559
Here's the disk controller that your hard drives are connected to. And then here's the size of your

00:04:56.559 --> 00:05:01.040
hard drives. Actually, it'll say, here's where your VMDK files are. And that will all define

00:05:01.040 --> 00:05:06.959
the hard drives, things like that, right? So, really, your virtual machines are just

00:05:06.959 --> 00:05:11.920
files on a hard disk. And then the hypervisor knows how to read those and interpret those and

00:05:11.920 --> 00:05:16.559
make them be virtual machines, run the workloads that they're expecting from that virtual machine,

00:05:16.559 --> 00:05:23.359
right? You can configure things through vSphere. You can use the ESX CLI, which is a command line.

00:05:24.000 --> 00:05:28.320
There is an SDK you can use for configuring things. There's also, obviously, just your

00:05:28.320 --> 00:05:36.320
traditional web console, your DCUI console, like your video card console on there. Files are

00:05:36.320 --> 00:05:41.600
stored. They're stored on hard drives. And if you alter those files, you're like, oh, I'm going to

00:05:41.600 --> 00:05:45.760
tweak this file over here, you might find your VM isn't running anymore. It might seem like, oh,

00:05:45.760 --> 00:05:49.359
it's just going to do this one thing and you know what it's going to do. And then all of a sudden,

00:05:49.359 --> 00:05:55.040
that VM isn't running anymore. So, just be really careful if you're not really, really familiar with

00:05:55.040 --> 00:06:01.279
these files before you start doing things like editing those files by hand. So, what kind of

00:06:01.279 --> 00:06:06.799
files do we have? So, the VMX file, as I said, is a file that actually defines a virtual machine.

00:06:06.799 --> 00:06:10.880
It can be a really small file. It can be, like, you know, measured in K. You can read it in Notepad.

00:06:11.600 --> 00:06:16.160
Don't want to edit or change it, but you can read it. And it defines that virtual machine.

00:06:16.880 --> 00:06:20.959
A VMXS file is just actually a file for additional configuration information.

00:06:21.920 --> 00:06:26.720
There is a VMSS, which is a suspend file. So, if you were to suspend a virtual machine,

00:06:26.720 --> 00:06:33.040
it's going to write everything that's in RAM to that file, and all the CPU register information

00:06:33.040 --> 00:06:38.399
gets written over there, too, right? And then you have a VMIM, which is basically a backup

00:06:38.399 --> 00:06:48.880
file for your paging memory. VMDK, so the VMDK file, just .vmdk, it actually defines the virtual

00:06:48.880 --> 00:06:56.799
disk and says where the data file is, a dash flat .vmdk. So, before the dash will be the name of

00:06:56.799 --> 00:07:03.200
the virtual machine, dash flat .vmdk. And that is actually where the data is written for the

00:07:03.200 --> 00:07:10.320
virtual disk, and the VMDK points to the flat file and defines it. You have your nonvol around file

00:07:11.440 --> 00:07:18.239
that has all your BIOS information in there and things like that. Your .vfwp is your swap file.

00:07:18.239 --> 00:07:26.079
So, if the host is running low on physical RAM, it can start swapping things out from physical RAM

00:07:26.079 --> 00:07:31.440
that belongs to the virtual machine into that file, and the VM thinks its information is still in RAM.

00:07:31.440 --> 00:07:36.720
So, it goes, oh, give me that page of RAM. The ESXi host will say, oh, that page of RAM I wrote

00:07:36.720 --> 00:07:42.640
to the swap file, read it from the swap file, put it back in RAM, and give it to the VM. Obviously,

00:07:42.640 --> 00:07:47.440
that's a very slow process. So, if you're swapping, your performance is being very negatively impacted.

00:07:49.200 --> 00:07:53.600
You have your snapshot files. You can snapshot VMs. So, basically, when you go to create a snapshot,

00:07:54.320 --> 00:08:00.239
it creates this file to help monitor and track what's being changed from the VMDK file.

00:08:02.160 --> 00:08:06.959
You have your log files. Old log files will have a number or something,

00:08:06.959 --> 00:08:11.279
.log, so you know those are the older ones. The higher the number, the older it is. Actually,

00:08:11.279 --> 00:08:15.200
sorry, the higher the number, the more recent it is, the lower the number, the older it might be.

00:08:15.200 --> 00:08:19.119
But it's in a circular log, so what you want to do is check the timestamps.

00:08:20.559 --> 00:08:28.640
And a VMTX is basically the exact same thing as a VMX file, but it's designated as a template,

00:08:28.640 --> 00:08:32.400
so it can't be turned on. So, really, what you can do is if you have a virtual machine that's

00:08:32.400 --> 00:08:37.520
turned off, when you right-click on it and you say convert to a template, all it has to do is

00:08:37.520 --> 00:08:42.640
rename that file from VMX to VMTX, and now you just have a template. So, that's really all there

00:08:42.640 --> 00:08:51.359
is to that. So, a guest OS is an operating system that is different than the operating system

00:08:51.359 --> 00:08:56.239
running on the hardware. So, on the hardware, I have my hypervisor. It might be Hyper-V,

00:08:56.239 --> 00:09:02.479
in a vSphere environment, it's going to be ESXi. Inside my guest OS, it will maybe be

00:09:03.359 --> 00:09:10.559
Windows or Linux or some other operating system. There are some other ones out there. Now,

00:09:10.559 --> 00:09:18.239
it's possible to virtualize in a VM ESXi. So, you might actually have ESXi running on top of ESXi.

00:09:18.239 --> 00:09:24.799
You might have Hyper-V running on top of ESXi. That's called nesting, hypervisor nesting. So,

00:09:26.080 --> 00:09:31.440
you can do that as well. But basically, guest OS is the OS running in the VM versus the OS

00:09:31.440 --> 00:09:32.799
that's running on the hardware.