From the course: Career Essentials in System Administration by Microsoft and LinkedIn

Windows Hyper-V

- [Instructor] We can install virtual machines right in our Windows server by installing the Hyper V role. Now, if you have the standard edition of Windows Server, then you're going to have two additional virtual machines that are included with your license. However, if you have the data center version, you have an unlimited amount of virtual machines, but the cost of the license is much higher. In Server Manager, just go to Add Roles and Features and click next until you get to the server roles. Now, I've gone ahead and installed the Hyper V role, and that's because it requires a lot of time and it restarts a couple of times, and then you can go ahead and get started. So after checking the box and clicking next and install, Hyper V will be working upon those next two reboots. Now, you're also going to see under the tools menu this Hyper V Manager option. So you go ahead and open that up, and then you'll see the name of your server. and you won't see any virtual machines yet until we get started. Now, during the installation, you're going to be prompted to create what's called a virtual switch. So I'll click on Virtual Switch Manager, and what that does is it allows you to create a virtual network card and virtual switch to connect you to other computers within the network as well as out to the internet. So you have several options. You have the option to connect to the external network that connects to everything, or you could connect just to the internal network, which is just going to be computers that are on the inside of your network that are other virtual machines installed on this server. And then the option for private network is basically just communication between your host server and your virtual machine. I'm going to choose the external connection so that way we can also connect out to the internet, and choose Apply. Now, sometimes you'll see this message that says, this may disrupt your connection, but it's usually just for a few seconds and then it reconnects. After my temporary disconnection, I'm now reconnected. And let's take a look at the Hyper V settings. Now, the Hyper V settings are going to affect every virtual machine that you install on your Windows server. Here you can see the default location of your virtual hard disks, and you can change that if you'd like by clicking browse, as well as the virtual machines themselves. So you can see there is a path that is similar but not exact. And you can also change the location during the installation of the virtual machines. You can also replicate the virtual machines from one server to another to give you additional availability in case your host server is not available. And that can happen because of a Windows update and then causing a restart and maybe a problem afterwards, or maybe a physical problem with your host computer. By having a replica on another server, it allows you to start that up and continue running. I'm going to cancel, and now I'm going to choose to create my first virtual machine. So I'll choose new virtual machine, and you get a wizard that shows up and walks you through the setup. So, we can give this virtual machine a name and you can also choose where to store it. So by default, it's going to choose that default location, but let's say I'd like to put it someplace else. So I'll choose This PC, and then I'm going to go ahead and create a new folder, and I'll call it VMs. And that's where I'll choose to install my virtual machine. Now I can choose Generation 1 or Generation 2. Generation 2 is for Windows servers that run 2012 or newer. So if you're running 2008 or older, or the 32 bit version of 2012, then you'll want to choose Generation 1. Otherwise it's a good idea to choose Generation 2. It has all the latest features. Now you can choose your startup memory. Now, the startup memory is going to depend on how much memory you have available on your server. So the best thing to do is to go to Task Manager, and then take a look and see what you have available. So I'll click on the performance. Here, we can see that we've got four cores available for the CPU, and we've got the memory is at 24 gigabytes and only 27% is being currently used. So if I used four gigabytes, I would still have plenty to run the server itself. So I'll just default to the four gigabytes and click next. Now you can choose your network connection. That was in the virtual switch manager before, next, and now you want to choose the size of your virtual hard disk. You don't want to choose too much if you don't have a lot of storage available. On this particular server, if I go into This PC, you can see I have 84 gigs free. So I'll go ahead and give it say, 60 gigs, just because this is just a demonstration, you'll probably be using in the terabytes, of course. And click next. And now we want to choose an operating system. So where do we get that operating system? Well, we can go into our web browser, and I've gone to Google and done a search for Windows demo download. So I'll go ahead and hit enter. And what we want is we want to get to the Microsoft Evaluation Center, so you can also do a search for that as well. Then I'm going to go up to where it says Windows Server. Here you can choose many different versions of Windows Server all the way back to 2016. So I'm going to choose the latest edition. This will give me 180 days of trial for this particular version of Windows Server. So I'll choose Download the ISO, and you can put whatever information you'd like in these boxes. It doesn't really matter if it's accurate, because it'll still let you go ahead and download. And I'll choose Download Now, and it's going to download a bootable ISO of this Windows Server. So I'll choose the 64 bit ISO file, and now you can see it's downloading. It is several gigabytes, so depending on the speed of your computer and your internet connection, it could take anywhere from a few seconds to several minutes. The download is complete and it's waiting in my Downloads folder, so I'll go ahead and browse to it. And there it is. And I'll click Finish. And what's going to happen is when I start this up, it's going to prompt me to boot off of the virtual DVD, and then I'll be able to run the installation. Now, this is going to be just a standard installation, and I won't go through the entire install, because you've already seen that and you've probably experienced it yourself. However, if you haven't experienced it through a virtual machine, then this is how it works. So I'll click start, and I'll go ahead and press any key once it prompts me to boot off of the ISO, or the virtual DVD. And there it is. And now it's going to start up the installation. Let's take a look at the settings. This is the setting area for just this virtual machine. The settings I showed earlier were for every virtual machine, but you can customize each individual VM just by going into the settings. So for instance, you can see that it's going to boot off of the DVD by default, and after that it'll go from the network adapter, so we could use say, Windows Deployment Services if we decided to install it across the network, or through the hard drive, we could boot off the hard drive itself. Now, after Windows is installed, it's going to boot directly off of the hard drive. Under Security, Secure Boot is enabled by default. You can see it's grayed out just because the VM is running right now. Once it's shut down, you can make changes. And Secure Boot will keep any malware from loading prior to the operating system booting up. here, you can see the memory, so if you wanted to add more memory, you could here, or you could decrease it. And you can see it's using four processors. So we can increase or decrease that based on the amount of virtual CPUs you see in Task Manager. Here's the hard drive location. If you'd like, you can edit it and make it larger, or you can create an additional hard drive just by going to the SCSZ controller and clicking on hard drive. We can also create additional DVDs and shared drives. There's also some integration services that are checked by default, adding the guest services also adds some additional capabilities, such as copy and paste directly into the console. Then you've got checkpoints. Checkpoints are used in case you have a problem, say, with a Windows update. So you would run a checkpoint prior to running Windows updates, and then as long as everything works, you can go ahead and delete the checkpoints and you can do that right in this checkpoint area that you see in the center of the screen. I like to also take a look at the automatic start and stop action, and this really helps in case your host server dies. So if it gets corrupted, or crashes, or something like that, and then you fix it, and you restart it up, what are your virtual machines going to do? Well, you could either have them automatically start, which is the default. If it was running when the server stopped, you could say do nothing, where the server just will not start up until you manually start it. Or, you could always start this virtual machine automatically no matter what the state was when the host machine had an issue. And you'll see similar types of automatic stop actions as well. The world is moving to virtualization both on-premises and in the cloud. Virtualization is a necessary skill for the modern Sys Admin.

Contents