Tuesday, October 2, 2012

Convert Windows Server 2008 R2 from Physical to Virtual

I rebuild my computer recently.  By that, I mean I bought a new motherboard, cpu, memory, hard drive, and case.  I reused the power supply and dvd burner, keyboard, and mouse.  I even got a new monitor.  So it wasn't so much a rebuild as a replacement.

Anyway, I had Windows Server 2008 R2 on the old machine.  I backed up all of the data, but I thought it would be nice if I could virtualize the old machine.  That way I could go back and get data, run old programs, check settings, etc.

I mounted the old hard drive in the new computer so that I could do a physical-to-virtual image.  The old drive was 600GB with a 100GB boot partition and a 500GB data partition.  There are several physical-to-virtual tools available.  Some run on an already running system, and some run on a disk.  I wanted one that ran on a disk.

I use VirtualBox instead of VMware, so I didn't want to use the VMware tools.  I decided to use Disk2vhd from the excellent Systernals Suite.  It creates a .vhd file, which is a microsoft format.  VirtualBox can read those natively.

I had the drive that I wanted to image already mounted as e:\ and f:\.  I chose just the e:\ drive to image and let the software run.  When it was done, I had a new .vhd file.

I created a new windows 2008 machine in VirtualBox and attached the virtual drive.  I started it up, and of course got a blue screen.  The OS couldn't find the boot drive.  This is caused because the disk controllers/IDs/or something else is different.  The solution is to make changes to the registry.

To change the registry of the virtual disk, first take the physical disk online.  If you don't there will be a conflict with disk IDs later when we try to mount the virtual drive.  I used Windows 7 to mount the vhd.

Go to Computer Management, then Disk Management.  Click on one of the drives in the lower right so that the module is active.  Then right click on Disk Management and select Attach VHD.  Select the .vhd and make sure it gets mounted to a drive letter.

Now, open a command prompt.  I did this as administrator.  Assuming that the .vhd is mounted to drive e:\, I ran these commands:
C:\>reg load HKLM\VHDSYS e:\windows\system32\config\system

This loaded the .vhd registry to the current registry under HKLM\VHDSYS.  I started regedit and modified the Start key from 3 to 0 under these two entries:

HKEY_LOCAL_MACHINE\VHDSYS\CurrentControlSet1\Services\Msahci
HKEY_LOCAL_MACHINE\VHDSYS\CurrentControlSet1\Services\IastorV
I closed regedit and then unloaded the .vhd registry with this command in the command prompt:
C:\>reg unload HKLM\VHDSYS

Then, I started up the virtual machine.  It booted normally.  Then I installed host additions.  That gave me a better resolution and mouse integration.

However, the machine was not activated, and the old key did not work.  I'll have to research this more.

Sunday, September 30, 2012

Refs Still Suck

That didn't take long.  Refs on the Green Bay game suck as bad as ever.  I wish they would have stuck with the replacements and let them get better.  A missed offensive interference call on the Saints first touchdown.  Then absolutely blowing the fumble by Sproles on the kickoff.

The catch by James Jones to seal the win was absolutely ridiculous.

Sunday, September 23, 2012

Mac and Cheese

I've been trying to make a decent mac and cheese for a while using white cheeses.  I usually cook it on the grill and it ends up being a little thick from too much cheese.  I finally hit a good batch yesterday.

Of course, the only thing I measured was the milk, but here are the rough ingredients and measurements.


  • 8oz elbow macoroni
  • 2T butter
  • 2T flour
  • 2c milk
  • 1/2t black pepper
  • 1/2t white pepper
  • 1t salt
  • 1/2t basil
  • 1t onion powder
  • 2/3c smoked gouda
  • 2/3c white cheddar
  • 2/3c gruyere
  • panko crumbs
Prepare the noodle a little al dente.

Make a rue (cook butter and flour) until slightly toasted.

Add milk to rue and whisk.  Add the spices or whatever you think will taste good.  Bring to boil while mixing so it doesn't scald.  Cook until it thickens; about 5-10 minutes.   Remove from heat and add cheese.  Stir until it melts.  Add to noodles.  Put in buttered 9x9 pan.  Add panko crumbs to the top.  If you feel like messing up more dishes, mix the panko with parsely, salt, pepper, and Parmesan in a food processor until it is fine.  Sprinkle on top.  Cook for ~20 minutes at 400° F.  I added a little milk (about 1/4c) because it had been so thick in the past.

It turned out great!  The smoked gouda is delicious in mac and cheese!


Friday, September 14, 2012

I am a CISSP Now

I got my confirmation email saying that the (ISC)2 board of directors had awarded (!) me with the CISSP certification.  I'll continue with flying lessons and start my continuing education requirements.  It's nice to have the pressure off now.

Monday, September 10, 2012

Fresh Windows 7 Install Using Upgrade License Key

I have a Windows 7 Pro Upgrade key.  However, I like to install to a fresh disk.  I entered the key during install, but I was told it was an invalid key.  This had me a little worried.  Here is how to solve the problem.  I used option #2, the registry hack.

I installed to a fresh disk.  After installation, I tried to activate, but I was told that the key was only valid for upgrades.  Here is a fix, assuming that you are legally entitled to upgrade, meet the requirements, and have an appropriate key:
  • Open regedit
  • Go to key HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Setup/OOBE/
  • Change key MediaBootInstall from "1" to "0"
  • Close regedit
  • Open an administrative command prompt and type the following command
    C:\>slmgr /rearm
  • If it works, a dialog will appear saying "Command completed successfully.  Please restart the system for the changes to take effect"
  • Reboot and follow the activation procedure

Packers lose to Niners

That makes it a bad weekend for Wisconsin football.  The Packers never seemed to get in sync offensively, and the defense continued its multiple year trend of poor communication in the secondary.  After all the draft picks spent on defense this year, the defense still doesn't look any better.  I want to believe that the coaching is good, but at some point you have to wonder.

I did like how they used Randall Cobb out of the backfield.  I think he'll end up being a great weapon this year from the slot, the backfield, and returning kicks.  As long as he holds on to the ball.

I didn't notice anything out of the 1st round pick, Nick Perry.  He was involved in one sack, but quiet the rest of the time.  The same goes for the rest of the defense, except Clay Mathews and perhaps Charles Woodson.

They'll have a tough test Thursday against Chicago.  They defense better get their act together quick (I've been saying that since the start of last season, and it's getting old).  The offense needs to get in sync, too.  If not, this will be a long year for me watching the games.

Saturday, September 8, 2012

Wisconsin Upset by Oregon State

As a University of Wisconsin-Madison alumni, I like to watch the Badger football games.  Not this one.  They trailed 10-0 late in the 4th, when they finally scored a touchdown.  Being behind, they were in a 5 wide set for much of the game, with Montee Ball as the fifth receiver.  That is definitely not their strength. 

I'm not terribly impressed with their new quarterback, and I don't think the coaching staff did a good job adjusting.  I usually don't armchair quarterback, but this was pretty disappointing.  I hope that they can get the offense fixed by the time the Big 10 schedule starts.  It shouldn't be hard - hand it off to Montee Ball 30 times a game.

Hopefully the Packers will have a much better start tomorrow!