When you're creating virtual machines using automation,
before you actually do the deployment,
you'll want to make sure that you have certain things set up properly,
such as, I'm in the Task Manager of a host server,
and the RAM, or memory,
is one of the first things I like to check before I make a virtual machine.
So you can see this particular server has 252 available GB of RAM.
It has 320 GB total, so it's not using that much of the RAM right now.
The other thing I want to look at is going to be the storage.
This particular host server runs as a failover cluster,
so that basically means that more than one server node is
sharing the storage that you see here.
And we can see that I have 16 TBs available and that most of my storage is free,
so I can easily create very large virtual machines if I need to.
Now that I know how much RAM I have and how much storage I have,
I can go ahead and create my virtual machine.
So I'll right‑click and choose New, Virtual Machine,
and we get this wizard that appears.
Now I'm going to call this one PS‑Win22,
but I want to store it in some other place other than the default,
so I have to check the box for storing it in a different
location so that way it will stay highly available.
So I'm going to go to the root of the C drive and go into my ClusterStorage.
Now if you don't have a cluster, that's okay,
you can just go ahead and pick the folder that you would like.
I've selected my folder, and now I can click Next.
I'll want to make sure I choose Generation 2.
Generation 2 has the additional security and features that I'd like.
Now I'll go ahead and click Next, and now we have the memory.
If I'm choosing Dynamic Memory,
then what will happen is it will start with a small amount of memory and
as it needs more it will go ahead and expand; however,
it will never run as quickly as just going ahead and
assigning the memory that you want right away.
I'm going to give this one approximately 32 GB of RAM, and click Next.
Now I want to choose my Connection.
So you should have at least one network switch connected,
if not, you'll want to create that before getting to this step.
And now we can see all the different information such as the name of the server,
the location.
The size, by default, is going to be 127 GB,
and that's always the default for any brand‑new virtual machine.
If I already have an existing virtual hard disk,
I can choose that here, or I can attach one later.
But I want to go ahead and choose this one,
and I'm going to choose the default size.
We can always increase that later if we need to.
Now I need to choose the operating system. So I'm
going to install an operating system, click Browse,
choose my ISO file, because it no longer will accept a DVD,
and click Next, and then click Finish.
However, I don't want to go ahead and start my virtual machine yet.
I'm going to need to make some changes.
Here's my server.
I'm going to double‑click on the server itself,
and I can take a look at the properties prior to starting.
So I can go to File, I can go to Settings. And we see the Memory,
that's here, we can make changes to it, we can go higher or lower,
we can enable the Dynamic Memory if we'd like.
I'm going to start at the Firmware section,
and we can see by default it's going to boot off of the DVD Drive,
which is the ISO that we loaded.
After that it's going to go to the Network Adapter,
which is going to be the PXE, or pre‑execution environment,
bootable into Windows Deployment server.
And then finally, we have the hard drive itself.
This Boot order is fine as long as we have a brand‑new
installation that we want to install from an ISO file.
However, if I want to run the PXE environment and connect to WDS,
I'll need to have this boot from my Network Adapter instead, but
that's not the case for this particular one,
so I'll go ahead and continue on to the Security area.
Enabling Secure Boot will add additional security to keep any types of
rootkits from loading prior to my operating system.
And I can choose a template if I'd like.
The Windows one is the one that works best for Windows Servers.
If I need to encrypt anything such as the hard drive using BitLocker,
then I can choose to enable the Trusted Platform Module.
And now you'll need to have an actual Trusted Platform Module type of
chip on your motherboard in order to get that to work.
If you don't, you can enable the virtual Trusted Platform Module in the registry.
Next I'm going to go to the processor.
By default, it's only going to allow one processor,
and that's one of the issues with the wizard.
It doesn't give you the option to choose more processors.
So I'm going to go ahead and choose 8 processors.
Now I have a total of 24.
I could use all 24 if I'd like, however,
I'm just going to choose 8 because it's likely it's not going to be
able to take advantage of more than 8 anyway,
so I won't really see any type of performance enhancement by going
more than 8 just for a simple Windows Server.
Now if I were to add in, say, an Exchange Server or SQL Server,
I might want to increase that.
If I click on the SCSI Controller, here I can add an additional Hard Drive,
DVD or Shared Drive just in case I don't have enough
storage for my particular server.
I'll just click Remove because I don't need that at this time.
Here's my Network Adapter.
If I want,
I can change that to one of the other network adapters that are available,
or just turn it off altogether.
Down below, we can see the name of the server.
I can change the name at the top if I'd like.
Under Integration Services,
these are things that automatically get added in if the boxes are checked.
So we see the Operating system shutdown can be done from the Hyper‑V Manager
rather than going into the Windows operating system itself.
The Time synchronization will synchronize to the host computer,
so if you want that to happen, you can do that.
If you would like to not have that Time synchronization happen,
such as if this were a domain controller,
then you can uncheck the box and then you can take the domain
controller and sync it to a public time server.
Now down below, we have Guest services,
and that adds additional features such as being able to
copy and paste in both directions.
So instead of just being able to copy from the host to the guest,
you can actually go back from the guest to the host,
and there's some other nice little features as well that I like to enable.
Checkpoints are similar to snapshots with other products such as VMware.
As a matter of fact,
Hyper‑V used to call them snapshots up until Windows Server 2012 R2,
where they renamed them to checkpoints.
Checkpoints allows us to go back in time to reboot to a
previous version prior to a Windows update that might have
gone bad or a virus or some other issue.
The Smart Paging File Location is the same type of paging
file that you would see in a Windows Server,
for instance, where you'd see the pagefile.sys, however,
this is specific for a virtual machine.
And if you're doing any type of clustering,
as I am here,
you'll want to make sure that that Smart Paging file is in
the same location as the ClusterStorage.
Otherwise, if you want to move the virtual machine to another server,
then you won't be able to do it because that Smart Paging file is
stuck on the C Drive in a different location. However,
if you're not clustering, then you can certainly leave it wherever you want.
I like to go to the Automatic Start Action and make sure that we have
the Always start this virtual machine automatically.
However,
you may choose to only allow it if it was running when the
service was stopped or do nothing at all.
Then we have the Automatic Stop option.
We can choose to Save the virtual machine state,
Turn off the virtual machine or Shut down the guest operating system.
Saving the virtual machine state allows us to
restart the server much more quickly, and it keeps it right where it left off.
However, on occasion,
the state will become corrupt and you'll have to delete the state in
order to restart the virtual machine, and then you may end up losing
some files in that particular example, however,
in most cases it's still the best way to go.
Setting your virtual machine to have the proper RAM,
storage, and settings, will ensure your server's success when automating installation.