A Quick Virtualization Tale

I just went through an experience working with VHDs that I find amazing, frankly. I am not a big sysinternals type of person, so maybe this is no big deal to many readers, but for me it was a very enlightening process. So, cool that I just had to blog it.

The Situation

I have a massive laptop that I wanted to set up as a TFS host machine on Windows 2008 R2. I wanted it on WinSvr2K8 so that I can get Hyper-V, SSRS, and SharePoint. My Dell m6500 is a great machine, but I know from trying before that the drivers for Windows 7 x64 don?t fully work  for WinSvr2K8. So, I?ve been running Win7 without the server OS and working around the limitations of not having a full server-based TFS install. Time to step up, though.

I don?t want to loose the Win7 native OS because I have it set up like I want for most of my work.

The Solution

  1. I created a fixed 40G VHD disk volume on my C: drive to house my new TFS machine as per these instructions.
  2. I then burned a bootable DVD of the WinSvr2K8 MSDN ISO using ImgBurn (free).
  3. Booted using the DVD and installed the OS on the new VHD partition. This creates a dual boot system.
  4. Went through SQL, TFS, VS 2010 installs, etc.

The Cool Problem and Solution

This is where it gets interesting. I ran out of room on my VHD Sad smile. I assumed at this point I would be re-installing WinSvr2K8R2 because I created a fixed size disk. Nope. A little poking around online yielded VHDTOOL.exe.

  1. Used vhdtool.exe to expand the size of my 40G VHD to 80G. This took all of 3 seconds to run. Wow. I took longer worrying I was going to ruin the VHD.
  2. Booted into the WinSvr2K8R2 OS.
  3. Used Disk Manager to expand the C: volume to take the entire available 80G of the VHD volume. (again, about 3 seconds to finish)

Final Notes

All is well. I now have an 80G C: drive on my WinSvr2K8R2 OS and it is working great. With Hyper-V!

This is just so cool.

2 thoughts on “A Quick Virtualization Tale

  1. FYI, you can mount an ISO directly in a virtual pc; no need to burn it first.

    Another handy tool I discovered is Sysinternal’s disk2vhd; this creates a vhd from an existing disk. Just create a new virtual pc with the VHD image as it’s boot disk, boot it using the OS repair routine from the OS CD, and you have your (old) machine virtualized.

  2. Right, but you can’t mount an ISO in via the external VM software when you have booted into that drive. There was no way to install the OS on VHD because I started in Win7 which won’t runan x64 VHD OS in VPC7. SO I had to do it like a “no current OS” install.

Comments are closed.

Proudly powered by WordPress | Theme: Code Blog by Crimson Themes.