The Busy Developer’s Guideto Virtualization
Brian A. Randell
Senior Consultant
MCW Technologiesbrianr@mcwtech.com
AAP301
Development Trends
Team
Innovation
Growth
Cloud
C:\Users\Brian\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\EL2P26AG\MP900449113[1].jpg
Complex World, Full of Technology
C:\Users\Brian\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\X4GR86G5\MP900402013[1].jpg
Virtualization Provides Flexibility
C:\Users\Brian\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\TYHH8VK2\MP900382747[1].jpg
Session Roadmap
What you need to get started
Hardware and software
Working with Virtual Machines
Optimizations
Some Vocabulary
Virtual machine—a “completely isolated guest operating system installation within a normal host operating system”
Host—the physical machine providing hardware services
Guest—a virtual machine running on a host
Different Types of Virtualization
Operating System
Application
Presentation
Device
Microsoft Virtualization Technologies
Hyper-V
Boot To VHD

App-V
Remote Desktop Services
Virtual PC
Virtual Server
Windows Virtual PC
Hyper-V
Microsoft’s enterprise class hypervisor that relies upon processor provided hardware virtualization
Requires 64-bit version of Windows host OS
First made available in Windows Server 2008
Updated in Windows Server 2008 R2 and SP1
Windows Server 2012 provides the magical 3rd release

Windows 8 Professional and Enterprise support Hyper-V on the client
Hardware
Processor
RAM
Hard disk
Video
Networking
Processor
Processor Specific Virtualization
Intel VT
AMD-V
What about that extra stuff in my BIOS?

Sockets, Cores, and Hyper-threading
SLAT required for virtualization on Windows 8 Client
demo
Checking for Support
Set up your host
Configure Hyper-V
Use Add/Remote Programs on Client
Server Manager, Add Role
demo
BCDEDIT
Set up your guests
MSDN and Technet are your friends
Product Activation
Sysprep
Keeping things up to date
RAM
Generally more is better
Optimize for use case
Dynamic memory in Hyper-V
Do more with less
demo
Dynamic Memory
Physical Storage
DAS
SSD
Hybrid
Mechanical
Network-based
iSCSI on the cheap
Production SANs
Virtual Storage
Virtual Hard Disk
Two formats
VHD
Limited to 2 TB in size
VHDX—new for Windows 8 and Windows Server 2012
Better resiliency
Up to 64 TB in size
Can be fixed or dynamically expanding in size
Support differencing disks and snapshots
demo
Hard Disk Performance
Boot to VHD
Device Virtualization
Presents a “native” hard drive to your host computer
Can use with or without a native install
BCDEDIT is your friend
So are BCDBOOT and DISKPART
System Configuration Tool (MSCONFIG.EXE) does some things if you need a GUI
Boot to VHD supports VHD and VHDX (only Win8/2012)
Can be Dynamic, Fixed, or Diff
Drive EXPANDS to full size if a Dynamic or Differencing VHD(x)
demo
Boot to VHD
Video
Video Cards in general don’t have a huge impact
You’re stuck with the emulated video card
RemoteFX however brings a rich experience to your virtual machines by utilizing your video card’s GPU
Requires Server 2008 R2 SP1 or Server 2012
Requires Remote Desktop Services Virtualization Host
Additional Licensing Requirement
Requires a compatible video card
demo
RemoteFX
Tips
VM Creation
Sysprep is your friend
Diff drives are another great feature
Snapshots
Provide your VMs until UNDO and REDO
Limited to 50 per VM
Eat disk space
Capture both data and configuration changes
Deleting Virtual Machines
Deleting the Virtual Machine from the console does not remove it’s files
Deleting a Virtual Machine with Snapshots will cause the snapshot tree to merge with the parent VHD
Can take a LONG TIME to complete if what you really want is to just get the thing removed
Two strategies
Delete the snapshots from the bottom up first
Apply the root snapshot and then delete the tree (my fav)
Tips
When using Boot to VHD make sure you use fixed size drives unless you’re really going to be careful
Watch out for drives > 2 TB pre-Windows 8
Things that don’t work or work well in virtual machines
Windows Phone Tools
Profilers
Programs that need direct access to hardware
thumbdrive.vhd
Using SCSI adapters and VHDs makes it easy to hot move your data to & from VMs
Great when you don’t have network connectivity
Great to bring data to each new VM
Installs
Source files
Whatever
Optimize your Dynamic VHDs
Compact is built-in to the Console Tools
Only does tail end clean up
Use SDELETE from Sysinternals to zero out free space
demo
Tips
Automation
Hyper-V exposes a WMI interface on all versions
SCVMM 2008 and later offer PowerShell Cmdlets
Hyper-V on Windows 8 also provides in box PowerShell support via CmdLets
demo
Hyper-V and PowerShell
Good bye
Thank you for coming!
Virtualization is for everyone
Live long and prosper
Resources
Connect. Share. Discuss.
ms_Learning_w.eps
Learning
Microsoft logo and tagline
Microsoft Certification & Training Resources
ms_Learning_w.eps
TechNet
Microsoft logo and tagline
Resources for IT Professionals
Resources for Developers
C:\Users\Jordan\Desktop\TechEd_2012\TechEd-logo.png
\\192.168.1.51\Shared\ADI_Projects\Microsoft\MS_11-01457_TechEd_2012_Template\Working_Art\Eval-prizes\bestbuy-gc.png
Complete an evaluation on CommNet and enter to win!
\\192.168.1.51\Shared\ADI_Projects\Microsoft\MS_11-01457_TechEd_2012_Template\Working_Art\Eval-prizes\Xbox360_Matte_Sensor_7-8View.png
\\192.168.1.51\Shared\ADI_Projects\Microsoft\MS_11-01457_TechEd_2012_Template\Working_Art\Eval-prizes\Geek-military-hat.jpg
\\192.168.1.51\Shared\ADI_Projects\Microsoft\MS_11-01457_TechEd_2012_Template\Working_Art\Eval-prizes\Geek-usb-hub.jpg
\\192.168.1.51\Shared\ADI_Projects\Microsoft\MS_11-01457_TechEd_2012_Template\Working_Art\Eval-prizes\LED-flashlight.jpg
\\192.168.1.51\Shared\ADI_Projects\Microsoft\MS_11-01457_TechEd_2012_Template\Working_Art\Eval-prizes\Neoprene-accessory-case.jpg
\\192.168.1.51\Shared\ADI_Projects\Microsoft\MS_11-01457_TechEd_2012_Template\Working_Art\Eval-prizes\Cloud-power-shirt.jpg
MS Tag
Scan the Tag
to evaluate this
session now on
myTechEd Mobile
\\192.168.1.51\Shared\ADI_Projects\Microsoft\MS_11-01323_SpeechTek_PPT\ADI_Art\Working_Art\Mango_Start_Phone_English_Red_061011.png
C:\Users\Jordan\Desktop\TechEd_2012\TechEd-logo.png
Microsoft logo and tagline
© 2012 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.