Hyper-V Internal Switch IP addresses (and networks) keep changing - hyper-v

I run several Hyper-V guest VMs on my Win 10 workstation.
Unfortunately, quite frequently, my saved RDP connections stop working.
Sometimes only the IP address changes in the same network (e.g. ip 192.168.27.* netmask 255.255.255.240). But other times I even find myself (or the guest VM) in a completely different network 172.x.x.x.
OS: Win 10 rel. 1903
How can I stop this erratic behavior -.-
If it didn't change networks as well I would have simply set up static IP addresses for my guest VMs.

Related

Windows Server 2019 - VMs on Hyper-V cant get network

I have some trouble with my windows server 2019 running Hyper-V, for the background my windows server run on an ESXI infra.
It is impossible for me to get any internet access nor domain access on my Hyper-V virtual machine, this is how my host configuration look like
Host network
For me all look good, but when I turn on my virtual machine this is what I get
VMs network
VMs ping
I can see the machine getting a IP from my DHCP server, but it is impossible for me to ping any of the gateway, DNS.
My DHCP
This is how my virtual switch look like
vSwitch Hyper-V
And if needed my Ipconfig of my Windows server Hyper-V host
Hyper-V host network
I think that i have now tried everything I could, I don't see why my machine can get a DHCP IP, but can't communicate with any of my server.
I already have a topic posted on SpiceWorks (https://community.spiceworks.com/topic/2326264-hyper-v-wont-provide-internet-access-on-my-virtual-machine?page=1#entry-9231547), the last answer suggested that the problem came from my vSwitch on Hyper-V, but even after recreating a new one I can't get anything.
If you have any idea that can help me to achieve my configuration even the slightest one I'll gladly take it.
First thing I would like to ask, you are doing a Double Nested Virtualization, meaning: [ESXi] is the BareMetal Hypervisor, then inside of this Host you have at least 2 VMs, one name "SRVPARDC001" & the Hyper-V VM named "TESTHYPERV" , and inside this last one you have another VM called "VDI-Master" , if this is correct, you are asking:
*Why is VDI-Master, not getting internet, when SRVPARDC001 has leased an IP address ( 192.168.1.118) ?
My question is, why does the ipconfig output for VDI-Master show IP 192.168.1.121 , which per your DHCP, should be leased to the Desktop
Would it be possible to use a different subnet for the Virtual Switch inside the Hyper-V , to eliminate routing/dhcp issues?
My impression is that there is an issue on how the virtual switch is configured on the TESTHYPERV vm, since that virtual switch should be allowing the traffic upstream to the ESXi host and then out via your gateway/router/firewall device.

Wireless network causes virtual machines to be inaccessible by outside world

I currently have two Ubuntu 14.04 virtual machines running on a windows 7 host. The virtual machines are configured to use a bridged network adapter.
When the host machine is hardlined to the internet, the virtual machines are able to ping the outside world as well as be ping by the outside world.
When the host machine is on a wireless network, the virtual machines cannot ping the outside world, and the outside world is not able to ping the virtual machines.
When connected to a wireless network, I receive the 'Destination host unreachable' error when pinging either from the virtual machines to outside, or from outside to the virtual machines.
It may be worth noting that these virtual machines are being run inside VirtualBox. Also something which may be applicable here, section 6.5 of the virtualbox manual states:
Bridging to a wireless interface is done differently from bridging to
a wired interface, because most wireless adapters do not support
promiscuous mode. All traffic has to use the MAC address of the host's
wireless adapter, and therefore VirtualBox needs to replace the source
MAC address in the Ethernet header of an outgoing packet to make sure
the reply will be sent to the host interface. When VirtualBox sees an
incoming packet with a destination IP address that belongs to one of
the virtual machine adapters it replaces the destination MAC address
in the Ethernet header with the VM adapter's MAC address and passes it
on. VirtualBox examines ARP and DHCP packets in order to learn the IP
addresses of virtual machines.
I'm not sure what may be causing this issue. Accessing these virtual machines from the outside world when switching between networks is necessary in my situation. Any ideas as to what may be going on?
Thanks in advance for any help!
Just to provide some value to those who may stumble upon this issue in the future:
The source of this problem stems from a setting within virtualbox. Open virtualbox, and under the Settings > Network > Adapter page, there is a name field.
If attempting to connect to the virtual machines over a wired connection, select your host machines Ethernet adapter.
If attempting to connect to the virtual machines over a wireless connection, select your host machine's wireless adapter.
Hope this helps someone out there!

Accessing VM's terminal using putty in host OS?

I am working on a project in which we logon to client's machine using Cirtix receiver. The machine which we connect to using Citrix receiver is basically a Windows 7 machine. Once we are in the client's windows box, inside that we have virtual box, in which VM has been added and which has all the needed software for us to do the development; for example JBOSS, database etc.
In the host machine (windows 7), we have putty, and using putty we sometimes login to the VM (i.e. terminal). The confusion which I have is as below:
We login to the VM terminal using IP address: 127.0.0.1. This is where my confusion is. 127.0.0.1 normally is the IP address with which we can refer to the current machine; so how using this IP address we are able to connect to the VM which is added to the virtual box? Doesn't the VM which is in virtualbox has its own IP address with which we can connect to? Or is there some concept which I am not aware of.
Can anyone help me in understanding this? I am not well versed with virtualization, so for the gurus this might be a naive question.
Every VM will have their uuids so to access the VM inside virtualBox or any hypervisor for that matter. so you can use that particular VM uuid and u should be able to console to that VM.
in virtual box try below
You can use: VBoxManage list vms to list all currently registered VMs with their settings, names and UUIDs.
Once you know the UUID you can also start a vm by:
VBoxManage startvm which is essentially same as: VBoxManage startvm "Name-of-vm"
Also Vm has two interfaces one loopback which will have an address of 127.0.0.1 and the rest of the interfaces so to access the VM with particular ip you need to assign an IP to that VM interface and than try with that IP.Also you might have that port 22 open for that loopback ip so may be that is the reason you are able to connect on loopback
I hope this answers your question

Hyper-v 2012 - Guest OS not working with a Static IP

So I have a very strange issue. I've setup 2 NIC's, 1 for the host OS (windows 2012 with Hyper V) and a guest OS (Windows 2012 - Active Directory). I've setup 2 physical nics, 1 for the host and another for the VM's.
Unfortunately the problem seems to be when I try to set the guest OS to a static IP on the local subnet (which works with DHCP), but the moment i assign a static IP, it stops communicating with anything but the local IP's for the Host OS.
I've tried several different things for the virtual server (guest OS) and so far nothing is working. If I leave it set to DHCP, its fine with all connectivity. However the moment I set it to a static, it stops me.
At the current time I have the Host OS (Server) with 2 physical nic's:
Nic1 - Host OS connectivity
Nic2 - Hyper-v Virtual Switch configured "External network" for all VM's
Guest OS - connects using DHCP through Nic2 (External Network). Should be bridged, but when I set to static, I lose all connectivity to the external network, but switch back to DHCP and it works great.
Whats going on? Am I completely missing something obvous here?
So in case anyone finds this question I thought I should at least post the answer I found.
It would appear that the problem is not with my Hyper-V setup. The problem was with the router that the system was attached to. I have a ZYXEL USG1000 that is controlling the network with Hyper-V, and it appears that this model does not work in the same way as other router products I've experienced (Cisco/Juniper/etc).
I was able to verify that the VM's could actually ping/access other systems within the same subnet assigned to them, but they still could not cross the gateway. There is a IP/MAC Binding option within the Zyxel router software and until this VM's MAC was added to the binding list, only then would the gateway pass traffic from the VM's.
So in case anyone else runs into this similar situation, check out your router and the mac/IP binding for your VM's.

How can I configure a Client Hyper-V (on Windows 8) to connect to the host and other VMs without a network connection?

I'm trying to develop an interface to an application that doesn't run on Windows 8. Hence, I've created a VM with Windows 7 running the integration service and another service running on the Windows 8 host.
I have three Virtual Network scenarios configured for Hyper-V: Wireless, Shared and Internal. Where Wireless allows all VMs and the host to connect to a wireless network (External), Shared let's the VMs connect through the host via a VPN (Internal) and Internal creates a network within the host where the VMs don't have network access (Private).
When I'm in Wireless (External) mode and there's a wireless network to connect to, everything works fine as if I were testing using to physical PCs on a wireless network. However, today I had a situation where I wasn't connected to a network but still wanted to do some testing and I could not get the VM to see the host and vice-versa. This scenario was quite straight forward to create on VMware which I used before switching to Hyper-V...
Has anyone managed to make Client Hyper-V VMs and the host communicate without a network? Can you guide me how to set it up?
Wireless networking under Windows 8 Hyper V can not communicate with multiple VM the Wireless NIC is assign to only one Hyper V internet connection,
Meaning only one Hyper V can connect to the Internet preventing others from connecting unless you use multiple Nic's Wireless Network Cards or USB Wireless Network.
It is only after you restart or shut down your computer that Hyper-V problems start.
So if you can not connect any of your Hyper VMs then you problem could be due to a shutdown error that Hyper-v in counted Try restarting the whole computer then Hyper- VMs your problem should fix itself.
Might want to try this. I am having similar problems as you and all signs point to this particular solution working, but for me it is not. Might help you, though.
http://blogs.technet.com/b/doxley/archive/2008/07/07/disconnecting-hyper-v.aspx
The solution that DID end up working for me was this:
http://www.elmajdal.net/Win2k8/Enabling_Wireless_Network_For_Hyper_V_Virtual_Machine.aspx