HYPER-V BACKUP & RECOVERY "ON THE CHEAP" John Kelbley Senior Technical Product Manager JohnKel@microsoft.com 860-678-3107 Agenda Introductions DR Benefits of Virtualization Virtualization Backup & Recovery Challenges Backup and Recovery “On the Cheap” Export / Import Windows Server Backup (WSB) Scripted Diskshadow Backup Q&A Introduction John Kelbley johnkel@Microsoft.com Senior Technical Product Manager with Microsoft’s Platform Tech Strategy Team (Redmond-based group) Field-based “corporate” resource focused on customer and partner engagement for new server technology Server Virtualization High Performance Computing (HPC) Agenda Introductions DR Benefits of Virtualization Virtualization Backup & Recovery Challenges Backup and Recovery “On the Cheap” Export / Import Windows Server Backup (WSB) Scripted Diskshadow Backup Q&A DR Benefits of Virtualization Separates application from at risk physical hardware Move “that scary server in the corner that we don’t have the install CDs for anymore” to a VM Perpetuates a key business function Encapsulating a server in a VM let you easily Back up / restore Migrate Availability (failover clustering) Hardware maintenance Performance DR Benefits of Virtualization Application Backups Where None Were Possible How do you backup 10 year old multi- dimensional database? Shut down services, copy files, start services, run backup (or often NOT AT ALL!) How do you backup your Linux hosts? (many admins don’t!) High Availability Where None was possible Cluster physical hosts Hyper-V – Quick Migration / Live Migration Agenda Introductions DR Benefits of Virtualization Virtualization Backup & Recovery Challenges Backup and Recovery “On the Cheap” Export / Import Windows Server Backup (WSB) Scripted Diskshadow Backup Q&A Can You Back Up Virtualized Systems Safely? (article discussing Vmware Consolidated Backup) “it's not something that's easy to use and implement…you have to do the integration to make it work.” "It's difficult to just use …you have to write a lot of scripts and requires a lot of maintenance…that just adds another level of management to the process.“ Companies rushing to virtualize …find that backup and restore could be a problem due to its extensive use of scripting. How Do You Backup Your VMs? With VMware (and other virtualization stacks) agents inside VMs are common Host backups can be hard to “integrate” Agents insdie VMs does NOT provide you the benefit of encapsulation! Common Backup Architectures “Agented” Backup of Virtual Machine VM VM Backup Server VM “Agented” Backup of Physical Server Direct Backup of Physical Server VM VM VM Backup Server VM VM VM Backup Multiplexing Direct Backup of Physical Server “Agented” Backup of Virtual Machine VM VM VM VM VM VM Backup Server (Legacy) VM VM VM Backup Server (DPM?) Disk-based Recovery Active Directory® System State Online Snapshots (up to 512) DPM 2007 With Integrated Disk & Tape Windows XP Windows Vista Windows Server 2003 Windows Server 2008 file shares and directories Continuous Data Protection for Windows Application and File Servers Rapid and Reliable Recovery from disk instead of tape Advanced Technology for enterprises of all sizes Tape-based Archive Offline Tape DPM 2007 + Virtualization Virtual Machine1 Virtual Machine 2 Virtual Machine 3 Virtual Machine 4 Virtualization - with non-VSS Guest OS Virtual Machine1 Windows 2000 Virtual Machine 2 For any OS or application that is not internally VSSaware: Linux Windows 2000 Windows with Oracle Windows with LOB app Virtualization - with non-VSS Guest OS Virtual Machine1 Windows 2000 Virtual Machine 2 Hibernate OS to dump memory / CPU to VSV Snap with VSS Resume OS Compare block checksums to send only changes within VHD’s Agenda Introductions DR Benefits of Virtualization Virtualization Backup & Recovery Challenges Backup and Recovery “On the Cheap” Export / Import Windows Server Backup (WSB) Scripted Diskshadow Backup Q&A Hyper-V Comes With Backup! Because Hyper-V is integrated with Windows Server 2008, it can take advantage of integrated features: File management tools and commands you already know! Windows Server Backup (WSB) Volume Shadow Copy Service (VSS) Agenda Introductions DR Benefits of Virtualization Virtualization Backup & Recovery Challenges Backup and Recovery “On the Cheap” Export / Import Windows Server Backup (WSB) Scripted Diskshadow Backup Q&A Export / Import Integrated into Hyper-V is the ability to Export a VM’s configuration and Disk (VHD files) VM must be off or “saved” Packages up: Configuration (.XML) Disk (.VHD) Memory if saved (.VSV) Why Not Just Use Export? VM must be stopped (down time) Duplicates virtual machine every time (space) Does not work for pass through disk / or “child” mounted iSCSI (can’t capture all disks) Agenda Introductions DR Benefits of Virtualization Virtualization Backup & Recovery Challenges Backup and Recovery “On the Cheap” Export / Import Windows Server Backup (WSB) Scripted Diskshadow Backup Q&A Windows Server Backup Integrated with Windows Server 2008 (Replacement for NTBackup) Volume Shadow Copy (VSS) Aware Integrated scheduling features WSB Limitations Must register Hyper-V VSS Writer first! reg add "HKLM\Software\Microsoft\windows nt\currentversion\WindowsServerBackup\Application Support\{66841CD46DED-4F4B-8F17-FD23F8DDC3DE}" reg add "HKLM\Software\Microsoft\windows nt\currentversion\WindowsServerBackup\Application Support\{66841CD46DED-4F4B-8F17-FD23F8DDC3DE}" /v "Application Identifier" /t REG_SZ /d Hyper-v Scheduled backups require a dedicated Volume (will be formatted!) - manual backups do not need their own vol Restores ALL VMs from backup…cannot select individual VMs Windows Server Backup (WSB) Walk Through Agenda Introductions DR Benefits of Virtualization Virtualization Backup & Recovery Challenges Backup and Recovery “On the Cheap” Export / Import Windows Server Backup (WSB) Scripted Diskshadow Backup Q&A Backup and Recovery “DiskShadow” backup can work as well Call Diskshadow.exe with a pre-defined script (example: diskshadow -s HyperVBackup.txt) HyperVBackup.txt (unsupported) set context persistent set metadata C:\backup.cab set verbose on begin backup add volume C: alias ConfigVolume #The GUID of the Hyper-V Writer writer verify {66841cd4-6ded-4f4b-8f17-fd23f8ddc3de} create EXPOSE %ConfigVolume% Y: EXEC c:\HypervBackup.bat UNEXPOSE Y: end backup HyperVBackup.bat (unsupported) REM copy centralized VHD files to local Drive Xcopy y:\VHDs\*.* g:\HyperVBackup\VHDs\*.* /e /s /y /F /O /X /R /H REM copy Hyper-v Config files to local Drive xcopy y:\ProgramData\Microsoft\Windows\Hyper-V\*.* g:\HyperVBackup\ProgramData\Microsoft\Windows\HyperV\*.* /e /s /y /F /O /X /R /H VMRestore.bat (unsupported) Echo Stopping Hyper-V Services... sc \\localhost stop VMMS sc \\localhost stop VHDSVC sc \\localhost stop nvspwmi REM copy centralized VHD files FROM local backup Drive Xcopy g:\HyperVBackup\VHDs\*.* C:\VHDs\*.* /e /s /y /F /O /X /R /H REM copy Hyper-v Config files FROM local Drive xcopy g:\HyperVBackup\ProgramData\Microsoft\Windows\HyperV\*.* c:\ProgramData\Microsoft\Windows\Hyper-V\*.* /e /s /y /F /O /X /R /H Echo Starting Hyper-V Services... sc \\localhost start VMMS sc \\localhost start VHDSVC sc \\localhost start nvspwmi Diskshadow Backup and Restore Walk Through DiskShadow Limitations Summary Backup and Recovery of Hyper-V-based VMs is easier than on other virtualization platforms Tools you know Tools you have System Center Data Protection Manager (DPM) 2007 SP1 offers better backup and recovery Lower cost, less bandwidth, smaller storage Individual VM restore Agenda Introductions DR Benefits of Virtualization Virtualization Backup & Recovery Challenges Backup and Recovery “On the Cheap” Export / Import Windows Server Backup (WSB) Scripted Diskshadow Backup Q&A Q&A © 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. Virtualization Resources Microsoft Virtualization Web: http://www.microsoft.com/virtualization Technet: http://technet.microsoft.com/enus/virtualization/default.aspx System Center Virtual Machine Manager Web: http://www.microsoft.com/scvmm Hyper-V http://www.microsoft.com/windowsserver2008/en/us/hyperv.aspx Microsoft Application Virtualization (formerly SoftGrid) Web: http://www.microsoft.com/systemcenter/appv/default.mspx Terminal Services Blog: http://blogs.msdn.com/ts/ Web: www.microsoft.com/terminalserver Virtual PC 2007 Web: http://www.microsoft.com/virtualpc Virtualization Road Map Now Windows Server 2008 Microsoft Server 2008 Hyper-V System Center Virtual Machine Manager 2008 MDOP w/ MAV4.5 Updated w/ Server 2008 guest support Title Text Description of Demo