Top 10 Windows Server 2008 R2 Features #10: Boot from virtual devices

By Scott M. Fulton, III | Published September 8, 2009, 4:50 PM

Banner: Special series

Microsoft Windows Server 2008 R2 main story bannerLast month, Microsoft made available to its TechNet partners the first release-to-manufacturing code for Windows Server 2008 R2, the next edition of the server operating system that premiered in January 2008. While I've said here before that I feel Windows 7 is "Vista service pack 3" (and I meant that in a good way), Microsoft is right up front about the fact that R2 is the Windows 7 kernel applied to WS2K8, the result of that alone being an immediate improvement in the system.

But there are other bonuses as well -- so many, in fact, that it took me much more time than I anticipated to pore through the multiple lists of new features, research the potential impact of each one, confer with others as to their significance, and peek into how they are already impacting businesses' deployment plans. In a number of key aspects, WS2K8 R2 is actually the complete package that WS2K8 should have been, minus the Vista core that led some shops to stick with Windows Server 2003.

As server operating systems evolve, the virtual OS is actually becoming the real OS -- the fact that it is hosted within another OS does not de-legitimize it any more at all. In fact, it enables administrators to strip the host OS down to the bare bones, as with Hyper-V, so that the server's integrity no longer is dependent upon the structure of its installation or even the current working order of its hardware. If a security issue takes down a virtual server, it can be immediately replaced.

But one reason systems analysts and architects designed their servers this way is to enable their entire setups to be representable by a single file: the virtual hard disk (VHD) on which virtual OSes are installed. As long as a master record exists of what the VHD should look like, then just like a backup of a spreadsheet template, if one should go down or get lost, it can be replaced from the master. In some cases, having the VHD boot a virtual OS isn't even the true benefit here, but rather simply having a single file represent the way the entire server OS should work. (Getting it to fit on a USB thumb drive is a plus, though.)

With R2, Microsoft has recognized this fact, and has responded by enabling a revolutionary, if obvious, new feature that turns the operating system concept upside down a second time: the ability to boot the physical OS, the one at the processor level, from a virtual hard drive.

"I mean think about it. You go to look at a hard drive and there's a single file but Windows Server 2008 R2 is installed inside it," writes TechNet blogger Keith Combs. "This would certainly simplify the ability to boot your servers on a completely new environment with little effort. This is going to turn change management on its ear."

This capability actually also exists within Windows 7, and if you're familiar with some command line tools and with how Microsoft changed (read: "improved") the boot table manager for Vista/WS2K8, creating a bootable VHD takes an astonishingly short period of time...once you get the technique right. It took me three tries, but I got it. Part of the problem has to do with the fact that not all the new WS2K8 R2 techniques are not fully documented yet, so the tutorials that Microsoft and its MVPs have presented thus far are not yet thorough. For example, some folks forget to mention that the VHD needs to be "sysprepped" (using SYSPREP.EXE) before you enroll it as a native boot device -- doing this strips the OS image of any and all direct ties to the physical hardware on which it was natively installed.

But the principles are actually stone-cold simple: With R2 and Win7, the boot table manager has been augmented to handle VHD as a device type, and the BCDEDIT utility (the same one you use to edit the boot menu on a dual-boot system) now lets you register a VHD as a boot device. Here are the basic concepts of the steps you'll take:

1. Create a virtual machine using Hyper-V Manager in WS2K8 R2 (or in Windows 7, using either the Windows Virtual PC RC add-on, or the Computer Management MMC panel. You know...from the Start menu, right-click Computer, and select Manage. Surprise, under Storage -> Disk Management is the new option Create VHD). Do not use Virtual Server 2005 or VS 2005 R2 or the old Microsoft Virtual PC; its VHD files will not be bootable. (I know, I've tried.)

2. Set up your master OS VHD by installing all the roles, functions, and applications it requires.

3. From the virtual machine, use SYSPREP.EXE to "generalize" the setup, which involves the tool undoing all the Registry settings that bind the OS to the machine (real or virtual) in which it's installed. That way, once the system boots up again, it relearns what it needs to know about its hard drives, processors, and display (and I know I've already set some cogs in motion with regard to Windows activation -- settle down, folks).

4. Use BCDEDIT.EXE from a command line (with administrator privileges, of course) to edit the Windows Boot Menu, so that the VHD becomes one of the options, similar to booting different OSes from separate partitions.

Now, when the VHD boots for the first time, just like the final stage of OS installation, it will detect the specifics of the physical environment in which it's running -- unlike the case when it's running within a hypervisor host. So the VHD-based OS will take advantage of the real Intel or AMD processor, and the real Nvidia or ATI graphics hardware. If you need the VHD to be portable among different physical devices with varying profiles, just use the sysprepped master.

Microsoft's enabling Windows Server to be physically run from a virtual device represents a complete and long-awaited acknowledgment from the company (among several others, particularly with the R2 release) that a server OS does not have to "be Windows" -- it doesn't need to run Office and Media Player, or use transparent Aero frames. It can be the Windows kernel, plus the things that make it useful as a server, minus the components that are only necessary in a client environment. It's been Microsoft's failure to truly act on its endorsement of this viewpoint up to now that has kept the versatile, adaptable Linux entrenched on many servers. So now that Windows is really acting like a server should, there's no further reason for Linux admins to keep saying they have no competition.


BETACHECK
For more:

Comments

View comments by with a score of at least

quote:
Part of the problem has to do with the fact that not all the new WS2K8 R2 techniques are not fully documented yet, so the tutorials that Microsoft and its MVPs have presented thus far are not yet thorough.

...the problem has to do with the fact that not all the new...techniques are not fully documented yet...

Wait, what? :) Not all are not documented... that means that the problem is that some are documented, right? :)

Score: 1

|

So I know Windows 7 can use VHDs as well, but I guess I am really missing the point.

The VHD is a hard disk. It takes up real space, uses real resources, and has the very same limitations a bare-metal installation has.

Portability? I have replaced our main server here twice in the last 6 years. How portable does it need to be?

Score: 1

|

This is great for testing. You can have a variety of system setups that you can boot into. Always nice to test an application on a pristine installion.

Score: 1

|

One point is that the vhd can be as little as a single file which can be restored to a server or an alternate server to quickly restore it's operation.

In that way if you were running a server core (no gui) you could have a very small physical server footprint running multiple virtual server systems which can be managed centrally (many if you are running a datacenter edition).

It is realistically Microsoft's version of VMWare ESX Server and it's console. A lot of major firms have invested in an HP\VMWare system and so won't be too quick to want to mess with what they already have working especially as the partnership between HP and VMWare has just gotten a lot stronger (probably due to Microsoft's serious push to take a chunk of their business).

From a Windows7 persepctive though being able to use vhds for testing of complete systems is a great advantage but at the end of the day to have all the really nice features serious vm workstation users are probably going to rely on VMWare Workstation or another free alternative for quite some time to come.

Score: 1

|

PDC 2009: What have we learned this week?

There was the freebie that no one will forget, the heebie-jeebies courtesy of Scott Guthrie, and a teensy bit clearer picture of how this cloud thingie should work.

Live report: Will Google Chrome OS change Linux?

The mysteries of just what Chrome OS is, and how much of an operating system it truly is, may be resolved today.

PDC 2009: Microsoft cares about Web browser performance

The effort to give users of the world's dominant Web browser the impression of quality, is a personal one for the man who leads that battle.

Nokia re-affirms its commitment to Symbian, sort of

Maemo won't necessarily be replacing Symbian in the Nokia N-Series, but that's definitely a place where it will be found.

E-book readers will be in short supply this holiday season

E-readers are hot this year, and a lot of compelling new products have been released, but are there enough electrophoretic displays to go around?

Sony looks to finally open a single storefront for downloads

Sony has had many different download portals for movies, music, e-books, and games, and now it's looking to make a single shop for all of it.

Tuning out the tablet: Time to give the endless speculation a rest

Wide Angle Zoom: Wishing and hoping and thinking and praying....won't put an iTablet on the market.

Five improvements for IT managers in 2010

If businesses are to improve their efficiency for next year, they need to stop and reassess the basic tenets of their job.

AOL's spinoff from Time Warner to shed 2,500 jobs

As AOL moves toward become an independent company again, it will cut nearly a third of its workforce.

Gartner: SMS-based money transfer will be bigger than mobile browsing, search

Gartner issues its predictions for the 10 things our phones will be doing in 2012.

Don't forget to upgrade to Firefox 3.6 beta 3 today

Mozilla has released the latest beta its Firefox 3.6 browser software, just over one week after beta 2.