O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Windows Server 2016 Hyper-V Cookbook - Second Edition

Book Description

Save time and resources by getting to know the best practices and intelligence from industry experts

About This Book

  • This book helps you gain a fresh perspective through a recipe-based approach on the new Microsoft Server 2016 Hyper-V
  • Over 80 recipes to help you master the administrative tasks of Hyper-V and get to grips with advanced solutions and techniques for virtualization
  • These hands-on advanced recipes will help you deploy, maintain, and upgrade Hyper-V virtual machines

Who This Book Is For

This book is for Hyper-V administrators who are looking to take advantage of all exciting new features that Microsoft Server 2016 Hyper-V has to offer.

What You Will Learn

  • Installing and managing Hyper-V Server in Full, Server Core, and Nano Server
  • Migrating and upgrading physical and virtual machines
  • Configuring network, memory, security, and auditing settings for virtual machines
  • High availability and disaster recovery
  • Saving time and money with PowerShell automation
  • The new features around network and nested virtualization, distributed storage QoS, Hyper-V Replica, and much more
  • Monitoring, reporting, and troubleshooting with Hyper-V 2016 best practices
  • Deploying and automating multiple VMs and support Windows Hyper-V 2016 clusters through different installation methods

In Detail

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.

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased 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 code file.

Table of Contents

  1. Windows Server 2016 Hyper-V Cookbook - Second Edition
    1. Table of Contents
    2. Windows Server 2016 Hyper-V Cookbook - Second Edition
    3. Credits
    4. About the Authors
    5. Acknowledgments
    6. www.PacktPub.com
      1. eBooks, discount offers, and more
        1. Why subscribe?
    7. Customer Feedback
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Sections
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      5. Conventions
      6. Reader feedback
      7. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    9. 1. Installing and Managing Hyper-V in Full, Server Core, and Nano Server
      1. Introduction
      2. Verifying Hyper-V requirements
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      3. Enabling the Hyper-V role
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Installing Hyper-V using Windows PowerShell
        5. See also
      4. Installing Windows Server 2016, Microsoft Hyper-V Server 2016, and Nano Server
        1. Getting ready
        2. How to do it...
          1. Create a Nano Server Image using PowerShell
          2. Create a Nano Server image using Nano Server Image Builder
          3. Deploy Nano Server on a physical machine
        3. How it works...
        4. See also
      5. Managing a Server Core installation using sconfig
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      6. Remotely managing a Nano Server installation
        1. Getting ready
        2. How to do it...
      7. Managing Nano Server using PowerShell
        1. Getting ready
        2. How to do it
        3. How it works
      8. Managing Nano Server using Server Management Tools – SMT
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      9. Configuring Hyper-V post-installation settings
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
    10. 2. Migrating and Upgrading Physical and Virtual Servers
      1. Introduction
      2. Performing an in-place upgrade from Windows Server 2012 R2 to Windows Server 2016
        1. Getting ready
        2. How to do it…
        3. How it works…
          1. Why Windows Update?
        4. See also
      3. Exporting and importing virtual machines
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      4. Migrating virtual machines and updating their Integration Services
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      5. Migrating virtual machine using Cross Version Shared Nothing Live Migration
        1. Getting ready
        2. How to do it…
        3. How it works…
          1. Configuring constrained delegation to authenticate live migrations
        4. See also
      6. Migrating virtual machine storage using Storage Migration
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Moving all the virtual machines to a new storage location
      7. Converting VHD files to VHDX
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      8. Upgrading the VM configuration version
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      9. Converting physical computers to virtual machines
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Converting physical computers to virtual machines using the command line
    11. 3. Managing Disk and Network Settings
      1. Introduction
      2. Creating and adding virtual hard disks
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Online resizing for VHDX virtual hard disk
          2. Adding a pass-through disk for a virtual machine
          3. Creating virtual machines on file servers
        5. See also
      3. Configuring IDE and SCSI controllers
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      4. Configuring the Storage Quality of Service
        1. Getting ready
        2. How to do it…
        3. How it works…
          1. Minimum IOPS
          2. Maximum IOPS
        4. There's more…
        5. See also
      5. Configuring and adding Virtual Fibre Channel storage
        1. Getting ready
        2. How to do it…
        3. How it works…
      6. Creating resource pools
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      7. Enabling and adding NIC teaming
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      8. Creating and managing virtual switches
        1. Getting ready
        2. How to do it…
        3. How it works…
          1. Using legacy network adapters
        4. See also
      9. Using advanced virtual machine network settings
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      10. Adding and removing vmNICs
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
    12. 4. Saving Time and Cost with Hyper-V Automation
      1. Introduction
      2. Creating virtual machine templates
        1. Getting ready...
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      3. Learning and utilizing basic commands in PowerShell
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      4. Using PowerShell commands for daily tasks
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Using PowerShell ISE for advanced script editing
          2. Enabling scripts to be executed in PowerShell
        5. See also
      5. Enabling and working with remote connection and administration through PowerShell
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Managing virtual machines with PowerShell Direct
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      7. Hyper-V management and PowerShell improvements
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
    13. 5. Hyper-V Best Practices, Tips, and Tricks
      1. Introduction
      2. Using the Hyper-V best practices analyzer
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Using PowerShell to create HTML reports with the BPA results
      3. Optimizing virtual machines' resources
        1. Getting ready
        2. How to do it...
          1. Virtual NUMA
          2. NUMA spanning
          3. Virtual machine settings
        3. How it works...
        4. There's more...
          1. Using PowerShell to manage memory for virtual machines
        5. See also
      4. Enabling nested virtualization
        1. Getting ready
          1. Requirements
          2. Supported scenarios
          3. Unsupported scenarios
        2. How to do it...
          1. Networking option 1 – MAC address spoofing
          2. Networking option 2 – network address translation
        3. How it works...
        4. See also
      5. Graphics virtualization in Windows Server 2016 Hyper-V
        1. Getting ready
        2. How to do it...
          1. RemoteFX vGPU configuration
          2. Prioritizing H.264/AVC 444 Graphics mode for Remote Desktop connections
          3. Configuring H.264/AVC hardware encoding for Remote Desktop Connections
        3. How it works...
        4. There's more...
      6. Installing and configuring anti-virus for the host and virtual machines
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Protecting your virtualized environment with 5nine Cloud Security
    14. 6. Security and Delegation of Control
      1. Introduction
      2. Configuring Windows Update for Hyper-V
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Delegating control in Hyper-V
        1. Getting ready
        2. How to do it...
        3. How it works…
      4. Configuring Port ACLs
        1. Getting ready…
        2. How to do it…
        3. How it works…
        4. See also…
      5. Installing and configuring BitLocker for data protection
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      6. Configuring Hyper-V auditing
        1. Getting ready
        2. How to do it…
        3. How it works
      7. Virtual Machine Secure boot
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also…
      8. VM protection (vTPM)
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also…
      9. Shielded VM
        1. Getting ready…
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also…
      10. Host Resource Protection
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also…
    15. 7. Configuring High Availability in Hyper-V
      1. Introduction
      2. Installing and configuring block and file storage in Windows Server 2016
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also…
      3. Installing and configuring the Windows Failover Clustering feature
        1. Getting ready
        2. How to do it…
        3. How it works…
          1. Protected Networks
        4. There's more…
        5. See also…
      4. Enabling cluster shared volumes
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Configuring CSV Cache for Hyper-V environments
        5. See also…
      5. Rolling cluster upgrades
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also…
      6. Configuring Cluster-Aware Updating for cluster nodes
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Using PowerShell to manage Cluster-Aware Updating
          2. Generating reports on past updating runs
        5. See also…
      7. Using Live Migration in a cluster environment
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also…
      8. Configuring VM Priority for clustered virtual machines
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      9. VM Load Balancing
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      10. VM Compute Resiliency
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Virtual Machine Storage Resiliency
    16. 8. Disaster Recovery for Hyper-V
      1. Introduction
      2. Backing up Hyper-V and VMs using Windows Server Backup
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
          1. Checking the Windows Server Backup PowerShell commandlets
          2. Backing up Hyper-V VMs using PowerShell
        5. See also
      3. Restoring Hyper-V and VMs using Windows Server Backup
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      4. Configuring Hyper-V Replica between three Hyper-V hosts using HTTP authentication
        1. Getting ready
        2. How to do it...
          1. Support for Hot Add/Remove of Disks
          2. Hyper-V Replica Rolling Cluster upgrade support
          3. Protection of Multi-VM and Guest Clustered applications support
          4. Protection of Shielded virtual machines
          5. Protection of virtual machines hosted on Nano Server Hyper-V
        3. How it works...
        4. There's more...
          1. Throttling Hyper-V Replica Traffic
          2. Using PowerShell to configure and enable Hyper-V Replica
          3. Advanced Hyper-V Replica Monitoring
        5. See also
      5. Configuring Hyper-V Replica Broker for a Failover Cluster
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      6. Configuring Hyper-V Replica to use certificate-based authentication using an Enterprise CA
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      7. Using checkpoints in VMs
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
    17. 9. Azure Site Recovery and Azure Backup for Hyper-V
      1. Introduction
      2. Enabling Hyper-V virtual machines protection to Azure with Azure Site Recovery and Microsoft Azure Backup Server
        1. Getting ready
        2. How to do it...
          1. Step 1: Create an Azure Site Recovery vault
          2. Step 2: Prepare Infrastructure - Protection Goal
          3. Step 2: Prepare Infrastructure – Prepare Source
          4. Step 2: Prepare infrastructure – Prepare Target
          5. Step 2: Prepare infrastructure – replication settings
          6. Step 2: Prepare infrastructure – capacity planning
          7. Step 3: Replicate the application
          8. Step 4: Manage Recovery Plans - Create Recovery Plan
          9. Step 4: Manage Recovery Plans - Customize Recovery Settings
          10. Step 5: Run a test failover
          11. Step 6: Monitoring Azure Site Recovery - Jobs, Alerts and Events
          12. Step 6: Monitoring Azure Site Recovery - General Monitoring
        3. How it works...
        4. There's more...
          1. Using Windows PowerShell to replicate between on-premises Hyper-V VMs and Azure
          2. Backing up to Azure
        5. See also
    18. 10. Monitoring, Tuning, and Troubleshooting Hyper-V
      1. Introduction
      2. Using real-time monitoring tools
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      3. Using Perfmon for logged monitoring
        1. Getting ready
        2. How to do it…
        3. How it works…
          1. Hyper-V general:
          2. Physical and virtual processor:
          3. Memory:
          4. Disk:
          5. Network:
        4. See also
      4. Using VM monitoring
        1. Getting ready
        2. How to do it…
        3. How it works…
      5. Monitoring Hyper-V Replica
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      6. Using resource metering
        1. Getting ready
        2. How to do it…
        3. How it works…
      7. Tuning your Hyper-V server
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      8. Using event viewer for Hyper-V troubleshooting
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
    19. A. Hyper-V Architecture and Components
      1. Understanding Hypervisors
        1. VMM Type 2
        2. VMM Hybrid
        3. VMM Type 1
      2. Hyper-V architecture
        1. Windows before Hyper-V
        2. Windows after Hyper-V
      3. Hyper-V architecture components
        1. Hypervisor
        2. Partitions
        3. Virtualization stack
        4. Enlightened (high performance) versus emulated (low performance)
        5. Backup improvements
      4. Differences between Windows Server 2016 Hyper-V, Nano Server, Hyper-V Server, Hyper-V Client, and VMware
        1. Hyper-V limitations improvements
        2. Windows Server 2016 Hyper-V
        3. Nano Server
          1. Microsoft Hyper-V Server 2016
        4. Hyper-V Client
      5. Windows Server 2016 Hyper-V X VMware vSphere 6.5
        1. Automatic Virtual Machine Activation
        2. Hyper-V comparing technologies
    20. Index