TechEd Europe 2009 Day 2: What’s New In Windows Storage

Speaker: Mark Minasi.

The session I was originally going to wasn’t what I was expecting so I decided to go to Mark’s VHD session instead.  As usual, these are just highlights from the session and you should attend it if you get the opportunity.

This session is all about VHD.  Mark warns us it’s nearly all command prompt.  It also applies to Windows Server 2008 R2.  As announced at TechEd Barcelona 2008 by Mark Russinovich, VHD is now the MS data centre image standard.

Survey: half of the audience have used WAIK and WinPE.

BCD/BCDEDit replace boot.ini since Vista.  That first 100MB volume in Windows 7 has no drive letter and is where the BCD is stored.  You only see in in Diskpart and Disk Management.  We also can use this for BitLocker instead of the nasty Vista (non) solution of a 1.5GB partition.  This also allows us to boot from VHD files.

Normally, on a clean build that 100MB partition is at the start of your drive.  However there are upgrade scenarios where it can appear elsewhere on the drive (end or middle).  It doesn’t matter and don’t bother to move it.

Example of CompletePC backup from command prompt:

wbdadmin start backup -backuptarget:m: –allcritical –incvlude:e:

The –allcritical flag includes the 100MB partition.  Do this.

CompletePC backup uses VHD as it’s destination instead of tape.  That first backup takes and age but all the folling ones are synthetic, i.e. differential with the effect of full.

Note: You can use Disk2vhd to convert a hard disk to VHD.  Not supported in production.

Notes:

  • Server 2008 R2 uses VSS now so Server Backup is 5 times faster than Server 2008.
  • DFS and FRS are gone from Windows Server 2008 R2.  Watch out for AF upgrades from 2003 R2 or earlier.
  • You can do S/W RAID on Windows 7.  Don’t do it.

We can mount VHD’s and we can boot from them:

  • Those product samples from MS supplied as VHD can be booted up on your lab machine, not only as a VM.
  • You can multi purpose a physical machine, e.g. a server with multiple VHD’s can boot up as a web server 29 days a month and as a finance/tax machine on the last day of the month.  This is not dual booting.
  • You can dual boot a demo laptop with Windows 7 for office work and Server 2008 R2 with Hyper-V for demo work.

VHD is 96% efficient, i.e. runs at 96% or thereabouts the speed of the underlying physical disk.

So you can have drives on your machine:

  • 100MB BCD partition
  • The rest of the disk: on here you place your VHD’s.

With BCDedit you configure BCD to boot from the VHD.  The VHD is mounted, boots up and becomes C:.

We will be using DISKPART – create vdisk to create the VHD.  These slides will fly past so I won’t blog them.

Here’s a note: MS got their terminology mixed up again.  The 3 types of VHD in DISKPART are:

  • Fixed: all the VHD space assigned at once
  • Expandable: This is known as dynamic to the rest of the world, including Hyper-V.  It only supplies disk space to the VHD as required.
  • Differencing: It reads from a source but writes differences to the new differencing VHD

You can also do this in Disk Management GUI.  Note you cannot create a differencing disk in the GUI – differencing should only be used in labs.

You can use attach vdisk in Diskpart to mount/surface/attached the VHD.

Now you can initialise the disk and create a volume in it in Disk Management, etc.  It’s a new volume.  Disk Management is aware it’s a VHD.  Explorer will now present the new drive mounted (aka attached or surfaced).

Now you need to use BCDedit to configure a boot option for the VHD.

Now Mark does  a demo of a unsupported (he warns us) scenario on VMware Workstation (Virtual PC doesn’t cut it for demos).  He’s going to show how to do a empty C: drive that only contains VHD’s.  He runs Windows 7 setup.  Then SHIFT+F10.  He uses diskpart to create the 100MB partition and the rest of the disk as H:.  The 100MB is primary partition and active.  The rest of the disk is primary and marked as H:.  He exits diskpart and shows the empty H.  He creates a VHD folder in H: and goes back into diskpart to create his VHD (as above), selects it and attaches it.  He exits and returns to the Windows 7 setup.  The disk configuration now presents the H: and the VHD.  The VHD is not a possibility for installation  – but he can do it anyway!  It is not supported but it’s a great way to set up a lab machine.  You will lose hibernate with this setup.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.