Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen...

53
Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer [email protected] Microsoft (Malaysia)

Transcript of Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen...

Page 1: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Hyper-V Deployment and Best Practices

Satyen Pradhan

Premier Field Engineer

[email protected]

Microsoft (Malaysia)

Page 2: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Session Objectives

Page 3: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Hyper-V Benefits

Server consolidationServer consolidation

Business ContinuityBusiness Continuity FlexibilityFlexibility

UtilizationUtilization

Page 4: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Hyper-V: Production Ready

TAP, RDP & MSIT Hyper-V DeploymentsThousands of Hyper-V VMs in PRODUCTION

Windows Server 2003/2008 Roles:

File, Print, AD, RODC, IIS/Web, TS, Application Services, DHCP, DNS, WSS and

more…

Microsoft Server Products:

SQL, Exchange, HPC, ISA, Sharepoint, Project Server, VSTS, BizTalk,

Configuration Manager, Operations Manager & more…

Hyper-V Stats:Performance Blockers: ZERO

Deployment Blockers: ZERO

Application Compatibility Bugs: ZERO

Scalability Blockers: ZERO

Page 5: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Hyper-V: Production Scalability

Hyper-V Powering Microsoft Internet Properties

TechNet: 100% Hyper-V

http://technet.microsoft.com

~1 million hits a DAY

MSDN: 100% Hyper-V

http://msdn.microsoft.com

~3 million hits a DAY

Microsoft.com: ~50% Hyper-V and growing

http://www.microsoft.com

>1 billion hits a month

Page 6: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Windows Server

2008

VSPVSPWindows

Kernel

Applications Applications Applications

Non-

Hypervisor Aware OS

Windows Server

2003, 2008

Windows

Kernel VSC

VMBusVMBus EmulationEmulation

“Designed for Windows” Server Hardware

Windows hypervisor

Xen-Enabled

Linux Kernel

Linux

VSC

Hypercall Adapter

Parent

PartitionChild Partitions

VM ServiceVM Service

WMI ProviderWMI Provider

VM Worker

Processes

OS

ISV / IHV / OEM

Microsoft Hyper-V

Microsoft / XenSource

User

Mode

Kernel

Mode

Provided by:

Ring -1

IHV

Drivers

VMBusVMBus

VMBus

Applications

Page 7: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Virtualization Requirements

1.1. SchedulerScheduler

2.2. Memory Memory

ManagementManagement

3.3. VM State MachineVM State Machine

4.4. Virtualized DevicesVirtualized Devices

5.5. Storage StackStorage Stack

6.6. Network StackNetwork Stack

7.7. DriversDrivers

8.8. Management APIManagement API

Page 8: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Why not get rid of the parent?No defense in depth

Entire hypervisor running in the most privileged mode of the system

•Scheduler•Memory Management•Storage Stack•Network Stack•VM State Machine•Virtualized Devices•Drivers•Management API

Hardware

Ring -1

UserMode

KernelMode

UserMode

KernelMode

UserMode

KernelMode Ring 0

Ring 3

Virtual

Machine

Virtual

Machine

Virtual

Machine

Page 9: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Micro-kernelized Hypervisor

Defense in depth

Using hardware to protect

Hyper-V doesn’t use ring compression

SchedulerMemory Management

Hardware

VM State MachineVirtualized DevicesManagement API

Ring -1

Storage StackNetwork Stack

Drivers

UserMode

KernelMode

UserMode

KernelMode Ring 0

Ring 3

Parent PartitionVirtual

Machine

Virtual

Machine

Page 10: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

HOW TO INSTALL HYPER-V?

Page 11: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

SERVER CORE

Page 12: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Windows Server Core

Page 13: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Windows Server Core

Page 14: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

ENABLING HYPER-V WITH

SERVER CORE

Step-by-step instructions…

Page 15: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Installing Hyper-V Role on CoreInstall Windows Server 2008, select a Server Core installation

option

Page 16: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Set Admin Password

net user administrator <new_password>

shutdown /r /t 0

Page 17: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Rename Computernetdom renamecomputer %computername% /newname:<new_computername>

shutdown /r /t 0

Page 18: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Join Domain

netdom join %computername% /domain:<domain> /userd:<username> /passwordd:*

enter password when prompted

shutdown /r /t 0

Page 19: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Add domain account to local admin group

net localgroup administrators /add <domain_account>

logoff

Page 20: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Add Hyper-V Roleocsetup Microsoft-Hyper-V

Restart when prompted

Page 21: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Enabling Remote DesktopOPTIONAL

cscript \windows\system32\scregedit.wsf /ar 0

cscript \windows\system32\scregedit.wsf /cs 0

Page 22: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

HYPER-V NETWORKING

Page 23: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Hyper-V Networking

• Two physical network adapters at minimum

• One for management

• One (or more) for VM networking

• Dedicated NIC(s) for iSCSI

• Connect parent to back-end management network

• Only expose guests to internet traffic

Page 24: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Hyper-V Network Configurations

Example 1:Physical Server has 4 network adapters

NIC 1: Assigned to parent partition for management

NICs 2/3/4: Assigned to virtual switches for virtual machine networking

Storage is non-iSCSI such as:Direct attach

SAS or Fibre Channel

Page 25: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Hyper-V Setup & Networking 1

Page 26: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Hyper-V Setup & Networking 2

Page 27: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Hyper-V Setup & Networking 3

Page 28: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Hyper-V Network Configurations

Example 2:Server has 4 physical network adapters

NIC 1: Assigned to parent partition for management

NIC 2: Assigned to parent partition for iSCSI

NICs 3/4: Assigned to virtual switches for virtual machine networking

Page 29: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Hyper-V Setup, Networking & iSCSI

Page 30: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Networking: Parent Partition

Page 31: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Networking: Virtual Switches

Page 32: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

HYPER-V & STORAGE…

Step by Step Instructions

Page 33: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Hyper-V Storage...Performance wise from fastest to slowest…

Fixed Disk VHDs/Pass Through DisksAbout the same in terms of performance

Dynamically Expanding VHDsGrow as needed

Pass Through DisksPro: VM writes directly to a disk/LUN without encapsulation in a VHD

Cons:

You can’t use VM snapshots

Pro/Con: Dedicating a disk to a vm

Use Fixed Disk VHDs or Pass Through Disks in Production!Use Fixed Disk VHDs or Pass Through Disks in Production!

Page 34: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

VM Setting No Pass Through

Page 35: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Computer Management: Disk

Page 36: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Taking a disk offline

Page 37: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Disk is offline…

Page 38: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Pass Through Configured

Page 39: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

BEST PRACTICES & TIPS AND

TRICKS

Page 40: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Deployment Considerations

Minimize risk to the Parent Partition

Use Server Core

Don’t run arbitrary apps, no web surfing

Run your apps and services in guests

Moving VMs from Virtual Server to Hyper-V

FIRST: Uninstall the VM Additions

Two physical network adapters at minimum

One for management (use a VLAN too)

One (or more) for vm networking

Dedicated NIC(s) for iSCSI

Only expose guests to internet traffic

Cluster Production Systems

Page 41: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Best Practices for Physical Servers

Avoid Overloading the Server

Ensure High Speed access to Storage

Avoid Mixing Virtual Machines that can and

cannot use Integration Services

Avoid Storing System Files on Drives used for

Hyper-V Storage

Monitor Performance to Optimize and Manage

Server Loading

Page 42: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Best Practices for Configuring Virtual Machines

Install Integration Services

Uninstall VMAdditions and Compact the VHDs

Set Display for Best Performance

To ensure the hardware acceleration is set to full

Configure Fixed-Size VHDs

The file system is less likely to fragment and better space management

Use SCSI Virtual Adapter for Data Drives

Allocate CPU Resources Based on Anticipated Usage

Consider using Pass-Through Disks

Configure Domain Controllers to Optimize Performance

Never save state or pause and do not take snapshots

Page 43: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Windows Server 2003 Cluster

Creation

Page 44: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Cluster Hyper-V Servers

Page 45: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Don't forget the ICs!Emulated vs. VSC

Page 46: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Anti-Virus & More…

Anti-VirusParent partition

• Run AV software and exclude .vhd

• Configure Anti-Virus to Bypass Hyper-V Processes and Directories

Child partitionsRun AV software within each VM

Use .isos

Great performance; Can be mounted and unmounted remotely

Physical DVD can’t be shared across multiple vms

Having them in SCVMM Library fast & convenient

Page 47: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Protects Data While a System is Offline

Entire Windows Volume is Encrypted (Hibernation and Page Files)

Delivers Umbrella Protection to Applications (On Encrypted Volume)

Ensures Boot Process Integrity

Automatically Locks System when Tampering Occurs

Simplifies Equipment Recycling

One Step Data Wipe – Deleting Access Keys Renders Disk Drive Useless

Mitigating Against External Threats…

Very Real Threat of Data Theft When a System is Stolen, Lost,or Otherwise Compromised (Hacker Tools Exist!)

Decommissioned Systems are not Guaranteed Clean

BitLocker Drive Encryption Support in Windows Server 2008

Addresses Leading External Threats by Combining Drive Level Encryptionwith Boot Process Integrity Validation

Leverages Trusted Platform Model (TPM) Technology (Hardware Module)

Integrates with Enterprise Ecosystem Maintaining Keys in Active Directory

BitLockerBitLocker--Persistent ProtectionPersistent Protection

Page 48: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Online Resources

Hyper-V WMI APIhttp://msdn2.microsoft.com/en-us/library/cc136992(VS.85).aspx

Virtual Hard Disk Specification OSP:http://www.microsoft.com/technet/virtualserver/downloads/vhdspec.mspx

MSDN & TechNet Powered by Hyper-Vhttp://blogs.technet.com/virtualization/archive/2008/05/20/msdn-and-technet-powered-by-hyper-v.aspx

Virtualization Solution Acceleratorshttp://technet.microsoft.com/en-us/solutionaccelerators/cc197910.aspx

How to install the Hyper-V rolehttp://www.microsoft.com/windowsserver2008/en/us/hyperv-install.aspx

Windows Server 2008 Hyper-V Performance Tuning Guidehttp://www.microsoft.com/whdc/system/sysperf/Perf_tun_srv.mspx

Using Hyper-V & BitLocker White Paperhttp://www.microsoft.com/downloads/details.aspx?FamilyID=2c3c0615-baf4-4a9c-b613-3fda14e84545&DisplayLang=en

Page 49: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Q & A

Page 50: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Have You Visited the Windows Client

TechCenter website?

www.technet.com/windows

Windows Client TechCenter provides IT professionals with the

right resources, at the right technical level, at the right point in

your technology adoption and management processes

Page 51: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Special Start.NET PromotionSpecial Start.NET Promotion

RM50 DISCOUNT + a FREE GIFTRM50 DISCOUNT + a FREE GIFT

for selected Start.NET Workshopsfor selected Start.NET Workshops

�� Windows Presentation FoundationWindows Presentation Foundation

�� Silverlight 2.0Silverlight 2.0

�� SQL Server 2008SQL Server 2008

�� SharePointSharePoint

•• Limited to the first 50 delegates who registeredLimited to the first 50 delegates who registered..

Register today!Register today!

Page 52: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

Housekeeping AnnouncementHousekeeping Announcement

Please complete the evaluation form and return it to the Please complete the evaluation form and return it to the Registration Counter in return for a Windows 7 Beta DVD. Registration Counter in return for a Windows 7 Beta DVD. Here is where you can get the product key Here is where you can get the product key : : http://technet.microsoft.com/evalcenter/dd353205.aspxhttp://technet.microsoft.com/evalcenter/dd353205.aspx

Please complete the TechNet MSDN Quiz Sheet and return Please complete the TechNet MSDN Quiz Sheet and return it to the Redemption Counter in return for a mystery giftit to the Redemption Counter in return for a mystery gift

Print out the TechCenter Homepage and redeem your gift Print out the TechCenter Homepage and redeem your gift at the Redemption Counter at the Redemption Counter

Visit the Partners & MS Learning counters at the foyer for great promotional offers

Page 53: Hyper V Deployment and Best Practices - thisnetwork · Hyper-V Deployment and Best Practices Satyen Pradhan Premier Field Engineer satyenp@microsoft.com Microsoft (Malaysia) ... net

© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other

countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to

changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of

this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.