Networking VM
I installed Oracle VM VirtualBox on at laptop, then created 2 VM machines. I configured static IP address on both machines, but when I ping from one box to the onther I get an error message "Destination Host Unreachable" Why is this? Do I need a hub?
|
Need more detail - what are the IPs and netmasks? What routes are present? I reckon you don't need a hub for this (how could it help?).
|
The Virtualbox documentation explains it. The doc should be in the [help] or [about] options as soon as you open the Virtualbox app. If I recall correctly pinging in Virtualbox VMs is a fairly new feature...
|
I assume you used the NAT default. Try "Bridged". VBox advice from other LQ'ers welcome.
(static routing applies, or guest can dhcp from ISP/router, which often doesn't work for me!) Yes, per#3, VBox (your host [Win] 'app') Manager F1 -> Help; search 'ping' finds 6.3: "The disadvantage of NAT mode is that, much like a private network behind a router, the virtual machine is invisible and unreachable from the outside internet; you cannot run a server this way unless you set up port forwarding (described below)." [I hadn't seen 6.3.1! 'too complex' InMyHumble_newbieOpinion:( Simply use Bridged.] Note that your guests *can* reach the Internet FINE in the default NAT mode. (Exactly like your Win laptop probably does! wiki-research NAT: the world can't reach your RFC1918'ed) I (personally, because of my 'ISP problem'; others don't! recommend this!) leave eth0/enp0s3 as NAT and *add* a 2nd 'NIC' *as Bridged*. Many distros detect it OK and dhcp eth1/enp0s8 (Plus, you now have the 'fun' of a 2nd net to 'explore'!) bash cmd hint: ip a;ip r WELCOME (back) to LQ. Enjoy your journey, fast/easy/SAFE with VBox! (ooops, 9yr here) p.s. I found pre-installed OSboxes give me up&running LinuxS as fast as I can download 'em! I'm not sure if my answer is correct: my 2 guests (Bridged to host wifi) can't! internal/host-only? I'm web-researching: virtualbox ping two guests wifi isp UPDATE: none of the 4 work for me:( (yes, ip a;r 'ok'; Idk tcpdump *inside:eek:* VBoxManager) UPD2: got 'host-only' to work, BUT must use proper subnet! (WinX: ipconfig/all&netstat -rn [192.168.56 probably]) |
As stated it depends on the mode of the VM network adapters. Which mode you pick depends on what you are trying to accomplish. The modes where VMs can communicate with each other is bridged, internal and host only.
https://www.virtualbox.org/manual/ch06.html |
I was advise by a co-worker to connect my laptop to a switch. That will allow me to network my laptop, therefore my VM will be able to see one another, just because I have them on the same machine doesn't create a network connection.
|
I am also looking into the bridged option. Thanx
|
Problem solved bridging the adapters worked.
|
All times are GMT -5. The time now is 01:34 AM. |