My Client VM is Unable to get a DHCP Address from the DHCP Server VM in Windows Virtual PC on Windows 7

My Client VM is Unable to get a DHCP Address from the DHCP Server VM in Windows Virtual PC on Windows 7

  • Comments 1
  • Likes

 

I was working on a demo environment for session we’ll be doing in the upcoming TechNet roadshow in a few weeks.  I usually use Windows Server 2008 Hyper-V for my demos, but because I needed to have access to USB drives from the virtual machine, I decided I use a Windows 7 laptop with Windows Virtual PC.  I already had the two VM’s created so I decided the easiest thing to do was to copy the VHDs over to the Windows 7 machine.  My environment for the demos consists of two VMs; ATL-DC-01 – which is the DC, DHCP, DNS and all-around infrastructure server, and my client, ATL-XP-01

IpconfigFirst thing I did on the Windows 7 machine, was open up Windows Virtual PC and create two new virtual machines:  ATL-DC-01 and ATL-XP-01.  I configured the machines with the same amount of memory as they had on Hyper-V, and just completed the VM creation by accepting the default which also creates a dynamically expanding drive for each of the machines.  Once completed, I simply overwrote the newly created VHDs with the VHDs I had copied from my Hyper-V server.  I also went into Settings for each machine and configured the network adapters to use the Internal Network.  I’m now ready to boot the VMs.  They came up fine, I updated the Integration Features and let them go through their hardware discovery.  All is well so far..

After everything completed  the VMs were rebooted and I was ready to go through the demos to make sure they worked.  I immediately came across a problem.  My client, ATL-XP-01, wouldn’t communicate with the server.  Even a simple ping failed.  After some cursory troubleshooting I noticed the client wasn’t getting an IP address from the DHCP server on ATL-DC-01, but instead was getting the an address of 169.254.0.16.  That’s weird.  I poked around a little rechecking network configurations on both VMs but couldn’t find anything wrong.  For giggles I configured the client with a static IP address and found that worked fine so I know the network connection is good.  The problem appears to be DHCP.

After some searching around on the internet I found out the default configuration for Windows Virtual PC is to have the internal network use its inbuilt DHCP server, so the DHCP service on my DC wasn’t getting a chance to provide the IP address.

So what’s the workaround?  How do I make it so ATL-DC-01 supplies the IP addresses and not the Windows Virtual PC internal DHCP server?

Luckily its fairly straightforward…

1. Turn off or hibernate all of the VMs.

2. Open Task Manager and End Process on vpc.exe.  (If you don’t do this you won’t be able to do the next step as vpc.exe will have the file locked.)

taskmanager

3. Open an Explorer window and go to C:\Users\<your username>\AppData\Local\Microsoft\Windows Virtual PC

4. Open the file options.xml with Notepad.

<virtual_network id="0">
        <id type="bytes">0F3599A161514FD48C83974F3D520C5F</id>
        <gateway type="integer">0</gateway>
        <name type="string">Internal Network</name>
        <virtual_server>
            <dhcp>
                <enabled type="boolean">true</enabled>
                <ending_ip_address type="integer">2851998462</ending_ip_address>
                <network type="integer">2851995648</network>
                <network_mask type="integer">4294901760</network_mask>
                <starting_ip_address type="integer">2851995664</starting_ip_address>
            </dhcp>
        </virtual_server>

5. Change to <enabled type="boolean">false</enabled> and save the change.

6. Turn the VMs back on.  The client now gets an IP address from the DHCP server, in my case ATL-DC-01.

Comments
  • This is PERFECT!  I've been trying to recreate what I learned in MCSA classes at home using virtual clients for quite a while now.  I have a couple of Windows 2003 servers and XPs that I've been trying to connect via DHCP for a while.  I can now see that an address was leased to one of the XP clients on the DHCP snapin of MMC.

    Thanks!

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment