
When you installed the Guest Additions (as described above), that option should have been enabled. At the top of the "testUbuntu20 - Oracle VM VirtualBox" window, choose View > Auto-resize Guest Display. (optional) To automagically resize the size of the virtual monitor to fill the "testUbuntu20 - Oracle VM VirtualBox" window whenever you stretch or shrink that window,. (Now when you look under "/media/a/", the "Guest Additions CD image" is still there - do I need to do something to "take it out of the (virtual) drive"? If so, how?). The "testUbuntu20" VM currently has the "Powered Off" icon, right? Select the VM, and hit the green arrow "start" icon. Open up the Oracle VM VirtualBox manager. Shut down the virtual machine from the tiny triangle icon in the upper right corner, the power icon, "Power Off" > Power Off > Power Off.
At the top of the "testUbuntu20 - Oracle VM VirtualBox" window, most people find it convenient to enable Devices > Shared Clipboard > Bidirectional.
When there are no errors and the last line of that terminal window says "Press Return to close this window.", click inside that window and press Return. Install the Guest Additions again from the beginning. When the VM starts up again, right-click the CD image on the desktop (if you don't see it, look in the left bar, at the bottom), and Eject. (Earlier advice also recommended installing gcc and make, but apparently they are already included with build-essential). (Earlier advice also recommended installing "dkms" and perl, but apparently that is no longer necessary). Inside the Ubuntu 20 VM, open up a terminal with Ctrl+Alt+T. Please install the gcc make perl packages from your distribution." If that happens, At this point, with a fresh Ubuntu 20.04 LTS install, it typically says "This system is currently not set up to build kernel modules. Ubuntu pops up a new terminal window and takes a minute to install and start up "VirtualBox Guest Additions".
Hey, remember that password we wrote on a sticky note earlier? Type it in and hit the Authenticate button.Would you like to run it?." pop-up window, hit "run". (VirtualBox simulates inserting a CD into the simulated optical drive of the VM, and Ubuntu auto-mounts that CD under "/media/a/").At the top of the "testUbuntu20 - Oracle VM VirtualBox" window, choose Devices > "Insert Guest Additions CD image." Other versions and other hosts should work similarly.) (This was tested on Ubuntu Desktop 20.04 LTS as a guest in VirtualBox-6.1 on a Windows 10 host.
This chapter assumes you already have Ubuntu installed in a VirtualBox virtual machine, perhaps using the process described in VirtualBox/Setting up a Virtual Machine/Ubuntu. Here we install the Guest Additions on an Ubuntu guest system running inside Virtualbox.