Can't ping a local VM from the host [closed] - windows-8

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
My work laptop is is a member of a domain (the OS is Windows 8). Created a new VM, locally on this laptop (using built-in Hyper-V). DHCP is provided by the domain and all IP addresses are assigned by the DHCP, both to the host and to the VM. The VM is not a member of the domain, just a member of the WORKGROUP. Trying to ping a local VM from the host. Pinging by machine name does not work. Pinging by IP address works just fine. Both host OS and the VM are on the same sub-network.
The IP addresses change every time I reconnect the laptop to office network. I would like to avoid the pain of using different IP's all the time.
Is there anything I can do on my end to make names resolution work? Adding the VM to the domain is not an option.

I know this is an old post, but I ran into this same issue with my VMs. Log into the VM and go to Control Panel > System and Security > Windows Firewall > Allowed Apps. Then check all of the boxes next to "File and Printer Sharing" to enable file sharing. This should allow you to ping the VM. The screenshot below is from a 2016 Windows Server but the same method will work on older ones.

The issue could be that the VM is connected to the network via NAT. You need to set the network adapter of the VM to a bridged connection so that the VM will get it's own IP within the actual network and not on the LAN on the host.

I had a similar issue. You won't be able to ping the VM's from external devices if using NAT setting from within VMware's networking options. I switched to bridged connection so that the guest virtual machine will get it's own IP address and and then I added a second adapter set to NAT for the guest to get to the Internet.

try to drop the firewall on your laptop and see if there is difference.
Maybe Your laptop is firewall blocking some broadcasts that prevents local network name resolution.

On top of using a bridged connection, I had to turn on Find Devices and Content on the VM's Windows Server 2012 control panel network settings. Hope this helps somebody as none the other answers worked to ping the VM machine.

Try dropping all the firewall, the one from your VM and the one from you Laptop, or add the rule in your firewall where you can ping

Maybe your VMnet8 ip is not in the same network segment, e.g., my vm ip is 192.168.71.105, I can ping my windows in vm, but can't ping vm in windows, so this time you may check if vmnet8 is configured right.
IP: 192.168.71.1

I had the same issue. Fixed it by adding a static route on my host to my VM via the VMnet8 adapter:
route ADD VM_addr MASK 255.255.255.255 VMnet8_addr
As previously mentioned, you need a bridged connection.

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.

SSH but not ping [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I have an Ubuntu VM (running on MacOS host) and am trying to connect to another box that is running Linux (busybox, IIRC).
I can ssh from machine A (Ubuntu-VM) to machine B (busybox). I can ping from A -> B, but I cannot ping from B -> A.
Machine A has IP of 10.0.2.15, B has IP of 10.1.10.216.
My ultimate goal is to be able to use wget on B to get files from A, and I'm hoping that solving this ping problem will allow B to see A and allow magic to occur.
My network comprehension is near zero, so this is probably trivial, but any help greatly appreciated.
As you are using a NAT interface, Virtualbox will mask all the traffic from your virtual machine to the outside network using the IP address of the host. To clarify this, the traffic that is arriving to computer B is from 10.1.10.97 (Your MacOS host), and that is why B can return that traffic to A, because it is actually sending it to the host and Virtualbox is translating the destination address to the NAT'd virtual machine.
You have two alternatives:
Change the adapter type to Bridged (This will change the IP address on the Ubuntu machine but is also the easiest if you have little networking knowledge).
Forward a port in the host to the machine A (I see this as the most suitable solution without changing the architecture)
For case 1 is as easy as change the settings in Virtualbox and then get the new IP.
For case 2, what you should do is go to the Machine Settings, in the network section, expand Advanced and set a port forwarding, for instance:
In this way, from computer B you will be able to wget from the host IP (NOT the 10.0.2.15, the 10.1.10.97) on port 8080, and this traffic will be forwarded (Destination NAT'd) to 10.0.2.15 using: wget http://10.1.10.97:8080/path/in/ubuntu
You will never be able to point directly from 10.1.10.216 to 10.0.2.15 as machine B has no routes to 10.0.2.15
I recommend you read a little bit about NAT (https://en.wikipedia.org/wiki/Network_address_translation)
There's a lot of assumings in this answer, I hope it helps.

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

How can I SSH directly into a VMWare virtual machine from an external computer? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I am running Kali Linux on Virtual Box on my personal computer. There is another computer on the same network that has a virtual machine on it. I want to SSH directly from Kali Linux (on my computer) into that other computer's virtual machine directly.
I don't want to go through two steps (SSH into the other computer, then SSH into its virtual machine). The other computer uses VMWare Player as its virtualization software. Its guest is metasploitable.
Any ideas?
EDIT: The VM on the other machine needs to stay in NAT mode for my purposes.
Is openssh-server installed on your Kali Linux VM? You'll need that thing if you want to SSH into it.
You can make sure by opening a terminal / console (on the console inside Kali Linux) and putting in:
sudo apt-get install openssh-server
Then ssh using:
ssh user#ipaddress:port
Does this work for you?
You need to put your VMware Player network adapter into bridged mode. This will make the VMware Guest visible to the other computers on your network including to your VirtualBox guest.
If the VM needs to stay NATed then you will have to create a port forward rule on port 22. To do that you need to make sure that vmnetcfg was installed when you installed VMWare Player.
Open that Utility by going to the directory where you installed VMware Player and run vmnetcfg.exe. From there you will be able to create a port forwarding rule by choosing your VMs network adapter and selecting "NAT Settings". There is a section of that menu where you can create port forwarding rules. You'll want to forward port 22 to the VM (unless you've changed the ssh port on your server, then forward whatever that port is).
If you don't have that tool installed, you can get it by running
VMware-player-?.?.?-??????.exe /e .\VMTools
Then from your Kali box you can ssh to the IP of the VMWare host machine and the ssh traffic will get passed through to the VM.

how do i reach apache on a vitualbox machine

I am trying to run a virtual LAMP machine on my windows 7 for dev purposes. But i cant figure out how to reach the apache from the host windows 7 system. I did an ifconfig and tried the ipaddress, but to no avail.
If you set virtualbox to use bridged (regular) networking then it's no different from any other machine on the LAN, if you set host only then you can still call it - you just need to know it's IP address.
See http://opensourceexperiments.wordpress.com/2008/04/18/virtualbox-case-study-making-host-only-networking-work-between-two-ubuntu-guest-os-virtual-machine-on-windows-vista-host/
You will need to set the networking mode of your VM in virtualbox.
Bridged will allow others on the LAN
to access your VM.
Host-Only will allow your host and
any other VM's also configured as
host-only to access one another.
Virtual Box Neworking
If you look at the link you will have many different options on the type of networking you can do.
as mentioned earlier, I recommend either:
Bridged networking that makes the box look like an other computer on your network. They you may use ipconfig on the box or verify your router logs.
Host-Only networking is where your windows 7 will be its own network between the box and windows and then you may use the Ip address from ipconfig.