Installing & Configuring Hyper-V Virtualization in Windows Server 2016

Codenamed Viridian and formerly known as Windows Server Virtualization, Microsoft Hyper-V is a native hypervisor which can create virtual machines on x86 and 64-bit systems running Windows operating systems.


The hypervisor was introduced with Windows 8 to supersede Windows Virtual PC as the hardware virtualization engine of client editions of Windows NT family. A server running Hyper-V can be configured to expose individually built virtual machines to one or more networks.

Hyper-V was released along side Windows Server 2008, available free of charge for all Windows Server and some client operating systems such as Windows 10.


A single license will give you the option to install one host and two virtual machines. Eg. Win Server 2016 host, 1 DC virtual machine and 1 virtual machine for Microsoft Exchange program and services. It represents a cost-effective way of deploying server infrastructure for small to medium sized businesses. 

         Preparing to Install Hyper-V Role in Server 2016

To perform this task, you will need a licensed version of Windows Server 2016 Standard or above to take full advantage of the capabilities of the hypervisor. If you are not familiar with how to install the operating system, refer to our previous article on Installing and Config of Windows Server 2012 R2.

Once you have installed and activated Windows 2016. Follow the steps below to install Hyper-V role.

1. Launch Server Manager and Click Add Roles and Features. Alternative as before you can click on the Manage Tab in the top right corner > Add Roles and Features


2. Select the tick box for Hyper-V and add any other dependencies like Hyper-V management tools for installation. Leave the .Net settings intact and Click Next.


3. The next stage displays your network switches and the option to create Virtual Switches for the Hyper-V host. You can leave this unticked to be configured later. Microsoft recommends you leave one network switch reserved for remote access.


4. Have a read about the ability to configure the server to receive live migrations on the network. Leave these as default as we can configure them later and Click Next.


5. The Default Stores shows you the location of your Virtual Hard Disks and the location of your virtual machine configuration files. You may browse and alter the path to these locations and Click Next


6. We can now double check all the services and tools for Hyper-V and Click Install when ready. 


7. Monitor the progress of the installation for any errors. Once successful, a reboot will be required to complete the installation of Hyper-V 2016 on your Windows 2016 Server operating system.   

8. You may notice a few new changes once your server comes back online. The Server Manager will have a Hyper-V object appear on the left menu where virtual machine statuses can be checked.


9. Congratulations on installing Windows Hyper-V. For easy accessibility, you may want to click Start > Windows Administrative Tools > Locate Hyper-V Manager > Launch. This will start the manager interface which you can pin to your taskbar as it will be frequently required during VM creations.  


10. Spend some time familiarizing yourself with the Hyper-V Manager interface. Notice host name on the left pane and a whole host of actions available on the right pane. 




Some of these functions such as Import Virtual Machine, Hyper-V Settings, Virtual Switch Manager, Virtual SAN Manager, Edit Disk, Inspect Disk, Stop Service and Remove Server will be explored further to build our virtual machine environment with networking functionalities. 

          Creating Virtual Machines in Hyper-V Manager 2016

Looking back at our last step above, you’ll notice the virtual machines has no active machines currently running. This chapter will explore the process involved to spin up two new virtual machines which come free of license when you purchase the key for Windows Server operating system

11. Right Click on the host on the left of the Hyper-V Manager > New > Virtual Machine.


12. The new virtual machine set up wizard should now appear as a guide for VM initial configuration.


13. You get to name your virtual machine at this stage. Remember to choose an easy to identify name for instance if you plan to have a domain controller and exchange installed as separate servers, you can add DC and EXCH to the end of your names to signify the functions they intend to perform.  


14. The next step takes you to a new feature introduced in Windows Server 2012 R2 with two Hyper-V Boot Architectures. First boot mode is Hyper-V BIOS and the second Hyper-V Unified Extensible Firmware Interface (UEFI).  


Generation 1 supports legacy drivers, both 32bit/64bit OS and can initialize IDE controllers, while generation 2 supports 64bit Win Server 2012 R2 or later. Settings cannot be changed once selected.

15. It is time to assign some RAM for your new VMs to run. The amount of memory you assign entirely depends on what the machine is going to be doing. For the purposes of this lab, I have assigned 2048MB to my domain controller (DC). A new feature introduced by Microsoft lets you select to use Dynamic Memory for virtual machines should they require more than specified. Click Next


16. Some of you may have selected the network card on your host when installing the Hyper-V role, drop down the menu and choose that NIC if available. We can still configure this later before our virtual machines are fired up so Click Next to continue.


17. Connect virtual machine to virtual hard disk at this stage. Notice the new extension .vhdx from previous versions .vhd in Windows Server 2008R2. You can browse to the location of the virtual hard disk or browse to change the location of storage. Use existing virtual disk if you have one or attach a virtual disk later.   


18. Just as we did in previous installations of virtual machines, choose to install OS later or browse to the location where the .ISO file is held and Click Next.


19. Check the settings summary of your virtual machine and go back to change anything you are not happy with. Once satisfied everything is set, Click Finish.


20. Congratulations! Your first virtual machine in Hyper-V 2016 is ready. Notice the new machine now appears in the dashboard with added functions located at the bottom right of the Manager screen.  


Some final touches will be performed in the next steps before we can fire up our virtual machine.

Configuring a Virtual Switch in Hyper-V Manager 2016  

Those that missed out on configuring initial NIC in Step 16 for your Hyper-V server, do not despair. The next few steps will demonstrate how you can configure virtual network switches and expose you to the different types of virtual switches available. Advanced configurations will be explored in later lessons.                                                                                                           
21. Launch the Virtual Switch Manager on the right pane of the screen, alternatively Right Click on the host and select switch manager. 


22. Once launched, you will see the three types of virtual switches you can create; External, Internal and Private virtual switches. Select External and Click Create Virtual Switch to begin.


23. Give the External switch a name and select the Network Interface Card in the drop-down menu. Click Apply and get a prompt about pending network changes. Click Yes to save the changes. 


24. The last step involves assigning the newly created External Virtual Switch to your network adapter settings. Right Click the Hyper-V VM and select Settings to see the tab below. Navigate to Network adapter and assign the External Virtual Switch we just created above.   


25. You can now fire up your virtual machine. This can be achieved several ways; Right Click > Start or Action > Start or Click on Start at the bottom right pane of your screen. Observe the state of the virtual machine change from OFF to Running and an activity monitor at the bottom left of your screen.

To expand what is happening on the virtual machine, Right Click and select Connect. You can then resize the screen to suit your preference or even enter full screen mode. Install Server 2016 as usual. 



                                          Final Thoughts

We hope this article has helped shed some light on how Microsoft's hypervisor works and how to build one for yourself. More advanced configurations are available when you decide to build clusters of these virtual machines. Don't forget to access Microsoft's website for more advanced training courses and always and always practice these technologies in your own home lab.   

Do leave some comments on other ways to perform this task to help other students learn more about server virtualization. 

Thank you for investing your time with us.

                                     Ledger Nano S - The secure hardware wallet
                                        Learn Data Backup on Sia Blockchain 



 Written By: www.codexploitcybersecurity.com   Twitter: @ixploitsecurity  Facebook: https://www.facebook.com/icybersecure



                    Credits to all organisations and development teams at Microsoft Corporation 

0 Comments:

Post a Comment