Kirk Evans Blog

.NET From a Markup Perspective

My New Dev Rig: Boot to VHD and Hyper-V

My New Dev Rig: Boot to VHD and Hyper-V

  • Comments 4

I have a Lenovo T61P with 8 GB RAM.  That’s what I use to do demos.  To many devs, they’re thinking, “oh man, wish I had that much RAM”.  I wish you did, too, because the ROI of adding RAM for developers is an easy justification.  But here’s the thing… I don’t just dev with this machine… I do a lot of demos.  When showing off our great developer tools and the fantastic Windows Server platform, the last thing I want to do is to have to explain, “well, my machine is really slow because I am running 5 virtual machines.”

Sometimes I can connect to a remote machine that has a ton of RAM to do my demos.  When I travel to customer sites, I usually do not have connectivity, so I can’t connect to a remote machine… everything has to be installed locally.  My ideal scenario is:

  • Run SharePoint and Visual Studio and Team Foundation Server locally with as much RAM as I can get.
  • Connect the OS that has all my demos to a domain controller.  I will infrequently need to connect to the DC, so I can take advantage of cached credentials.

The first option is to install everything to my Windows 7 day-to-day environment, which I did.  I have SharePoint Foundation 2010 installed with SQL Express on my day-to-day environment with Visual Studio 2010, it’s quite convenient to answer emails, write a quick blog entry, write a web part, debug some ASP.NET MVC code, etc all on the same machine without rebooting. 

The demo environment I am working on uses things like user profile imports.  I can’t really put that on my corporate machine.  Virtualization seems like a good choice here.  When thinking about the choices, remember that SharePoint 2010 requires a 64 bit OS, which limits some of your choices of how to approach this.  For instance, you can’t just run Virtual PC, because right now it only supports a 32-bit guest OS.  Hyper-V supports 64-bit guest OS machines, which requires the host machine is Windows Server.  So, the first decision I make is that I need a 64-bit OS, but should it be virtual or native?

My first option is to just run everything using Hyper-V.  I have 8 GB RAM, and the Hyper-V guidance says you should allocate at most 70% of your host’s RAM to the virtual machines.  This means that I could allocate roughly 5.2 GB RAM to SharePoint, and 500 MB RAM to the domain controller.  But that sucks, because I very infrequently would need that 500 MB RAM, so I feel like it’s kind of wasted.  Using Hyper-V guests has the distinct upside of being able to use snapshots and save state, also allowing me to export the virtual machine to a USB drive and use it on another machine.

Another option is to use Boot to VHD.  This allows my machine to use all of the RAM and CPUs for my machine.  I get all the perf with the self-containment of virtual machines.  It’s not a virtual machine, so I don’t get backup capabilities like I do with Hyper-V, but I get the benefit of having access to all 8GB of RAM for my machine.  I really like this option, personally. 

What I ended up choosing was to use Boot to VHD and install Windows Server 2008 R2.  Once installed, I added the Hyper-V role.  In Hyper-V, I created a new virtual machine and created a domain controller.  Back in the host OS (which is boot to VHD), I join the domain that I just created.  Once I have logged on and my machine is a member of the domain, I can now shut down the domain controller and use the cached credentials from the domain.

There ya have it… I have all 8GB RAM at my disposal for SharePoint and Visual Studio, and when I need to work with the domain controller I just load up the guest virtual machine in Hyper-V.

  • I don't understand why MS doesn't make a 64-bit Windows 7 Developer Edition that supports Hyper-V and 64-bit out of the box.

    The workaround is setting up Windows Server 2008 R2 Enterprise as a workstation to get the necessary tools.

  • No apologies here, Ken.  I would love to offer an explanation, but I don't have one.  

    I am really happy with Boot to VHD, though.  Even if Windows 7 had 64 bit desktop virtualization, I think I would still use boot to VHD simply because my dev environment can utilize all the physical RAM and CPU.  

  • Kirk,

    I'm curious what type/capacity HD you have?

    Just got a new laptop myself and and looking at SSDs, but wondering if it will be big enough to fit all the things on it that I will need (and I'd like to make use of the Boot to VHD feature too) depending on how much I can afford to pay for.

    -dave

  • I have a 100 GB, 7200 RPM hard drive.  I also have an external 100 GB external USB 2.0 hard drive where I store and run the Hyper-V guest images.

    From what I have seen from others, SSD makes a HUGE difference.  I just haven't purchased one yet to see for myself.

Page 1 of 1 (4 items)
Leave a Comment
  • Please add 7 and 4 and type the answer here:
  • Post
Translate This Page
Search
Archive
Archives