
This article explains how to install the VirtualBox guest additions in an Ubuntu 22.04 virtual machine. Besides automatically adjusting the screen resolution, you also get support for a bi-directional clipboard and shared folders. If you need to change the guest-assigned IP range for some reason, please refer to Section 9.11, “Fine-tuning the VirtualBox NAT engine”.Bummed that you can’t change the screen resolution in your freshly installed Ubuntu virtual machine? An easy fix exists for this: You just need to install the VirtualBox guest additions in your Ubuntu 22.04 VirtualBox virtual machine. As more than one card of a virtual machine can be set up to use NAT, the first card is connected to the private network 10.0.2.0, the second card to the network 10.0.3.0 and so on. The IP address thus assigned to the virtual machine is usually on a completely different network than the host. The virtual machine receives its network address and configuration on the private network from a DHCP server integrated into VirtualBox. To your original Q, it is only VirtualBox that knows about the guest's simulated address: VirtualBox listens for replies to the packages sent, and repacks and resends them to the guest machine on its private network. To an application on the host, or to another computer on the same network as the host, it looks like the data was sent by the VirtualBox application on the host, using an IP address belonging to the host.


The network frames sent out by the guest operating system are received by VirtualBox's NAT engine, which extracts the TCP/IP data and resends it using the host operating system. the IP chain' it's VirtualBox, not the host as such, that does this: FOR NAT MODE (per comments) from the manual subsection on NAT mode virtual networking
