access to hyper-v guest (network configuration)

Sep 20, 2018
4
0
10
Hello,
I have an hyper-v server in my network. I have started the VM(windows 2008 server) with powershell.
But i don't know how to access to it from the other computer in the network. Should i use an external or an internal vmswitch. And how to configure it.

Please help me
 
Solution
I have a similar server setup at home. I purchased a 4 port NIC for my server. I have one of those ports on the VM network which is separated from the rest of my home network (different subnet on an optional port). The I have a secondary port connected to the my local network and configured for Hyper V Management IP. Which I use from my home subnet to manage the server subnet systems.

This way traffic between subnets are still restricted. Only thing open is remote management for Hyper V between subnets.

P.S.
If you are trying to do it from Server Management you need to also allow Server Management through local Windows Firewall. I'd recommend you do it via Hyper V Management console instead. You can manage a remote server as long as...
Both computers need to be connected to the same virtual switch, external switch allows the VMs to access the internet through the host computers physical adapter, internal switch allows the VMs to communicate with each other and with the host computer, and a private switch creates a private network for the VMs to communicate with each other only.
 

how to do it?


I don't want the vm access to internet . I want the other physical machines which are in the network like the host can access to the VM.



 
You would need to have a firewall on the physical network, assign static IP to the VM and have the router and/or firewall block all outbound requests for that specific VM as the VM need to be connected to the virtual external network switch.

If you only want the host to be able to communicate with the VM you can connect the VM to a Internal switch in Hyper-V.

You could also enable remote management on the host and have the VM connected to a private switch, then the other computers would remote in to the host and they could then manage the VM.

The best setup depends on why you want the VM to have access the physical network but not the internet, is it only for the other computers on the network to be able to remotely manage the VM, or do the other computers need to access shared resources on the VM?
 

Thank you for your response :)
I have tried to access to the vm by remote manager but i get many error (winrm) and problem. So i tried with powershell configuration.
The problem is how to configure the external vmswitch and change the vm address with powershell from the host. And how to access to it from the other machines

this is an image to explain more my problem
http://



 
There are different ways to connect to the VM depending on the setup of your network, you can manage it from a remote PC with Hyper-V manager installed and they are on the same Active Directory domain.

The External Switch does not need to be configured if you have DHCP on your network, it will simply be assigned an address. If you need to make changes, such as set a static IP for the switch, you would do it from the network settings on the host, the virtual switch will appear as a NIC in the Network Connections.

If you need to configure the VMs network settings you would do it from inside the VMs network settings I dont think you can set the VM IP from Powershell on the host.

I can't tell you how to do the full setup as I don't know what it is you are trying to accomplish.

What is the purpose of the VM, is it setup for a home lab or is it a live production environment where the VM has a specific role, why are you trying to remote connect to the VM instead of managing it from the host?

https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/manage/remotely-manage-hyper-v-hosts
 

I will try to install it.


That's my problem i can't access inside the VMs.
So i will try to install hyper-v manager and manage the vm from the host.

 
Is there a way to remote into the host and then use the VMs from that? virtual hardware access will let you view and control.
otherwise creating some remote inside the vm, but then the networking would have to be configured so that it can't get online and still make a connection to it from another pc on the network.

if you have multiple hosts and need VMs across hosts to communicate you are going to have to set up some trunking or have 1 nic per network.
 


Virtual hardware access or VMConnect have nothing to do with connecting to the VM as the initial question was he could not access the VM. VMConnect allows a VM to use local resources (enhanced session mode) on the host such as USB. By mohamedalidrira last response I think he had not installed the Hyper-V management tools and console which will allow him to connect to the VM using a GUI.

The networking is done by connecting a VM to a virtual switch which is connected to the host physical NIC.
 


virtual hardware access is how you control a vm without being on the same net or connecting to it from another net....
adding the host nic into his bridge is the exact opposite of what he wants.
 
I have a similar server setup at home. I purchased a 4 port NIC for my server. I have one of those ports on the VM network which is separated from the rest of my home network (different subnet on an optional port). The I have a secondary port connected to the my local network and configured for Hyper V Management IP. Which I use from my home subnet to manage the server subnet systems.

This way traffic between subnets are still restricted. Only thing open is remote management for Hyper V between subnets.

P.S.
If you are trying to do it from Server Management you need to also allow Server Management through local Windows Firewall. I'd recommend you do it via Hyper V Management console instead. You can manage a remote server as long as you are on the same subnet.
 
Solution


Virtual hardware access to control a VM? Are you talking about VMConnect?

 


No, I asked what tools are there for host level control.
The VM doesn't even need a network card if you can control it from the host.
If the host can control it and send it over rdp or vnc he can keep it completely off the network.