Mark Minasi's Windows Networking Tech Page
Issue #64 August 2007

Document copyright 2007 Mark Minasi; please see below for info on subscribing, unsubscribing or copying portions of this text.

What's Inside

  • News
    • New one-day "Windows Server 2008 Preview:  Good News, Bad News" seminar comes to DC 26 September
    • Our two-day seminar Supporting Vista comes to DC 24-25 September
  • Tech Section
    • More About CompletePC Backup (It Gets Weirder)
  • Conferences
  • Bring a Seminar to Your Site
  • To Subscribe, Unsubscribe, Read Old Newsletters or Change Your Email Address

News

Hi all —

I got a lot of mail from you folks about my CompletePC coverage (and, as always, thanks for the feedback).  Some of it pointed out that I hadn't told the whole story, and some of it got me thinking about a few more nooks and crannies that I'd not thought to explore.  What I turned up seemed pretty interesting and, as far as I can see, some of it's not available anywhere else, so this month I'm back with more CompletePC stuff.    As far as I can see, it's a pretty neat tool once you know how it works and once you know its limitations.

Many of you have also asked about my plans for a Server 2008 book.  Actually I am working on it or, rather, them -- I've decided to redesign the book so that it fits into three books:  Elements (basics like TCP/IP and "why we network"), Essentials (building a basic AD, Web server etc.) and Enterprise (topics like WSUS, SharePoint and the like).  I promise I'll have more details soon, and my thanks to the large number of you who have been kind enough to ask.

If you want the scoop on Server 2008, however, the fastest way to get it is to attend my 2008 preview seminar in the Washington Dulles area in late September.  Or join us for my Vista Support class.  And speaking of that...

New One-Day Seminar Windows Server 2008 Preview:  Good News, Bad News Comes to DC September 26

As I mentioned above, I'm deep in the midst of research on Server 2008 and I just can't wait until February to talk about it, so I'm doing a one-day class about 2008 in the DC area (near Dulles) this 26 September.  We've all got to start planning for 2008, so why wade through a mountain of white papers or spend weeks testing when you can get the whole story in just one day, and maybe even get a chuckle or two in the process?  You can find out more about it at http://www.minasi.com/2k8prev/2k8prev.htm.  This is the only public 2008 session I've currently got scheduled in this country, so come on down!

Our Supporting Vista Seminar Returns to the DC area September 24-25

The two-day Supporting Vista class was very popular in the winter and early spring and many of you have been emailing me asking when we'll do another.  I truly appreciate your kind requests for another session and I apologize for only having time to do one, so I'm very happy to announce that I'll be coming to the DC area (near Dulles) on September 24/25 with another session of "Vista Support for Support Professionals."  You can read more about it at www.minasi.com/vista/vsupport.htm.  I hope to see you there!

Tech Section:  More About CompletePC Backup (It Gets Weirder)

Last month's piece about Vista's CompletePC Backup tool got a fair amount of mail, as I seem to have left out some of the story (sorry), and because an awful lot of people are having trouble with CompletePC Backup.  In one example of the first case, reader Leslie Mason basically said

Hey, Minasi, how the heck do I access the network from the "Command Prompt" that you can open when booting from the Vista install DVD and choosing "Repair your computer?"  I used Windows PE and it worked fine for networking, but what about from the "Repair your computer" command prompt?

(He was actually much nicer than that, but that was the gist.)  The short answer is, just type startnet from the command line when you're in the Command Prompt from Repair your computer.  That'll fire up your network stack.   

A few other readers said something on another topic:

Mark, if the problem was that you wanted to take the data from a 200 GB drive which only held about 10 GB of data and you wanted to use CompletePC to restore it to a 160 GB drive and CompletePC has this bug about not restoring a backup from a 200 GB drive to a 160 GB drive even if the drive only held 10 GB of information, then why didn't you just use the new Vista feature that lets you shrink a partition, like you used to need Partition Magic to do?

Yes, I knew that I could do that, but you see I was trying out what was supposed to be a real-life disaster recovery tool.  Suppose I'd been dutifully backing up my laptop with the 200 GB drive using CompletePC and had only used, say, 80 GB of space, and then my laptop died.  Clearly at this point it's too late to shrink the partition.  So now suppose the only system handy to restore it was only equipped with a 160 GB drive.  I'd be out of luck, and that seems like a big weakness of CompletePC Backup given that 80's smaller than 160.  Besides, the idea that I would take a perfectly good 200 GB drive and partition it just to make my lame disaster recovery tool happy troubles me.  I guess CompletePC Backup isn't in danger of putting Ghost and Acronis out of business.  It is, however, still quite handy, so long as you know a few more tricks that I'll pass along this month.

Several other people told me in no uncertain terms that CompletePC Backup was of no use for anything except restoring to very nearly identical hardware.  One reader said that

I think you may need to amend your statement that CompletePC is hardware agnostic [inasmuch as Microsoft people recently said] "the backup can be restored only on compatible CPU and same type of firmware (BIOS vs. EFI). Also the IDE controller has to be handled by the same driver. We are working on a future release to support restoring on a different IDE controller."

The most troubling thing about this is that even Microsoft people are propagating the rumor that you would be unable to restore a backup to a system with a different sort of hard disk.  Heck, I believed it also, until I spent two days testing the proposition.  I started from a working Vista system equipped with a C: volume running on a SCSI hard disk and made a CompletePC backup of it.  I then successfully restored the backup onto a system with an IDE (or PATA, if you like) hard disk.  I'm sure that there are some limitations on drive crossovers and no one expects to be able to transplant a 64-bit operating system onto 32-bit hardware, but as far as I can see CompletePC isn't as bad as many people have claimed it to be.  As usual, you've just got to know a few tricks, so you don't find yourself in the situation of yet another correspondent:

Read your great article. Got stuck.  I have a new pc with a sata drive. When I try to do restore it says  “no valid backup locations found.” I have tried backing up to usb and SATA and nothing works. HELP. 

With hope, this article will provide that help!

Backing Up and Restoring Over the Network

I don't know what I was thinking last month when I showed you how to create CompletePC backups over the network.  You see, the backup procedures that I showed work fine -- I just forgot to tell you how to restore from a network backup!  So here's the scoop.

First, as Leslie noted before, you'll typically initiate a CompletePC restore by booting the machine-to-be-restored-to with the Vista Install DVD, choosing "Repair your computer," and then either use the "Complete PC Restore" GUI option or the "Command Prompt" option, which then allows you to use the wbadmin tool.  If we're going to restore from a network location, then you may recall that we don't have a choice, as the GUI's sort of dumb -- it's the command line or nothing.  But "Repair your computer's" Command Prompt doesn't for some reason enable networking by default, so you have to get things rolling by typing

startnet

This may take a minute or two, as it's got to load drivers, protocol stacks and find a DHCP server, but when it's done, just do an ipconfig to ensure that networking is indeed running.  Once connected to the network, let's say that you've stored your CompletePC backup in a share called \\server1\cpcback.  Here's where I really goofed:  what command do you use to tell CompletePC to restore that backup from \\server1\cpcback?  With wbadmin, as in this (initially confounding-looking) command:

wbadmin start sysrecovery -backuptarget:\\server1\cpcback -version:08/16/2007-23:47 -recreatedisks -quiet

Now, if you consult the online help for wbadmin, you will see two things.  First, the online help that you get by typing wbadmin, wbadmin /?, wbadmin /help and similar permutations shows that wbadmin takes only five parameters -- "start backup," "get versions," "get items," "stop job," and "get status."  Once you've figured out that there are bunches more options for wbadmin, including something called "start sysrecovery" -- yes, that's right, simply typing "wbadmin" offers no hint that there is a "wbadmin start sysrecovery" command, but if you do know enough to type "wbadmin start sysrecovery," then wbadmin coughs up some help on the matter -- then you'll see that wbadmin's help says in no uncertain terms that the "start sysrecovery" option only works on Server 2008.  Fortunately, by now I was skeptical of wbadmin's help and decided to try it anyway.  "Wbadmin start sysrecovery" does indeed work on my copy of Vista, which I guess means in no uncertain terms that they're still having a bit of trouble getting things documented accurately in Redmond.  "Start sysrecovery" is the command that restores a CompletePC backup.  The parameters mean:

  • "start sysrecovery" starts a complete system recovery.  Whatever's on the C: drive part of the backup is what the physical C: drive of this system will look like soon.
  • "-backuptarget:\\server1\cpcback" should look a little familiar from the earlier newsletter.  When we were using wbadmin to create a backup, we told it to put the backup on drive X: or whatever by adding the parameter "-backuptarget:X:."  In the wbadmin start sysrecovery command, -backuptarget says where to find the backup, and notice that you need to use an UNC path rather than a mapped drive letter.  If I'd mapped \\server1\cpcback to z: and tried to use -backuptarget:z:, the command would have failed with a laconic "The backup destination is a shared folder mapped to a drive letter."  (Don't you see error messages like that and wonder if the application is trying to tell you something, or just making conversation?)
  • "-version:version:08/16/2007-23:47" exists because you may recall that CompletePC Backup exploits the "snapshot" capabilities of the VHD format that CompletePC Backups are stored in.  One file can hold many days' backups -- "versions," in its lingo -- and you can restore any particular backup ("version") that you choose.  The name of this particular version is "08/16/2007-23:47," which means that I made it on the 16th of August 2007 at 11:47 PM Universal time.  Wbadmin needs to see a version in this exact MM/DD/YYY-HHMM format, so educated guesses won't help -- you need the actual times and dates of each version.  You can get that by querying the backuptarget with the wbadmin get versions command, which looks like
wbadmin get versions -backuptarget:\\server1\cpcback

Sample output of that command looks like this on my system:

C:\Windows\system32>wbadmin get versions -backuptarget:\\server1\cpcback
wbadmin 1.0 - Backup command-line tool
(C) Copyright 2004 Microsoft Corp.

Backup time: 8/16/2007 7:47 PM
Backup target: Network Share labeled \\server1\cpcback
Version identifier: 08/16/2007-23:47

The "Version identifier" line is the one you're looking for.  This backup has only one version, but, again, you may see more than one.

  • The "-recreatedisks" option acknowledges that you realize that this command will wipe clean any target disks, and so anything currently on drive C: on the machine-to-be-restored-to will be lost.
  • Finally, "-quiet" says what it suggests, telling CompletePC Backup that we don't actually need a minute-by-minute track of what percentage of the job's done so far.

Once executed, this command runs without any chatter because of the -quiet switch.  If, however, you want to peek at it to see how it's doing, you can always open another elevated command prompt and type

wbadmin get status

And there's one more option that you might need to know:  how to handle a backup on a network share that has been used to back up multiple systems.  You could, for example, create a network share that several people can use to back up their separate  Vista boxes.  No matter how many machines you back up, they all end up in a folder called WindowsImageBackup -- CompletePC can store as many system backups as you'd like in a single share.  When you attempt to restore from such a share, however, you've got to add a -machine option to tell CompletePC which machine image to restore.  Thus, if my previous example had been taken from a backup location that contained backups for a number of PCs and I wanted to restore a system named "VM3," I would have had to add the option -machine:vm3, as in

wbadmin start sysrecovery -backuptarget:\\server1\cpcback -version:08/16/2007-23:47 -recreatedisks -quiet -machine:vm3

Retrieving Particular Files or Folders From CompletePC Backup

Need to restore just one file in Vista?  Well, then of course Vista's nifty "Previous Versions" feature is the easiest way.  (Right-click a folder, click on Properties and then Previous Versions.  You'll then see several backups, which you can then copy and paste to restore.)  But what if you want a really old backup, or want to get a file from a CompletePC backup for a system that isn't working at all?  In that case, it's worth learning how to pick apart a CompletePC Backup and bend it to your will.  Extracting just a file or two from a CompletePC backup isn't an immediately-obvious task -- so here's how.

Recall that CompletePC stores backups as VHD files, the same sort of files that Microsoft's Virtual Server uses.  Virtual Server includes a thing called a "vhdmount," which lets you tell Vista to open up -- "mount" -- a VHD file as a drive letter, like mapping a network share to a drive letter.  Once vhdmount has done that, you can copy files to or from this new drive letter via Explorer, the "copy" command or whatever you like.  That's how we'll extract file or two from a VHD backup.  But before we can do that, we've got to get past another hurdle --CompletePC stores its VHD backup in a folder (WindowsImageBackup, recall) whose NTFS permissions deny access to everyone but the System account.  To access the VHD file, then, we will

  • Take ownership of the WindowsImageBackup folder,
  • Give ourselves full control of the folder,
  • Install Microsoft Virtual Server 2005 R2 SP1, telling the Virtual Server installation program to forgo installing everything except the VHD mounter program,
  • Mount the VHD as a drive letter, and then just do the file copies from that drive letter.

Here are the steps to accomplish that.

Take Ownership and Permissions to the File

  1. Log on at or Remote Desktop to the system that holds the WindowsImageBackup folder, as these commands don't work remotely.  (If you've got winrm set up, then you could probably use winrs, although I've not tried it.)
  2. Open up an elevated command prompt, as all of the tools that we'll need are command-line tools.
  3. Change the command prompt's drive to whatever drive and folder holds the WindowsImageBackup folder.
  4. Take ownership of the folder by typing takeown /f WindowsImageBackup /r /d y
  5. Give yourself full control of the folder by typing icacls WindowsImageBackup /grant yourusername:F /t

Now you can peruse the folder to your heart's content.  You'll find that the folder contains a folder named after the computer that you took the backup from, and inside that folder you'll see yet another folder with a date in its name.  For example, when I backed up a system named vm3, its VHD ended up in a folder named "WindowsImageBackup\VM3\Backup 2007-08-16 234734."

Install VHDMount

Next, we'll install VHDMount.

  1. Go to www.microsoft.com/downloads and download the installer Microsoft Virtual Server 2005 R2 SP1.  There's a 32-bit and a 64-bit version -- be sure to get the right one for your version of the operating system.
  2. Start that installer program.
  3. Click on "Install Microsoft Virtual Server 2005 R2 SP1"
  4. Agree to the EULA, click Next, fill in your name and click Next.
  5. Choose "Custom," not "Complete," and click Next.
  6. In the "Custom Setup" page, choose "This feature will not be available" for everything except ""VHD Mount."
  7. Click Next and then Install and click "Done." when it's finished installing.  It'll want you to reboot, but I've not found that necessary.
  8. Once the installation's done, look in Program Files \ Microsoft Virtual Server \ Vhdmount.  Copy the files vhdmount.exe and vhdmount.dll to your Windows folder so that it's on the path.  (Or put it anywhere on the path that you'd like, for that matter.)

My thanks to Stuart Renes for telling me that I could download VS 2005 R2 SP1 and install just VHDMount without needing to install all of Virtual Server.  I'd been meaning to try VHDMount out but feared that VS would interact badly with VMWare.

Mount the VHD as a Drive

To tell Virtual Server to mount the VHD, use vhdmount with the /m option, followed by the name of the VHD file.  You'll find that it's got a long, ugly name, so the command will look something like

vhdmount /m "G:\WindowsImageBackup\VM3\Backup 2007-08-16 234734\6619bbd1-45b2-11dc-8412-806e6f6e6963.vhd" 

But that doesn't have to be a pain to type, so long as you let Vista's auto-complete function (the Tab key) do the work for you.  The easy way to type this was to

  • Type "vhdmount /m g:\"
  • Press the Tab key.  That showed me "$RECYCLE.BIN," which is a file in the root of the G: drive but not the one that I'm looking for, and so I just pressed Tab again.  That showed me another folder that I didn't want, and so I just pressed Tab until "WindowsImageBackup" appeared.
  • At the end of "g:\WindowsImageBackup," I typed "\"
  • Then I pressed Tab again and "VM3" popped up.  Again, I typed "\" after VM3.
  • Pressing Tab again, I got the "Backup 2007-08-16 234734" folder appended to my command.  Again, I typed "\."
  • Pressing Tab a few more times added "6619bbd1-45b2-11dc-8412-806e6f6e6963.vhd," and my command was ready.

Once you do that, you'll see the system think about it for a moment, announce that it's installing a device driver, and you'll have your drive mounted as a drive letter.  To unmount, just use the /u ("unmount") option followed by the VHD file's name, followed by "/d," which means "discard any changes to this VHD.  (You can alternatively end the command with "/c," which means to commit the changes.  So, for example, I un-mounted my VHD by typing

vhdmount /u "G:\WindowsImageBackup\VM3\Backup 2007-08-16 234734\6619bbd1-45b2-11dc-8412-806e6f6e6963.vhd" /d

Dealing With Different Drive Types

Finally, let me discuss the question of multiple drive architectures.  The scuttlebutt on the Internet claims that you cannot take a CompletePC backup from, say, a system with an IDE drive and restore it to a computer with a SATA drive.  You've already read the comment that supports that, one that originated with someone at Microsoft associated with the CompletePC software.  That's at odds with another comment about CompletePC which is also attributed to a member of the CompletePC team.  My friend Al Degutis relates at http://professionalinsight.net/VistaBackup.aspx that the CompletePC folks told him that CompletePC could restore to any kind of drive that Vista has a driver for.

So who's right?  The "anything we've got a driver for" folks, in my experience.

I created a virtual machine in VMWare with a C: drive built atop a SCSI hard disk and installed Vista on it.  I then took a CompletePC backup of that virtual machine to a virtual IDE drive of a type that VMWare calls a "persistent disk."  I did that because you can move a persistent disk from one VM to another.  That allowed me to built a new VM with three drives:

  • A brand-new virtual IDE hard disk to serve as the system's main hard disk,
  • The persistent virtual IDE disk containing the CompletePC backup, and
  • A virtual CD-ROM drive.

My plan was, then, to take the CompletePC backup on the persistent drive which was, recall, made from a SCSI drive initially, and then use it to get an IDE drive running.  Booting the virtual CD-ROM drive from the Vista Install DVD, I went to "Repair your computer" and then "CompletePC Restore," asking CompletePC Restore to restore the backup on the persistent drive onto the new drive.  It failed with this error, which will be familiar to many people who've struggled with CompletePC backup's quirks:

Windows Complete PC Restore operation failed.
Error details: There are too few disks on this computer or one or more 
of the disks is too small. Add or change disks so they match the disks 
in the backup and try the restore again. (0x80042401)

Now, that seemed odd; I'd originally created the Vista system on a 16 GB SCSI drive, and this new machine had a 16 GB IDE drive.  Perhaps, I thought, it's some sort of oddity about the way that SCSI and IDE systems store data, so I tried again with a 30 GB IDE drive.  Same error.  Aha, I thought, those readers are right -- you can't mix drive architectures in CompletePC.  I messed around with diskpart so much in the process of trying to make this work that I've unfortunately memorized diskpart's syntax.  (That's bad because my brain is sufficiently small that every new computer fact I learn seems to cause me to forget a word in Spanish.)

But then I found the problem.  The trick in making CompletePC work in all cases is to restore the file to whichever drive would be the bootable one, from the BIOS's point of view.  So, for example, suppose I've got two hard disks on my system.  Disk 1 is the master on the primary IDE channel, and Disk 2 is the slave on the primary IDE channel.  No amount of diskpart-ing is going to make the system boot from Disk 2 unless that system's got a very friendly BIOS.  In my case, VMWare had arranged things so that the CompletePC backup was on Disk 1.  I booted from the Vista installation DVD, went to "Repair your computer," tried to restore the CompletePC backup... and it failed.  Why?  Well, notice that CompletePC doesn't let you specify where to restore a CompletePC backup to -- it chooses.  As it wants a bootable system, that means that it wants to restore to Disk 1, in this case.  But Disk 1 already has data on it -- the CompletePC backup -- and the file's locked open, so CompletePC can't wipe Disk 1 clean.  Result:  CompletePC concludes that there's insufficient disk space.  So, when messing around with CompletePC restores on a system with multiple drives, take a close look at where you've attached the drive that you want the restore to go to.  And while systems vary in the order of "bootability" of their drives, VMWare VMs seem to want to boot in this order:

  • Master drive on the primary IDE channel
  • Master drive on the secondary IDE channel
  • SCSI drives
  • Slave drive on the primary IDE channel
  • Slave drive on the secondary IDE channel

I hope these tips are of some value to some of you folks.  CompletePC's pretty useful for an in-the-box tool, but, as you've seen, it does have its quirks.

Conferences

I'm speaking at lots of conferences this fall, in both the US (well, Las Vegas) and Europe.  If you can't make to my September seminars, please join me at...

Iceland in September:  Server 2008 Preview

This September 17-18, I'll return to Reykjavik, one of my favorite places, to do a two-day version of my "Server 2008 Preview:  Good News, Bad News seminar."  I'll be assisted by Rhonda Layfield, who will cover the new Server 2008-based deployment technologies.   Find out more at www.ejs.is.  And hey, with airfares from Heathrow to Keflavik at ridiculously low prices, what better excuse to see the beauty of Iceland in autumn?

TechTarget Vista Road Shows in Atlanta, Boston, Dallas

TechTarget has been kind enough to ask me back for three more of the one-day Vista road shows that were SRO last spring.  This October we're in Waltham, MA (3 October), Atlanta (23 October), and Dallas (25 October).  It's free so how can you go wrong (unless you don't sign up before all of the seats are gone)?  More info at http://events.techtarget.com/vista/.

TechMentor In Vegas the Week of 15 October

Techmentor returns to the Rio for their Fall show and I'm doing my general session on Server 2008 as well as my Vista Security Crash Course and more.  Info at http://events.techtarget.com/vista/.  I've not been a big fan of Vegas over the years -- I like my lungs clean and smoke-free -- but they've got a great new no-smoking-in-restaurants law so who knows, Vegas might become a real treat.

Windows Connections in Vegas the Week of 5 November

Once again, Penton -- the folks who put out the magazine that I write for -- has assembled their "mega-show" that co-locates their techie shows on Windows, Exchange, SharePoint, SQL, and all kinds of developer stuff, all in the same week.  Like TechMentor, they're returning to their last year's hotel, the Mandalay Bay, and with hope the hotel will have fixed their pool by then.  Meanwhile, I'll be keynoting and presenting technical sessions, as will many of my techie buddies.  Information at www.winconnections.com.

TechEd Europe

If you're going to TechEd Europe in Barcelona this November, please plan to stop by either for my Server 2008 overview talk or my "Server 2008 Name Resolution Changes" talk.  More info at... ah, heck, you know where to find Microsoft stuff.<g>

Bring Mark to your site to teach

I'm keeping busy doing Vista seminars and writing, but I've still got time to visit your firm.  In just two days, I'll make your current NT techies into Vista, security, XP, Active Directory or 2003 experts.  (And better yet they won't have to sit through any Redmondian propaganda.)  To join the large educational, pharmaceutical, agricultural, aerospace, utility, banking, government, telecommunication, law enforcement, publishing, transportation, military and other organizations that I've assisted, either take a peek at the course outlines at www.minasi.com/presentations.htm, mail our assistant Jean Snead at Assistant@Minasi.com, or call her at (757) 426-1431 (only between noon-5 Eastern time, weekdays, please).

Until Next Month...

Have a quiet and safe month. 

Please share this newsletter; I hope that it is a useful source of Windows technical information.  Please forward it to any associates who might find it helpful, and accept my thanks.  We are now at over 45,000 subscribers and I hope to use this to get information to every one of my readers. Many, many thanks to the readers who have mailed me to offer suggestions, errata, and those kind reviews.  As always, I'm at http://www.minasi.com/gethelp and please join us at the Forum with technical questions at www.minasi.com/forum.  Thanks for letting me visit with you, and take care. 

To Subscribe/Unsubscribe, Read Old Newsletters or Change Your Email Address

To subscribe, visit http://www.minasi.com/nwsreg.htm. To change e-mail or other info, link to http://www.minasi.com/edit-newsletter-record.htm.  To unsubscribe, link to http://www.minasi.com/unsubs.htm. Visit the Archives at http://www.minasi.com/archive.htm. Please do not reply to this mail; for comments, please link to http://www.minasi.com/gethelp.

All contents copyright 2007 Mark Minasi. You are encouraged to quote this material, SO LONG as you include this entire document; thanks.