VirtualBox Setup

Some Personal Preferences and Troubleshooting

Updated: 03 September 2023

VirtualBox Bugs

Guest Additions

If anything like shared clipboard, screen resizing, and shared folders doesn’t work be sure to do the VirtualBox Guest Additions CD, the link to install this can be found in Devices > Insert Guest Additions CD... and then insert and install that.

If you encounter the following error:

1
Verifying archive integrity... All good.
2
Uncompressing VirtualBox 5.2.12 Guest Additions for Linux........
3
VirtualBox Guest Additions installer
4
Copying additional installer modules ...
5
Installing additional modules ...
6
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
7
This system is currently not set up to build kernel modules.
8
Please install the gcc make perl packages from your distribution.
9
VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted
10
VirtualBox Guest Additions: Starting.
11
Press Return to close this window...

You will need to run the following commands

Terminal window
1
sudo apt-get update
2
sudo apt-get install build-essential gcc make perl dkms
3
reboot

And then Resinstall the Guest Additions CD

SSH into Guest from Host

The instructions are from this Stackoverflow post

On your Host, go to VM > Settings > Network and ensure that it is set to NAT, then click on Advanced > Port Forwarding and add a new Rule, make the rule Name ssh and set the Host Port to 3022, leave the rest blank

Also be sure to install an SSH server on the VM with

Terminal window
1
sudo apt-get install openssh-server

And finally SSH into the VM with

Terminal window
1
ssh -p 3022 user@127.0.0.1

where user is the VM username

Port Forwarding

VirtualBox lets you do Port Forwarding simply by going to VM > Settings > Network > Advanced > Port Forwarding