Jump to content

DCHP server VM with HyperV

Title says it all, this is what I am trying to create, only I've encountered a couple of problems

 

I don't know how to correctly configure VMs inside HyperV to allow for:

  • Internet Access
  • LAN access

I created a virtual switch and set it to external but I don't know if the host machine is now supposed to access network trough the virtual ethernet adapter that was created or the "old" physical ethernet adapter. Which is it?

 

I also configure my static IPs from within windows so would I still be able to keep a static IP for the host machine? And how do I set a static IP for the VMs?

 

Thanks in advance :)

Link to comment
https://linustechtips.com/topic/470524-dchp-server-vm-with-hyperv/
Share on other sites

Link to post
Share on other sites

When you create an external virtual switch on a physical adaptor, it gives you the option (a checkbox) for allowing the host OS to also use that adaptor. If you check the box, the the host computer continues to function through that physical adaptor. If you don't check that box, the host OS ignores that adaptor entirely. You can also change the setting afterwards by opening up the virtual switch properties.

When you set a static IP on a network adaptor (doesn't matter what the OS is) it usually responds to that IP only on that adaptor. If the IP is set before you create a virtual switch on the physical adaptor, I believe Windows migrates the IP address for you, but you should double check the IP settings afterwards regardless.

To set a static IP for a VM you do it from within the guest OS.

If you want a VM to have both internet access (as in a public IP address) and LAN access, you either need two NICs on the host machine for each network, or you need to use VLANs to seperate the public and private traffic. If you go the multiple NICs route, you create a virtual switch on each, and then give the VM a network adaptor on each switch, and the host OS should only have access to use the private network NIC. If you go the VLAN route, you create a single virtual switch, set the host OS to share that adaptor but right below the chebox input the private VLAN for the host OS to use, and finally either a) create two virtual adaptors in the VM, and set the VLAN IDs in the network adaptor Advanced settings, or b) create one virtual adaptor, and then in your client OS set up multiple sub-interfaces, each with a VLAN.

Looking to buy GTX690, other multi-GPU cards, or single-slot graphics cards: 

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×