Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Windows Server 2016 Hyper-V Cookbook - Second Edition

You're reading from  Windows Server 2016 Hyper-V Cookbook - Second Edition

Product type Book
Published in Jan 2017
Publisher Packt
ISBN-13 9781785884313
Pages 524 pages
Edition 2nd Edition
Languages
Concepts
Authors (3):
Charbel Nemnom Charbel Nemnom
Profile icon Charbel Nemnom
Patrick Lownds Patrick Lownds
Profile icon Patrick Lownds
Leandro Carvalho Leandro Carvalho
Profile icon Leandro Carvalho
View More author details
Toc

Table of Contents (19) Chapters close

Windows Server 2016 Hyper-V Cookbook - Second Edition
Credits
About the Authors
Acknowledgments
www.PacktPub.com
Customer Feedback
Preface
1. Installing and Managing Hyper-V in Full, Server Core, and Nano Server 2. Migrating and Upgrading Physical and Virtual Servers 3. Managing Disk and Network Settings 4. Saving Time and Cost with Hyper-V Automation 5. Hyper-V Best Practices, Tips, and Tricks 6. Security and Delegation of Control 7. Configuring High Availability in Hyper-V 8. Disaster Recovery for Hyper-V 9. Azure Site Recovery and Azure Backup for Hyper-V 10. Monitoring, Tuning, and Troubleshooting Hyper-V Hyper-V Architecture and Components Index

Enabling the Hyper-V role


By default, Windows Server does not come with Hyper-V installed. In order to start using the virtual environment, Hyper-V needs to be enabled. Even with its straightforward steps, it is important to understand how it works after the set up and what has changed in the Windows architecture.

Getting ready

There are different methods to install Hyper-V. The most common one is through the graphical interface. To get ready to enable Hyper-V you must be logged on with administrative privileges.

How to do it...

The following steps will demonstrate how to enable the Hyper-V Role for Windows Server and what has changed in the Windows architecture after its installation:

  1. On the Start Screen select Server Manager.

  2. In the Server Manager Dashboard, click on Add roles and features.

  3. In the Add Roles and Feature Wizard, click on Next thrice.

  4. On the next screen, Server Roles page, select Hyper-V, as shown in the next screenshot and click on Next thrice.

  5. In the Features window, click on Next.

  6. In the Virtual Switches window, select the network adapter you want to use on Hyper-V, as shown in the next screenshot. You can add, remove, and modify the virtual switches after the Hyper-V installation through Hyper-V Manager.

  7. On the Virtual Machine Migration page, check the Allow this server to send and receive live migration of virtual machines option if you want to enable live migration requests, as shown in the next screenshot. Do not enable live migration if this server is going to be a part of a Hyper-V cluster; click on Next:

  8. The last Hyper-V installation page called Default Stores and specified the default location for virtual disks and virtual machine configuration files. It's very important to change the default path, from C:\ to a dedicated drive as shown in the next screenshot, otherwise your virtual machines will end up being installed on C:\ drive. Click on Next, confirm the installation selections, and then click on Install to start the installation process:

  9. Reboot the server after the installation.

How it works...

The process that you have performed to install Hyper-V is quite simple, but it changes the processor architecture by creating a new privileged layer called ring-1 that runs under the normal layers. The setup process, completed in the previous task, installs the Microsoft Hypervisor on this layer to make sure that Hyper-V has more privileges than Windows itself. Basically, the host operating system runs above the Hypervisor together and at the same level as the virtual machines. The host turns into a special virtual machine containing the virtualization stack, responsible for managing all the virtual machines from it. The following diagram illustrates Hyper-V high-level architecture being installed in ring-1 and all the partitions running above it.

After the first reboot, the Windows boot (winload.exe) loads the driver (hvboot.sys) responsible for verifying the processor that is running and if it supports virtualization. Then the Hypervisor image file is loaded. The host OS and the virtual machines are called partitions because they run at the same privileged access above the Hypervisor. The host OS is known as root or parent partition and the virtual machines are known as child partitions.

There's more...

For automation and fast installation, you can enable Hyper-V using command lines. You can do that using the command line ocsetup, Servermanagercmd, or Windows PowerShell.

Installing Hyper-V using Windows PowerShell

For a PowerShell installation, open Windows PowerShell and run the following command:

Install-WindowsFeature Hyper-V -IncludeAllSubFeature -IncludeManagementTools -Restart 

See also

  • The Creating and managing virtual switches recipe in Chapter 3, Managing Disk and Network Settings

  • Appendix A, Hyper-V Architecture and Components

You have been reading a chapter from
Windows Server 2016 Hyper-V Cookbook - Second Edition
Published in: Jan 2017 Publisher: Packt ISBN-13: 9781785884313
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}