Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Windows Server 2012 Hyper-V Cookbook
Windows Server 2012 Hyper-V Cookbook
Windows Server 2012 Hyper-V Cookbook
Ebook668 pages2 hours

Windows Server 2012 Hyper-V Cookbook

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Windows Server 2012 Hyper-V Cookbook is a practical cookbook packed with recipes showing and explaining all the features and components of Hyper-V. You’ll learn from best practices, tips and tricks and examples of how to automate daily and common tasks. If you are an administrator who wants to master Microsoft Server Virtualization with Windows Server 2012 Hyper-V, then this book is for you. You should be comfortable with virtualization concepts and practices, and knowledge of previous versions of Windows Server would be an advantage.
LanguageEnglish
Release dateNov 23, 2012
ISBN9781849684439
Windows Server 2012 Hyper-V Cookbook

Related to Windows Server 2012 Hyper-V Cookbook

Related ebooks

System Administration For You

View More

Related articles

Reviews for Windows Server 2012 Hyper-V Cookbook

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Windows Server 2012 Hyper-V Cookbook - Leandro Carvalho

    Table of Contents

    Windows Server 2012 Hyper-V Cookbook

    Credits

    About the Author

    Acknowledgement

    About the Reviewers

    www.PacktPub.com

    Support files, eBooks, discount offers and more

    Why Subscribe?

    Free Access for Packt account holders

    Instant Updates on New Packt Books

    Preface

    What this book covers

    What you need for this book

    Who this book is for

    Conventions

    Reader feedback

    Customer support

    Errata

    Piracy

    Questions

    1. Installing and Managing Hyper-V in Full or Server Core Mode

    Introduction

    Verifying Hyper-V requirements

    Getting ready

    How to do it...

    How it works...

    See also

    Enabling the Hyper-V role

    Getting ready

    How to do it...

    How it works...

    There's more...

    Installing Hyper-V using Windows PowerShell

    See also

    Installing Windows Server 2012 and Microsoft Hyper-V Server 2012

    Getting ready

    How to do it...

    How it works...

    See also

    Managing a Server Core installation using sconfig

    Getting ready

    How to do it...

    How it works...

    See also

    Enabling and disabling the graphical interface in Hyper-V

    Getting ready

    How to do it...

    How it works...

    Configuring post-installation settings

    Getting ready

    How to do it...

    How it works...

    See also

    2. Migrating and Upgrading Physical and Virtual Servers

    Introduction

    Performing an in-place upgrade from Windows Server 2008 R2 to Windows Server 2012

    Getting ready

    How to do it...

    How it works...

    See also

    Exporting and importing virtual machines

    Getting ready

    How to do it...

    How it works...

    See also

    Migrating virtual machines and updating their integration services

    Getting ready

    How to do it...

    How it works...

    There's more...

    See also

    Converting VHD files to VHDX files

    Getting ready

    How to do it...

    How it works...

    There's more...

    See also

    Migrating Virtual Machine storage using Storage Migration

    Getting ready

    How to do it...

    How it works...

    There's more...

    Moving all the virtual machines to a new storage location

    Migrating virtual machines using Shared Nothing Live Migration

    Getting ready

    How to do it...

    How it works...

    There's more...

    Configuring constrained delegation to authenticate live migrations

    See also

    Converting physical computers to virtual machines

    Getting ready

    How to do it...

    How it works...

    There's more...

    Converting physical computers to virtual machines using a command line

    3. Managing Disk and Network Settings

    Introduction

    Creating and adding virtual hard disks

    Getting ready

    How to do it...

    How it works...

    There's more...

    Mounting a virtual hard disk on the host computer

    Adding a pass-through disk for a virtual machine

    Creating virtual machines on file servers

    See also

    Configuring IDE and SCSI controllers for virtual machines

    Getting ready

    How to do it...

    How it works...

    There's more...

    See also

    Creating resource pools

    Getting ready

    How to do it...

    How it works...

    There's more...

    See also

    Creating and managing virtual switches

    Getting ready

    How to do it...

    How it works...

    Using legacy network adapters

    See also

    Using advanced settings for virtual networks

    Getting ready

    How to do it...

    How it works...

    There's more...

    See also

    Enabling and adding NIC teaming to a virtual machine

    Getting ready

    How to do it...

    How it works...

    Configuring and adding Hyper-V Virtual Fibre Channel to virtual machines

    Getting ready

    How to do it...

    How it works...

    4. Saving Time and Cost with Hyper-V Automation

    Introduction

    Installing and running Hyper-V from a USB stick

    Getting ready

    How to do it...

    How it works...

    See also

    Creating virtual machine templates

    Getting ready

    How to do it...

    How it works...

    See also

    Learning and utilizing basic commands in PowerShell

    Getting ready

    How to do it...

    How it works...

    There's more...

    Using PowerShell to create multiple VMs in a single command line

    See also

    Using small PowerShell commands for daily tasks

    Getting ready

    How to do it...

    How it works...

    There's more...

    Using PowerShell ISE for advanced script editing

    Enabling scripts to be executed in PowerShell

    See also

    Enabling and working with remote connection and administration through PowerShell

    Getting ready

    How to do it...

    How it works...

    5. Hyper-V Best Practices, Tips, and Tricks

    Introduction

    Using the Hyper-V Best Practices Analyzer

    Getting ready

    How to do it...

    How it works...

    There's more...

    Using PowerShell to create HTML reports with the BPA results

    Setting up dynamic memory for virtual machines

    Getting ready

    How to do it...

    How it works...

    There's more...

    Using PowerShell to manage dynamic memory for virtual machines

    Enabling remote management for Hyper-V in workgroup environments

    Getting ready

    How to do it...

    How it works...

    See also

    Installing and configuring an anti-virus on host and virtual machines

    Getting ready

    How to do it...

    How it works...

    6. Security and Delegation of Control

    Introduction

    Configuring Windows Update for Hyper-V

    Getting ready

    How to do it...

    How it works...

    Configuring Cluster-Aware Updating for cluster nodes

    Getting ready

    How to do it...

    How it works...

    There's more...

    See also

    Delegating control in Hyper-V

    Getting ready

    How to do it...

    How it works...

    Configuring Port ACLs

    Getting ready

    How to do it...

    How it works...

    See also

    Installing and configuring BitLocker for data protection

    Getting ready

    How to do it...

    How it works...

    There's more...

    Configuring Hyper-V auditing

    How to do it...

    How it works...

    7. Configuring High Availability in Hyper-V

    Introduction

    Installing and configuring an iSCSI Target server in Windows Server 2012

    Getting ready

    How to do it...

    How it works...

    There's more...

    See also

    Installing and configuring the Windows Failover Clustering feature

    Getting ready

    How to do it...

    How it works...

    There's more...

    See also

    Enabling Cluster Shared Volumes 2.0

    Getting ready

    How to do it...

    How it works...

    There's more...

    Configuring CSV Cache for Hyper-V Environments

    See also

    Using Live Migration in a cluster environment

    Getting ready

    How to do it...

    How it works...

    There's more...

    See also

    Configuring VM Priority for Clustered Virtual Machines

    Getting ready

    How to do it...

    How it works...

    There's more...

    8. Disaster Recovery for Hyper-V

    Introduction

    Backing up Hyper-V and virtual machines using Windows Server Backup

    Getting ready

    How to do it...

    How it works...

    There's more...

    Checking the Windows Server Backup commandlets

    See also

    Restoring Hyper-V and Virtual Machines using Windows Server Backup

    Getting ready

    How to do it...

    How it works...

    See also

    Configuring Hyper-V Replica between two hyper-V hosts using HTTP authentication

    Getting ready

    How to do it...

    How it works...

    There's more...

    Using PowerShell to configure and enable Hyper-V Replica

    See also

    Configuring Hyper-V Replica Broker for a Failover Cluster

    Getting ready

    How to do it...

    How it works...

    See also

    Configuring Hyper-V Replica to use certificate-based authentication using an Enterprise CA

    Getting ready

    How to do it...

    How it works...

    See also

    Using snapshots in virtual machines

    Getting ready

    How to do it...

    How it works...

    There's more...

    Exporting a virtual machine out of a snapshot

    See also

    9. Monitoring, Tuning, and Troubleshooting Hyper-V

    Introduction

    Using real-time monitoring tools

    Getting ready

    How to do it...

    How it works...

    There's more...

    See also

    Using Perfmon for logged monitoring

    Getting ready

    How to do it...

    How it works...

    See also

    Using VM Monitoring

    Getting ready

    How to do it...

    How it works...

    Monitoring Hyper-V Replica

    Getting ready

    How to do it...

    How it works...

    There's more...

    See also

    Using Resource Metering

    Getting ready

    How to do it...

    How it works...

    Tuning your Hyper-V server

    Getting ready

    How to do it...

    How it works...

    See also

    Using Event Viewer for Hyper-V troubleshooting

    Getting ready

    How to do it...

    How it works...

    See also

    A. Hyper-V Architecture and Components

    Understanding Hypervisors

    VMM Type 1VMM Type 2

    VMM Hybrid

    VMM Type 1

    Hyper-V architecture

    Windows before Hyper-V

    Windows after Hyper-V

    Hyper-V architecture components

    Hypervisor

    Partitions

    Virtualization stack

    Enlightened versus emulated

    Differences between Hyper-V, Hyper-V Server, Hyper-V Client, and VMware

    Hyper-V limitations improvements

    Windows Server 2012 Hyper-V

    Microsoft Hyper-V Server 2012

    Hyper-V Client

    Windows Server 2012 Hyper-V X VMware vSphere 5.1

    Hyper-V comparing technologies

    References

    Index

    Windows Server 2012 Hyper-V Cookbook


    Windows Server 2012 Hyper-V Cookbook

    Copyright © 2012 Packt Publishing

    All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

    Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

    First published: November 2012

    Production Reference: 1151112

    Published by Packt Publishing Ltd.

    Livery Place

    35 Livery Street

    Birmingham B3 2PB, UK.

    ISBN 978-1-84968-442-2

    www.packtpub.com

    Cover Image by Artie Ng ( <artherng@yahoo.com.au >)

    Credits

    Author

    Leandro Carvalho

    Reviewers

    Vinicius R. Apolinario

    Edvaldo Alessandro Cardoso

    Kristian Nese

    Carsten Rachfahl

    Acquisition Editors

    Stephanie Moss

    Robin de Jongh

    Lead Technical Editor

    Azharuddin Sheikh

    Technical Editors

    Brandt D'Mello

    Pooja Pande

    Project Coordinator

    Joel Goveya

    Proofreaders

    Maria Gould

    Dan McMahon

    Indexers

    Monica Ajmera Mehta

    Tejal Soni

    Graphics

    Valentina D'silva

    Sheetal Aute

    Production Coordinator

    Melwyn D'sa

    Cover Work

    Melwyn D'sa

    About the Author

    Leandro Carvalho is a well-known virtualization specialist who writes and presents sessions about virtualization and the private cloud. He works with Microsoft solutions such as Windows Server, Hyper-V, App-V, VDI, security, System Center, Exchange, Lync Server, Sharepoint, Project Server, and client systems, in addition to helping the community constantly with articles, forums, videos, and lectures about his passion—Microsoft Virtualization. He has the certifications Certified Ethical Hacker/MCP/MCSA+M+S/MCSE+S/MCTS/MCITP/MCT, and MVP. In 2009, he won the MCT Awards Latin America Trainer of the Year, and he has been awarded Microsoft MVP as Virtualization Specialist every year since 2010.

    Leandro can be reached at http://leandroesc.wordpress.com and http://msmvps.com/blogs/msvirtualization and his Twitter handle is @LeandroEduardo.

    Acknowledgement

    I still remember when my cousin Marcelo used to force me to read books when I was young. I wasn't very fond of reading in those days, and now here I am, releasing my own book. It's hard to believe that I could have achieved something that was such a distant dream for me before. So, I start by thanking you, Marcelo, for pointing me in the right direction and helping me to become who I am today.

    I thought it would have been easy to write a technical book and that I wouldn't need any help. Well, I've proven again that we can't conquer anything alone. I've had the pleasure of having four friends help me by reviewing this book. I can say now that I could not have finished it as I did, without their help. So, thank you Alessandro, Carsten, Kristian, and Vinícius, for all the time spent reviewing, with such perfection, the chapters in what I call our book.

    I would also like to thank all of those on the Packt team involved in this project, who helped me right through; first, Stephanie, who was my first contact, and then later, Azhar, Brandt, Joel, and Pooja. Thank you, guys.

    And last but not least, my wife, Juliana, and my son, Eduardo. I am very proud to have had your support right since the beginning; you even gave up the time I could've been spending with you so I could write this book. I dedicate it to you with all my heart.

    About the Reviewers

    Vinicius R. Apolinario has worked with IT for more than 10 years, always working with Microsoft products, managing servers and environments for small, medium, and large companies. He has a strong background in managing Microsoft Servers such as Active Directory, Exchange, and other Windows Server components. Today he works for Microsoft Brazil as a Technical Evangelist, focusing on Infrastructure. As a part of his job, he does presentations for partners and customers about products such as Windows Server, Hyper-V, System Center, and Windows Azure. Before this role, he worked with Microsoft Brazil on the Windows Server and Private Cloud Product Team, as a technical specialist. Vinicius is also a Microsoft Certified Professional on several Microsoft products. He has been a Microsoft Certified Trainer since 2009 and maintains a blog—ADM de Redes (www.admderedes.com.br), in Brazilian Portuguese—through which he shares his knowledge with other professionals.

    Working on this project was truly a challenge but was also really fun for me. The time it consumed was actually taken from the time I spend with my wife. Her support in everything I do is the most important thing I have and I must not forget to thank her for being by my side all the time. I also want to thank Leandro, whom I really admire as a professional, for letting me jump in on this project and making me believe in my skills.

    Edvaldo Alessandro Cardoso is a team leader, with expertise on the cloud and a vast knowledge of a variety of Microsoft Infrastructure technologies in areas such as Virtualization and management. His product skill sets include Hyper-V, System Center, Windows Server, SQL Server, Active Directory, Exchange, SharePoint, IIS, and Forefront, and he also has knowledge of Quest Migration Manager, Linux Infrastructure, networking, security solutions (such as VPN and Firewall), and VMware in complex and large scenarios. He has a strong grasp of industry-related datacenter processes, strategies, industry regulations, and requirements.

    He has over 23 years of experience in IT, in roles from in application development to a role in the field of network security. He has worked as a system engineer, as a senior consultant, and as an IT manager and has a history of successful enterprise projects in the IT, health, education, and government sectors.

    He has been Microsoft Most Valuable Professional in Virtualization since 2009 and is a well-known speaker at IT-related events such as TechEd, CNASI, and User Groups. He has consistently been a presenter for more than 10 years.

    An active member of Microsoft System Center 2012 TAP, Australia Computer Society Certified Professional, MCSE, and MCT, since 2003, he was selected as Microsoft TechNet Brazil IT Hero in 2007. He was also awarded the Microsoft IT Heroes Happen award in Los Angeles in 2008. Furthermore, his virtualization project for a government institution in Brazil, while working as IT Manager, was selected as a business case by Microsoft.

    He works for Dell Australia as a Senior Technical Consultant. Currently, he is associated with reviewing System Center Virtual Machine 2012 Cookbook.

    He blogs at:

    http://virtualizationandmanagement.wordpress.com/

    http://virtualizacaoegerenciamento.wordpress.com/

    I would like to thank my wife, Daniele, and my kids, Matheus, Lucas, and Nicole, for their kind and full support and for understanding my long nights at the computer. I'd also like to thank the Microsoft Virtualization team in Redmond for their help and support, and Leandro Carvalho, for the invitation to participate in such a challenging project.

    Kristian Nese started his career in 2005 with no formal training. After some years of heavy training and private study, he has reached a high level of understanding regarding technology, business requirements, and opportunities. He now has 6 years of experience in networking, servers, databases, virtualization, management, automation, architecture, and optimization. Kristian is a Subject Matter Expert in Cloud Computing.

    He is an experienced speaker, delivering keynotes and highly technical sessions (level 400), which are often used by Microsoft nationally and globally both as a speaker and writer, on subjects such as Windows Azure, System Center, Windows Server, and Hyper-V.

    To stay sharp, he spends a lot of time in the TechNet forums as well, trying to help the community so that they can get the most out of the technology. He also delivers training to local user groups in Norway.

    Kristian is also the author of Cloud Computing - Med Virtual Machine Manager 2012, published by IDG/BookWorld. He has been a part of several other books related to cloud computing, virtualization, and technology in general.

    He has also been associated with books such as Microsoft Private Cloud Computing, Aidan Finn, Hans Vredevoort, Patrick Lownds, and Damian Flynn, John Wiley and Sons, Inc., and wrote a review of the latest release of VMM in a famous blog post, Cloud Computing with System Center 2012 - Virtual Machine Manager. The Review, on his blog, Virtualization And Some Coffee (http://www.wservernews.com/go/1350553154779)

    I would like to thank my lovely son, Lukas, for letting me spend my time working on this project. You are the source of my inspiration and happiness.

    Carsten Rachfahl started his IT career in 1988, working as a developer on porting X-Windows to an operating system called OS/9. In 1991, he founded his own company in Germany and is self-employed these days. Since 2001, along with Citrix/Terminalserver, his focus is on the virtualization space nowadays. When Microsoft finally created a real Hypervisor and brought it to the market, he was all in. His blog http://www.hyper-v-server.de is highly recognized and appreciated within the virtualization community. The blog features tutorials, articles, screencasts, video interviews, and podcasts that focus on Microsoft Private Cloud. Being an MCT, he teaches various Microsoft virtualization courses and his own Hyper-V Powerkurs course. As a co-founder of the German Hyper-V community, he regularly organizes events. His efforts were rewarded with the Microsoft MVP Award for Virtual Machine in 2011 and 2012.

    I want to thank my wife, Kerstin, and my kids, Ian and Ina, for their ongoing support, their understanding, and encouragement. Without you guys I could not have followed my passion.

    www.PacktPub.com

    Support files, eBooks, discount offers and more

    You might want to visit www.PacktPub.com for support files and downloads related to your book.

    Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at for more details.

    At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

    http://PacktLib.PacktPub.com

    Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. 

    Why Subscribe?

    Fully searchable across every book published by Packt

    Copy and paste, print and bookmark content

    On demand and accessible via web browser

    Free Access for Packt account holders

    If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

    Instant Updates on New Packt Books

    Get notified! Find out when new books are published by following @PacktEnterprise on Twitter, or the Packt Enterprise Facebook page.

    Preface

    Virtualization has proved that it can help organizations to reduce costs, and the Private Cloud has created a revolution in the way we manage and control our servers with centralization and elasticity. The new Windows Server 2012 Hyper-V release from Microsoft comes with a myriad of improvements in areas such as mobility, high availability, and elasticity, bringing everything you need to create, manage, and build the core components of a Microsoft Private Cloud for virtualized workloads.

    Windows Server 2012 Hyper-V Cookbook is the perfect accompaniment for Hyper-V administrators looking to take advantage of all the exciting new features the release has to offer. Through practical recipes, you'll master Hyper-V deployment, migration, and management.

    Windows Server 2012 Hyper-V Cookbook is an essential resource for any Hyper-V administrator looking to migrate, install, or manage their virtual machine efficiently.

    With all the features of Windows Server 2012 Hyper-V covered, you will learn everything from installation to disaster recovery, security, high availability, configuration, automation, architecture, and monitoring, all in a practical recipe format. The book also includes new features such as Storage and Shared Nothing Live Migration, Hyper-V Replica and Network Virtualization, and much more.

    With Windows Server 2012 Hyper-V Cookbook in hand, you'll be equipped to manage your private cloud with ease.

    What this book covers

    Chapter 1 , Installing and Managing Hyper-V in Full or Server Core Mode, provides all the necessary information that you need to know before, during, and after the Hyper-V 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, covers tasks that will help you to have an easy and a

    Enjoying the preview?
    Page 1 of 1