Windows 7: Disable builtin DHCP server for “Internal network” in Virtual PC

I recently installed Windows 7 and I have been waiting for the final release of XP Mode and Virtual PC which occurred last 22nd of October. I previously had (in Windows Vista and using Virtual PC 2007) a virtual domain, composed of virtual machines such as:

  • server2003: a domain controller and DHCP server, with fixed IP address, connected to the “internal network” of Virtual PC.
  • isa2006: with two interfaces (dual homed), one connected to the physical host network adapter (for connecting to the internet), the other one connected to the “internal network”. Both IPs are manually set.
  • sql2008: the database server for the tests with this virtual domain, IP address assigned dinamically through DHCP.
  • vs2008xp: a Windows XP with Visual Studio 2008, belonging to the domain for testing and developing, IP configured through DHCP (that should be handled by server2003).

With such a testing environment, all traffic that should go to/from the internet passes though isa2006. If isa2006 is not running (for instance) the virtual domain is isolated and the virtual machines can only see themselves (members of the domain).

This was the scenario that I had configured in my old Vista using Virtual PC 2007 and wanted to reuse the .vhd files so that I do not need to rebuild the playground from scratch again.

It was quite simple, I just recreated every single virtual machine using the wizard, and when asked for the hard disk, I selected ‘the existing one’ instead creating an empty one. Then, when the machine was first started, I reinstalled the Virtual Machine Additions (now called Integration Components), and after a couple of restarts everthing seemed to be working… but it only seemed.

Then I realized that sql2008 and vs2008xp (both were configured to use dynamic IPs using DHCP) cannot browse the internet, nor ping any other server in the domain. They were using the “Internal network”, but their IP addresses were not assigned by the DHCP running in server2003, since they were not in the expected range/mask.

After Gooling for a while I learned that Virtual PC has its own builtin DHCP server and it seems it is (incorrectly) enabled for the “Internal network”. Fortunately there is a fix for it:

  1. Turn off or hibernate all your running Virtual Machines.
  2. From the Task manager, kill vpc.exe if it does not exit on its own.
  3. Edit "%localappdata%\microsoft\Windows Virtual PC\options.xml"
  4. Search for the “Internal network” section, and then inside the <dhcp> section, disable it: <enabled type="boolean">false</enabled> and save the file. You can keep a backup of the original xml file just in case.
  5. Turn your VMs and verify everything runs as expected.


a-zaytcev said...

Thanks, it's really working :)

Anonymous said...

Thank you a ton, I spent all morning looking for a solution and this one worked perfectly, my windows 2003 VPC is not my DHCP on the Virtual Network

Anonymous said...

fantastic, a fix for a very annoying "undocumented feature"


David Ocampo said...

This is amazing! I'm so glad I stumbled upon this.

Andrew D Barnes said...

Oh my word! This is such a great tip. I've rebuilt my 2008 server and run into exactly the same issues before finding this article.

I was begining to question my understanding of virtual networking.

Anonymous said...

Thank you very much... Three days looking for a solution....

Jiayi said...

great tips, so much better and easier than the one posted in social.technet, which involves millions of steps, and might not even be working....and yet marked as "answer" by microsoft moderator...


Pereira said...

Many many tks!You save the day!Cheers from Portugal!

Anonymous said...

Man, I owe you a beer. This was driving me nuts.


trw said...

I am highly grateful for your fix. I spent altogether days or maybe weeks trying to figure out what I did wrong. Thank you a lot. You are the man!

Anonymous said...

Thanks! Stumbled on your "fix" this morning and it made my day (and week and month!).