I've setup Ubuntu Server 22.04 on Oracle's VM Virtual Box Manager on a Laptop running Windows 10.
I've selected the "Host-only Adapter" since I need a static IP, and the previous Bridged Adapter used to keep changing IPs each time my phone's hotspot was turned off and on.
But now, the VMs have no internet access. I've added NAT as a second adapter, but that hasn't helped in any way. Am I missing something? How do I get this right? I've included screenshots in the attached rar file since I'm not allowed to post urls at the moment.
Cannot connect to the internet after assigning Host-Only Adapter on Oracle VM Virtual Box Manager
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Cannot connect to the internet after assigning Host-Only Adapter on Oracle VM Virtual Box Manage
Host-only networking enables comms to the host (only). Hence the name. Intended for people who want comms to the host without exposing the VM to Internet threats.
As to the second NAT port, I'm aware that it has often been suggested in these forums, but personally I consider it an unreliable hack (most OS are not configured by default to use two network connections effectively).
If you want a fixed IP address then I suggest that you return to "bridged" mode, dump the NAT adapter, then either reserve an IP address in your router, or give your VM a static IP address that's inside your network subnet range, but outside the range of addresses allocated by the router's DHCP. If you go for the latter then of course it's up to you to avoid conflicts.
As to the second NAT port, I'm aware that it has often been suggested in these forums, but personally I consider it an unreliable hack (most OS are not configured by default to use two network connections effectively).
If you want a fixed IP address then I suggest that you return to "bridged" mode, dump the NAT adapter, then either reserve an IP address in your router, or give your VM a static IP address that's inside your network subnet range, but outside the range of addresses allocated by the router's DHCP. If you go for the latter then of course it's up to you to avoid conflicts.