How to acquire Windows 10 Host IP from an ubuntu HyperV Virtual Machine - virtual-machine

I have a server running on my windows machine and a hyper-v ubuntu VM
I am trying to test the frontend from my VM but I want to make requests to windows 10
host, how can I get the host's IP?

Go to Wired Connected -> Wired Settings and just copy the DNS IP

Related

Connect Hyper-V VM from WSL (Ubuntu)

I have created a VM on Hyper-V with 2 Network Adapters.
NAT switch for static ip
External Switch (for access internet)
From my command line I was able to connect to the VM with the Nat Switch IP
but from WSL Bash I was not able to connect with IP NatSwitch, but able to connect with ExternalSwitch IP.
Why?
Unfortunately this is the expected behavior. (As of 29/01/2021)
WSL2 uses Hyper-V Virtual Switch, vEthernet (WSL) virtual network adapter, that is providing internal type Hyper-V network that is only accessible from the VM and the Host. The Hyper-V machine has a different virtual network adapter e.g. vEthernet (Default Switch). If that is set to internal that is a different NAT-ed network (subnet) not connected to the WSL one. It is like the Host having 3 NICs and one cable (Cable 1) going to WSL on a subnet that only exists on that adapter/cable and another cable (Cable2) going to Hyper-V guest with a very different subnet on that NIC.
On the other scenario the Hyper-V guest shares the subnet with the Host machine ("Same subnet as the 3rd cable/NIC.") so it is routed back to the VM. See red labels.
There is a workaround in this GitHub issue using port forwarding to Guest VM from WSL.

Network issue between VMWare guest and windows host

I have a windows 7 host, on which I am also running a windows 7 virtual machine, essentially I'm trying to setup buildbot, the host runs the build master while the vmware virtual machine will run the build worker. The virtual machine network adapter is configured to host only. The virtual machine It has an ip address of 192.168.1.12, while the host has an ip address of 192.168.1.92. Both addresses are static IPs there's no DHCP involved
I can ping the host from the virtual machine, and I can ping the virtual machine from the host.
But when I try to get both the build master(host) and the build worker(vm) to communicate, nothing seems to happen. Looking at the twisted log in the vm I can see error messages along the lines of
"TCP connection failed to connect to host on ip 192.168.1.92:8999"
Note the buildbot.tac on the build worker(vm) has the ip address of the host (192.168.1.92) and the port on which to connect 8999
I have tried netstat -ano on both the host and the vm and I cannot see any connection between the two.
I have tried turning off the firewall inside the virtual machine, just in case, but no success there either
Any suggestions.

How VM Name is resolved over the LAN Network?

I have hosted a VM (Red Hat Linux) named test-vm on my Desktop machine (Windows) with a static IP address but I don't have any DNS entry for this static IP address.
Without having an entry in the client's host file, to my wonder the ping test-vm responds. How is this possible? How test-vm is resolved at other machines on our LAN Network without having a DNS entry for test-vm?
Regards,
Adil Khalil
I guess you are using vmware client in your windows desktop. In this case, the hostname is associated to your vmware virtual DNS. With a ping of broadcast in your network, your vmware virtual DNS is forwarding the ping to your VM Client.

Accessing a Guest Machine's IIS (Installed on VmWare) From Host Browser

I have a Windows Server 2008 R2 installed on VmWare Workstation 10 hosting on Windows 7 OS. I have enabled the IIS on Guest machine and I have some applications running there which are accessible through localhost on guest server.
I have run the netstat -na on the guest machine and I have these local address
Now my question is can I access the above address through my host commuter?
thanks

How do I connect to a localhost service from a hyper-v VM?

I have a WCF service running on "http://localhost:12345/ServiceName". I also have a VM running under hyper-v in Windows 8 public beta. Is there any way that I can connect to this service from the VM? I cant seem to set up a bridged network connection in the hyper-v manager. An alternative would be for the WCF service to bind to the Win8 machine name or IP, but I don't know how I would find out what that endpoint is from the VM side. The WCF service can be changed in any way needed...
Any help would be much appreciated!
Many thanks,
Jon
Not sure this will work with a Windows VM, but I managed to open host's URL from inside an Ubuntu VM:
On Host disable the Firewall or add a rule to allow connections to the respective port (12345 in your case).
On VM edit /etc/hosts, replace 127.0.0.1 localhost with IP_OF_HOST localhost.
Now http://localhost:12345/ServiceName should open from inside the VM.
you can create Virtual Switch in Hyper-V(Virtual Switch Manager) Then you can connect it to your VM(right click on VM ->setting -> create Legaci network adapter -> connect abouve virtual switch to it). after that you should install intigration to Hyper-V for your OS in VM. then you can connect to your virtual switch in your VM. after that you can access internet as well. you your host machine has it. type your host machine's IP address in web browser and you can access any service in host machine
You also need to run as admin on the host machine command shell netsh http add urlacl url=http://*:12345/ user=Everyone where 12345 is the port number of your service.