the busy developer’s guide to virtualization brian a. randell senior consultant mcw technologies...
TRANSCRIPT
The Busy Developer’s Guide to Virtualization
Brian A. RandellSenior ConsultantMCW [email protected]
AAP301
Development Trends
TeamInnovationGrowth Cloud
Complex World, Full of Technology
Virtualization Provides Flexibility
Session Roadmap
What you need to get startedHardware and software
Working with Virtual MachinesOptimizations
Some Vocabulary
Virtual machine—a “completely isolated guest operating system installation within a normal host operating system”Host—the physical machine providing hardware servicesGuest—a virtual machine running on a host
Different Types of Virtualization
Operating SystemApplicationPresentationDevice
Microsoft Virtualization Technologies
Hyper-VBoot To VHD
App-VRemote Desktop ServicesVirtual PCVirtual ServerWindows Virtual PC
Hyper-V
Microsoft’s enterprise class hypervisor that relies upon processor provided hardware virtualizationRequires 64-bit version of Windows host OS
First made available in Windows Server 2008Updated in Windows Server 2008 R2 and SP1Windows Server 2012 provides the magical 3rd release
Windows 8 Professional and Enterprise support Hyper-V on the client
Hardware
ProcessorRAMHard diskVideoNetworking
Processor
Processor Specific VirtualizationIntel VTAMD-V
What about that extra stuff in my BIOS?
Sockets, Cores, and Hyper-threadingSLAT required for virtualization on Windows 8 Client
demo
Checking for Support
Set up your host
Configure Hyper-VUse Add/Remote Programs on ClientServer Manager, Add Role
demo
BCDEDIT
Set up your guests
MSDN and Technet are your friendsProduct ActivationSysprepKeeping things up to date
RAM
Generally more is betterOptimize for use caseDynamic memory in Hyper-V
Do more with less
demo
Dynamic Memory
Physical Storage
DASSSDHybridMechanical
Network-basediSCSI on the cheapProduction SANs
Virtual Storage
Virtual Hard DiskTwo formats
VHDLimited to 2 TB in size
VHDX—new for Windows 8 and Windows Server 2012Better resiliencyUp to 64 TB in size
Can be fixed or dynamically expanding in sizeSupport differencing disks and snapshots
demo
Hard Disk Performance
Boot to VHD
Device VirtualizationPresents a “native” hard drive to your host computerCan use with or without a native installBCDEDIT is your friend
So are BCDBOOT and DISKPARTSystem Configuration Tool (MSCONFIG.EXE) does some things if you need a GUIBoot to VHD supports VHD and VHDX (only Win8/2012)
Can be Dynamic, Fixed, or DiffDrive 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 impactYou’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 2012Requires Remote Desktop Services Virtualization Host
Additional Licensing Requirement
Requires a compatible video card
demo
RemoteFX
Tips
VM CreationSysprep is your friendDiff drives are another great feature
SnapshotsProvide your VMs until UNDO and REDOLimited to 50 per VMEat disk spaceCapture both data and configuration changes
Deleting Virtual Machines
Deleting the Virtual Machine from the console does not remove it’s filesDeleting 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 strategiesDelete the snapshots from the bottom up firstApply 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 carefulWatch out for drives > 2 TB pre-Windows 8Things that don’t work or work well in virtual machines
Windows Phone ToolsProfilersPrograms that need direct access to hardware
thumbdrive.vhd
Using SCSI adapters and VHDs makes it easy to hot move your data to & from VMsGreat when you don’t have network connectivityGreat to bring data to each new VM
InstallsSource filesWhatever
Optimize your Dynamic VHDs
Compact is built-in to the Console ToolsOnly 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 versionsSCVMM 2008 and later offer PowerShell CmdletsHyper-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 everyoneLive long and prosper
Resources
Connect. Share. Discuss.
http://northamerica.msteched.com
Learning
Microsoft Certification & Training Resources
www.microsoft.com/learning
TechNet
Resources for IT Professionals
http://microsoft.com/technet
Resources for Developers
http://microsoft.com/msdn
Complete an evaluation on CommNet and enter to win!
MS Tag
Scan the Tagto evaluate thissession now onmyTechEd Mobile
© 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.