際際滷

際際滷Share a Scribd company logo
Virtualization Tour:Native Boot To VHD
What Will We Cover?Boot-to-VHDWindows XP ModeWindows Server 2008 R2 Hyper-VManaging Hyper-V with System Center Virtual Machine Manager
Agenda Native Boot to VHDWhat is Native Boot?Benefits and Performance Inside look at Boot to VHD PartitionsCommon Scenarios Installing  OS Media or Network BootStep By Step  Native Boot to VHD with No underlying OSStep By Step  Native Boot to VHD with Underlying OSAn Inside Look at BCDEditLimitationsGuidelines, Here is the proof => Next
Introduction to Native Boot to VHDWhat is a Virtual Hard Disk (VHD)Fixed DisksLarger (slower to deploy)Recommended for production systemsDynamic disksGrow as data is addedSmaller (faster to deploy)As used with Virtual PC / Virtual Server / Hyper-VSupported Platforms Windows 7 (Enterprise, Ultimate)Windows Server 2008 R2 (Full and Core)Standard, Enterprise, Datacenter, WebItanium-based systemsTools (See Resources for details)DiskPart,Disk Management (MMC),BCDEdit, BCDBoot, DISM, Hyper-V Manager, Sysprep, ImageX (AIK)
Benefits of Native Boot to VHDPossible to boot a VHD directly on hardwareCan run Windows Virtualization PlatformDeploy either as physical or virtual using same file  Use the same management toolsSupport multiple boot scenarios Fast deployment for re-usable environments Parent of a differencing disk can be a fixed, dynamic, or differencing disk (differencing chain)Negligible performance difference from Native
Native VHD Performance
System and VHD PartitionsSystem PartitionPrimary PartitionBootmgrC:indowsD:BCDC:agefile.sysD:C:hdindows7Dynamic.vhdD:PhyPhysical DiskVirtualVHDC:indowsVHD BootParent volume of the VHD is available after boot with a different volume letterLOOK: Watch your disk space go to maximum VHD Capacity + Physical Used
Common ScenariosImage managementAttach a VHD and access as a drive letterCommon VHD image for both physical and virtual environmentsNative boot hardware with no installed OSOne or multiple local VHDs within a single partitionE.g. for kiosk machines, early adoptersDevelopers, TrainersDemo, Proof of ConceptVirtual AppliancesCentrally stored VHDs for network deploymentCopy locally and then start Network boot to VHD using WDS
Install From Media Or Network Boot Start InstallationFormat Media (if doing bare metal insall)You should be on the Where do you want to install Windows? screen of the installation press Shift-F10 to drop to command promptFind installation drive (dir c:, dir d:, dir e:, etc) DiskpartCreate vdisk file=e:ootDemo.vhd type=expandable maximum=40000Attach vdiskExitClick Refresh buttonSelect New Drive and perform normal installationUsing this method, the BCD will be updated automatically
BCDEdit  Windows Server 2008 R2 Running on MetalIn this example, we have an OS running on Metal and a VHD Boot menu also available
BCDEdit  Host with NO OS Installed NativelyIn this example, we have only one OS and it is running in a VHD on an empty hard driveDEMO
Preparing for Native Boot and BCDEditIf host system is Vista SP1:Replace Bootmgr and BcdEdit.exe  with Windows 7 versionsCreate bootable VHD fileDisk Manager, Hyper-V Manager, ImageX, SCVMM, DiskPart,EtcCopy bootable VHD to a directory on the host system (e.g. c:hdootWin.vhd)Use BcdEdit to copy the existing boot entry  (from administrativecmd prompt)bcdedit /copy {current} /d Windows VHD BootLook at the new entrybcdedit /vUse BcdEdit to Edit the VHD systembcdedit /set {GUID} device vhd=[c:]hdootWin.vhdbcdedit /set {GUID} osdevicevhd=[c:]hdootWin.vhdbcdedit /set {GUID} detecthal onUse BCDEdit to change  the description, default start item, menu order, timeout, etc.bcdedit /set {GUID} description New Menu Description Goes Here!bcdedit /default {GUID}bcdedit /displayorder {GUID_1} {GUID_2}bcdedit /timeout 10If using virtualization on the system  (Make sure you cold boot after making changes)	Enable Virtualization in BIOSbcdedit /set {GUID} hypervisorlaunchtype auto
An Inside Look at BCDEditLets look at BCDEdit in some detail

More Related Content

2 Boot To Vhd

  • 2. What Will We Cover?Boot-to-VHDWindows XP ModeWindows Server 2008 R2 Hyper-VManaging Hyper-V with System Center Virtual Machine Manager
  • 3. Agenda Native Boot to VHDWhat is Native Boot?Benefits and Performance Inside look at Boot to VHD PartitionsCommon Scenarios Installing OS Media or Network BootStep By Step Native Boot to VHD with No underlying OSStep By Step Native Boot to VHD with Underlying OSAn Inside Look at BCDEditLimitationsGuidelines, Here is the proof => Next
  • 4. Introduction to Native Boot to VHDWhat is a Virtual Hard Disk (VHD)Fixed DisksLarger (slower to deploy)Recommended for production systemsDynamic disksGrow as data is addedSmaller (faster to deploy)As used with Virtual PC / Virtual Server / Hyper-VSupported Platforms Windows 7 (Enterprise, Ultimate)Windows Server 2008 R2 (Full and Core)Standard, Enterprise, Datacenter, WebItanium-based systemsTools (See Resources for details)DiskPart,Disk Management (MMC),BCDEdit, BCDBoot, DISM, Hyper-V Manager, Sysprep, ImageX (AIK)
  • 5. Benefits of Native Boot to VHDPossible to boot a VHD directly on hardwareCan run Windows Virtualization PlatformDeploy either as physical or virtual using same file Use the same management toolsSupport multiple boot scenarios Fast deployment for re-usable environments Parent of a differencing disk can be a fixed, dynamic, or differencing disk (differencing chain)Negligible performance difference from Native
  • 7. System and VHD PartitionsSystem PartitionPrimary PartitionBootmgrC:indowsD:BCDC:agefile.sysD:C:hdindows7Dynamic.vhdD:PhyPhysical DiskVirtualVHDC:indowsVHD BootParent volume of the VHD is available after boot with a different volume letterLOOK: Watch your disk space go to maximum VHD Capacity + Physical Used
  • 8. Common ScenariosImage managementAttach a VHD and access as a drive letterCommon VHD image for both physical and virtual environmentsNative boot hardware with no installed OSOne or multiple local VHDs within a single partitionE.g. for kiosk machines, early adoptersDevelopers, TrainersDemo, Proof of ConceptVirtual AppliancesCentrally stored VHDs for network deploymentCopy locally and then start Network boot to VHD using WDS
  • 9. Install From Media Or Network Boot Start InstallationFormat Media (if doing bare metal insall)You should be on the Where do you want to install Windows? screen of the installation press Shift-F10 to drop to command promptFind installation drive (dir c:, dir d:, dir e:, etc) DiskpartCreate vdisk file=e:ootDemo.vhd type=expandable maximum=40000Attach vdiskExitClick Refresh buttonSelect New Drive and perform normal installationUsing this method, the BCD will be updated automatically
  • 10. BCDEdit Windows Server 2008 R2 Running on MetalIn this example, we have an OS running on Metal and a VHD Boot menu also available
  • 11. BCDEdit Host with NO OS Installed NativelyIn this example, we have only one OS and it is running in a VHD on an empty hard driveDEMO
  • 12. Preparing for Native Boot and BCDEditIf host system is Vista SP1:Replace Bootmgr and BcdEdit.exe with Windows 7 versionsCreate bootable VHD fileDisk Manager, Hyper-V Manager, ImageX, SCVMM, DiskPart,EtcCopy bootable VHD to a directory on the host system (e.g. c:hdootWin.vhd)Use BcdEdit to copy the existing boot entry (from administrativecmd prompt)bcdedit /copy {current} /d Windows VHD BootLook at the new entrybcdedit /vUse BcdEdit to Edit the VHD systembcdedit /set {GUID} device vhd=[c:]hdootWin.vhdbcdedit /set {GUID} osdevicevhd=[c:]hdootWin.vhdbcdedit /set {GUID} detecthal onUse BCDEdit to change the description, default start item, menu order, timeout, etc.bcdedit /set {GUID} description New Menu Description Goes Here!bcdedit /default {GUID}bcdedit /displayorder {GUID_1} {GUID_2}bcdedit /timeout 10If using virtualization on the system (Make sure you cold boot after making changes) Enable Virtualization in BIOSbcdedit /set {GUID} hypervisorlaunchtype auto
  • 13. An Inside Look at BCDEditLets look at BCDEdit in some detail
  • 14. LimitationsNative Boot is only for Windows 7 and 2008 R2Native Boot does not support HibernationSleep mode is supportedNative Boot does not support BitLockerNo Over Allocation of Disk SpaceNo Nested boot to VHDMaximum size of dynamic VHD = 2TB (2048 GB)Parent of Differencing disk must be on same volume
  • 15. VHD Boot GuidelinesNative VHD boot requires Windows 7 Boot Manager (Bootmgr) and BCDEdit utilityUse BCDboot.exe from attached VHDPagefile and boot manager are outside Virtual Hard Disk (VHD)Dynamic VHD expanded during bootPlan physical disk free space accordinglyStore user data outside of the OS VHD
  • 16. Creating Differencing DisksCreate the VHDs diskpart create vdisk file="D:IN7_Diff0.vhd" parent="D:IN7.vhd exit This takes care of creating the VHDs and setting up the parent child relationship. To be able to boot to the differencing disk, the BCD store will need to be updated to reflect our intended changes. Update the BCD store. BCDEdit.exe /set {GUID} device VHD=[D:]in7_Diff0.vhd BCDEdit.exe /set {GUID} osdevice VHD=[D:]in7_Diff0.vhd
  • 17. Thin Provisioning Be Very Carefulregistry entry will prevent the disk from expanding to its full size. Open the registry editor, browse to the location thats displayed below and alter the value to 4. [HKEY_LOCAL_MACHINEYSTEMurrentControlSetervicessDependsarameters] "VirtualDiskExpandOnMount"=dword:00000004
  • 18. ResourcesHow to Perform Common Taskshttp://technet.microsoft.com/en-us/library/dd979534(WS.10).aspxWhat's New for IT Pros in Windows 7 http://technet.microsoft.com/en-us/library/dd349334(WS.10).aspxWhat's New in Virtual Hard Diskshttp://technet.microsoft.com/en-us/library/dd440864(WS.10).aspxWhat's New in Deployment Tools http://technet.microsoft.com/en-us/library/dd744386(WS.10).aspxWindows(R) Image to Virtual Hard Disk (WIM2VHD) Converter http://code.msdn.microsoft.com/wim2vhd
  • 19. Tools ResourcesAppendix: Tools, Scripts, and APIs. The following tools are included in Windows7 and Windows Server2008R2:DiskPartA command-line tool that you can use to create, attach, and detach VHDs. You can also perform more advanced tasks like compacting, expanding, and merging VHDs. For more information, see DiskPart on Microsoft TechNet (http://go.microsoft.com/fwlink/?LinkId=128458). Disk ManagementA Microsoft Management Console (MMC) snap-in that you can use to create, attach, and detach VHDs.BCDEditA command-line tool that you use to manage boot configuration data (BCD) stores. For more information, see BCDEdit on Microsoft TechNet (http://go.microsoft.com/fwlink/?LinkId=128459). BCDBootA command-line tool that you can use to manage and create new BCD stores and BCD boot entries. BCDBoot can be used to create a new boot entry when configuring a system to boot from a new VHD. For more information, see BCDBoot Command-Line Options on Microsoft TechNet (http://go.microsoft.com/fwlink/?LinkID=155166). Deployment Image Servicing and Management (DISM)A command-line tool that you use to apply updates, drivers, and language packs to a Windows image. For more information, see Deployment Image Servicing and Management Technical Reference on Microsoft TechNet (http://go.microsoft.com/fwlink/?LinkId=155029).Windows Hyper-V ManagerAn MMC snap-in that supports VHD image creation. You can specify the type and size of VHD and install Windows from a CD or DVD, or from an ISO Image file. The Hyper-V Manager is only available on computers that are running Windows Server2008 or Windows Server2008R2 with the Hyper-V role installed. SysprepA tool that enables you to remove user and computer-specific data from the operating system image. This enables you to capture the image and deploy it to other computers. For more information, see Sysprep Technical Reference on Microsoft TechNet (http://go.microsoft.com/fwlink/?LinkId=155027). The following tool are included in the Windows Automated Installation Kit (Windows AIK): ImageXA command line tool that enables you to capture, create, modify, and apply Windows images. For more information, see ImageX Technical Reference on Microsoft TechNet (http://go.microsoft.com/fwlink/?LinkId=155340).