0

I have Windows server 2019 and multiple application running in IIS. I want to create different network for hyper-v vms with static ip.

And i dont need internet access to hyperv vms.

How can I configure vSwitch to achieve these?

ahnirab
  • 1
  • 1
  • 2

1 Answers1

0

How can I configure vSwitch to achieve these?

Not at all. The vSwitch is that - a virtual switch. It has no control over the IP addresses on the VMs.

Just set the static IP (and DNS) in the VM, either by first logging into the VM or by using Powershell (on the host - there is a way to connect from the host in a powershell session INTO a VM, assuming you know username and password - look up https://docs.microsoft.com/en-us/virtualization/community/team-blog/2015/20150514-powershell-direct-running-powershell-inside-a-virtual-machine-from-the-hyper-v-host)

Like a physical switch, a vSwitch does not care (as in: AT ALL) about what the VM does IP address wide. Which is why it is VERY - and I mean VERY VERY - good, if you do not control all VM's, to isolate different client VM's into separate VLANs (which you set in the VM configuraiton, not in the VM) and use a router (as VM) to route between them. As such, vSwitch is 100% identical to ANY other switch on the world in the standard configuration. It does not care - it collects what IP address is used there using the ARP protocol.

Make a network diagram, implement it, like you would with hardware and not VM's.

TomTom
  • 50,857
  • 7
  • 52
  • 134