Hyper-V configuration for DHCP and PXE

DamianL 21 Reputation points
2023-05-09T12:14:00.2633333+00:00

Hi Guys

I hope you are all well.

I am writing to you because of issues with Hyper-V and (most likely) network configuration.

I have Hyper-V host where I want to deploy test VMs for SCCM activities.

Unfortunately my machines are not received IP addresses from DHCP.

Hyper-V host (Win Srv 2016) is on VLAN1 where DHCP is not enabled.

My VMs should receive IP addresses from VLAN10 where DHCP is enabled

Virtual Switch (external) is set with static IP address from VLAN1

The same switch is configured for VMs

IP Helpers for DHCP and PXE Srv are configured on Cisco Router for VLAN10

So my question is how to configure that to have DHCP enabled VMs?

Do we need next physical network card installed in host, connect it to port on switch/router configured for VLAN10 and then configure next external virtual switch for VMs?

Or there is another way to achieve that goal?

Thanks and best regards

Damian

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,625 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-05-09T17:07:34.7366667+00:00

    Virtual Switch (external) is set with static IP address from VLAN1

    vSwitches do not have ip addresses. When you create a new external vSwitch the internet protocols are removed from the adapter and the Hyper-V Extensible Switch protocol is added turning that physical port into a multi-port virtual switch. Connect your VMs to this vSwitch and use each VM's vEthernet to configure the addressing in the exact same manner as if it were a physical NIC

    My VMs should receive IP addresses from VLAN10 where DHCP is enabled

    You can create a new external vSwtich plugged into the network served by the DHCP server, then connect the guest VMs to this vSwitch.

    --please don't forget to upvote and Accept as answer if the reply is helpful--