I have been hearing many IT Professionals on many forums on the web complaining that their DHCP Server which is setup at the parent partition of their MS Windows 2008 Hyper-V Server is not working. Further more many of them has reported an error similar to the below one in their error logs:
The DHCP service is not servicing any DHCPv4 clients because none of the
active network interfaces have statically configured IPv4 addresses, or
there are no active interfaces.
The first thing I would like to bring to these administrators attention & to everyone else trying to setup any services or application in the parent partition of Hyper-V to consider avoiding that if possible at all cost. As its not recommended and almost not supported to use the parent partition for serving roles & services beside the Hyper-V role.
As most people who had been reading my blog for a while, they know I would not write this post to only hammer others of it being not recommended :). I am actually going to provide the work around below, but this should only be used in a test or development enviornment not production enviornemnt and as usual at your own risk.
Buy another NIC and dedicate it to your Hyper-V tasks.
- Install a second physical NIC on your Hyper-V server and patch it into your network.
- Open the Virtual Network Manager in the Hyper-V console and remove all virtual networks
- Configure your secondary NIC with an available IP from you LAN and a subnet mask. Leave the gateway, DNS and WINS empty.
- Open the Virtual Network Manager in the Hyper-V console and create a virtual network using the secondary NIC.
- Open Add/Remove Bindings on the DHCP server and remove the checks from all bindings except for your NIC. You may get an ambiguous error about an incorrect parameter which you can ignore.
- Restart the DHCP server and open Add/Remove Bindings to verify that the changes you made were saved.
- If all went well you should now be able to get DHCP leases from the Hyper-V server’s server primary NIC and use the secondary NIC for Virtual Machine access.
- If you use the Windows firewall, disable it for this process and re-enable it when DHCP works with the Virtual NIC.
This had worked for me & hope it will work out for you. I would like to thank Jaxplanet for sharing this method at another forum :). It helped me setup a Hyper-V lab with a poor man setup of one server :).
Share your success or problem with us in the comments field below.