Book Image

Windows Server 2016 Hyper-V Cookbook - Second Edition

By : Charbel Nemnom, Patrick Lownds, Leandro Carvalho
Book Image

Windows Server 2016 Hyper-V Cookbook - Second Edition

By: Charbel Nemnom, Patrick Lownds, Leandro Carvalho

Overview of this book

Hyper-V 2016 is full of new features and updates. The second of our best-selling Hyper-V books, the Windows Server 2016 Hyper-V Cookbook has it all covered. Brimming with expert solutions and techniques, you?ll have everything you need to master virtualization and Hyper-V Manager. This Hyper-V book is designed to help advanced-level administrators benefit fully from the new Windows Server. With over 80 hands-on recipes, the Hyper-V Cookbook gives you tips, tricks and best practices to deploy, maintain and upgrade your virtual machines.
Table of Contents (19 chapters)
Windows Server 2016 Hyper-V Cookbook - Second Edition
Credits
About the Authors
Acknowledgments
www.PacktPub.com
Customer Feedback
Preface
Index

Preface

Thank you for purchasing Windows Server 2016 Hyper-V Cookbook – Second Edition. The book you are holding is the result of 15 years of experience in the IT world and over 10 years of virtualization experience that started with Microsoft Virtual Server 2005, Virtual PC, and now Hyper-V. Virtualization is the keystone of any modern data center.

Hyper-V is a mature and widely adopted virtualization platform that is designed to work with both Windows and Unix/Linux virtual machines. In addition to being used by many of the largest companies in the world, Hyper-V powers Microsoft Azure public cloud, which is one of the largest cloud services in the world, and it powers Microsoft Azure Stack for on-premises and private cloud deployment including the support for both enterprise and service providers.

Our aim in this book is to provide you with the information you need to be immediately effective in deploying, migrating, and administering Hyper-V environments.

We hope that you'll get as much from reading this book as we did from writing it. Please be sure to post any questions, comments, or suggestions you have about the book in the Author Online forum. Your feedback is important to us in order to develop the best book possible in the future.

  • Charbel Nemnom

  • Patrick Lownds

What this book covers

Chapter 1, Installing and Managing Hyper-V in Full, Server Core, and Nano Server, will provide all the information you need to know to install and manage Hyper-V in Full, Server Core, and Nano Server before, during, and after the installation to make sure that you can save time and solve any problems that you may face.

Chapter 2, Migrating and Upgrading Physical and Virtual Servers, will show you everything you need to know in order to migrate and upgrade any physical and virtual servers to make sure you have an easy and successful upgrade to the new Windows Server 2016 Hyper-V.

Chapter 3, Managing Disk and Network Settings, will go deeper into the various configuration options for virtual machine disks and virtual networks so that you can select the best setting based on the applications you need to deploy.

Chapter 4, Saving Time and Cost with Hyper-V Automation, will show you how easy and user-friendly PowerShell is and how to create simple steps to make sure that your tasks will be done faster and with lesser work. It's very important to work more effectively and be able to automate processes and achieve automation in your day-to-day job.

Chapter 5, Hyper-V Best Practices, Tips, and Tricks, will ensure that you use the correct settings and apply the best configuration for Hyper-V. Best practices are a set of rules and tips created by Microsoft to help you identify problems, misconfiguration issues, and anything else that is generally not recommended. This chapter will also cover Hyper-V nested virtualization and graphics improvement in Windows Server 2016 Hyper-V, so you can virtualize any workload that requires high graphics.

Chapter 6, Security and Delegation of Control, will dive into how to configure Windows Update for Windows Server 2016 Server Core, Windows Server 2016 Server with Desktop Experience and Nano Server installations, access control using Authorization Manager and Simple Authorization, network protection with Port ACLs, virtual machine security with Secure Boot, disk encryption, shielded VMs, and Hyper-V auditing. Security is very important in any infrastructure, and this applies to virtualization and hybrid cloud computing as well.

Chapter 7, Configuring High Availability in Hyper-V, High availability is a key component for any workload you want to virtualize. The good news is that Windows Server 2016 Hyper-V comes with the right tools and high-availability solutions for almost all scenarios. In fact, Hyper-V and Failover Clustering are so deeply integrated in this release to make sure that they can respond appropriately for any transient failure you may encounter in your environment.

Chapter 8, Disaster Recovery for Hyper-V, will walk you through the most important processes to set up disaster recovery on-premises for your virtual machines running on Windows Server 2016 Hyper-V. High availability is not disaster recovery. Natural disasters, fire, flood, viruses, data corruption, human errors, and many other factors can make your entire system unavailable, and not having the proper precautions in place could mean losing it all.

Chapter 9, Azure Site Recovery and Azure Backup for Hyper-V, There are several advantages why you want to. will discuss the advantages of reconsidering your on-premises Disaster Recovery plan and will walk you through the most important processes of protecting your on-premises investment by leveraging Azure Site Recovery (ASR) and Azure Backup, which is a Disaster Recovery as a Service (DRaaS) solutions offered by Microsoft Azure.

Chapter 10, Monitoring, Tuning, and Troubleshooting Hyper-V, will show you how to use the default tools in Windows Server 2016 to monitor your physical and virtual servers, how to troubleshoot, and how to tune your Hyper-V servers, so you can respond faster and start troubleshooting to solve any problems that may arise in your environment.

Appendix: Hyper-V Architecture and Components, will explain the most important Hyper-V architecture components compared with other versions including the Hyper-V client on Windows 10, Nano Server, and VMware vSphere 6.5, as Hyper-V is now a mature and widely adopted virtualization solution. It also includes the backup improvements as well as the new licensing model that has been introduced in Windows Server 2016.

What you need for this book

To follow along on what we have been covered in this book, we strongly believe in learning by doing, and therefore we highly encourage you to try out all of the technologies and principles we covered in this book. You don't need a huge server. For most topics, you could use a single machine with Windows Server 2016 installed and 16GB of memory, and by enabling Hyper-V-nested virtualization, you could enable a few virtual machines to run concurrently. Ideally, though, having at least two physical servers will help with the replication and high-availability concepts. With Windows 10, Hyper-V client is included in the box. So even without any kind of real server, it is possible to explore many of the Hyper-V technologies.

Who this book is for

This book is intended for anyone who wants to learn and master Hyper-V 2016 and take advantage of all exciting new features that Windows Server 2016 Hyper-V has to offer. If you have a basic knowledge of virtualization, it will be helpful, but it's not a requirement. If you are an architect, a consultant, an administrator, or really anyone who just wants better knowledge of Hyper-V, this book is for you as well.

Please note that in some chapters, we go into advanced topics that may seem over your head. In those cases, don't worry. Focus on the preceding elements that you understand better, and implement and practice them to nurture your understanding. Then, when you feel ready, come back to the more advanced topics and read them multiple times. Repetition is the key. The more you repeat, the more you understand better.

Sections

In this book, you will find several headings that appear frequently (Getting ready, How to do it, How it works, There's more, and See also).

To give clear instructions on how to complete a recipe, we use these sections as follows:

Getting ready

This section tells you what to expect in the recipe and describes how to set up any software or any preliminary settings required for the recipe.

How to do it…

This section contains the steps required to follow the recipe.

How it works…

This section usually consists of a detailed explanation of what happened in the previous section.

There's more…

This section consists of additional information about the recipe in order to make the reader more knowledgeable about the recipe.

See also

This section provides helpful links to other useful information for the recipe.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "After the conversion, copy the output vhd file to the Hyper-V server you want to import the virtual machine to."

A block of code is set as follows:

MB";Expression={$_.MemoryDemand/1048576}}, MemoryStatus

    Write-Output "Updated Memory Demand" $VMMemory
    }

} 

Any command-line input or output is written as follows:

Move-VM Win-2012R2-02 HV-Host-P01 –IncludeStorage –DestinationStoragePath D:\VMs

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: " For the Configure Disk option, specify the VHDX file path and click on Finish to start the conversion."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Windows-Server-2016-Hyper-V-Cookbook-Second-Edition. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.