Skip to content

Oracle VM VirtualBox

VirtualBox is a free, general-purpose virtual machine (VM) provided by Oracle for Windows, Mac and Linux. Virtual machines allow you to create isolated environments on the same computer which emulate or 'virtualize' different operating systems. This allows you to run different operating systems simultaneously and utilise software from one that wouldn't ordinarily be accessible from another.

VirtualBox is a 'hosted' or 'type 2 hypervisor' which requires an existing operating system to be installed. This contrasts with a 'bare-metal' or 'type 1' hypervisor which runs directly on the specified hardware. With VirtualBox the 'guest OS' can be independently paused, restarted, copied and backed up without impacting operation of the 'host OS'. By taking 'snapshots' of the VM a user can save its state and revert back to that state if something goes wrong. This enables them to simulate and experiment with different computing environments safely and securely without compromising the host.

Personal Experience

My main use of VirtualBox is to test and run Linux distributions with graphical user interfaces like Ubuntu or Kali on a Windows computer. For developing and testing embedded applications with Linux, using Docker Containers can be more lightweight than running a full VM.

Tools & Software Integrations

N/A

  • VirtualBox 7.0.0 Oracle VM VirtualBox Extension Pack - When installing VirtualBox it can be advantageous to also install the VirtualBox Extension Pack. This enhances the functionality of the VM with features like enhanced encryption, remote display access and the ability to access peripherals on the host system like webcams.

Resources

N/A

Notes and Troubleshooting

Ubuntu Desktop Doesn't Resize with the VirtualBox Window

To have the guest Ubuntu desktop scale match the size of the surrounding VirtualBox host window install VirtualBox Guest Additions. These include device drivers and system applications that optimize the guest operating system for better performance and usability.

  1. Start the virtual machine and login to Ubuntu.
  2. Open a terminal.
  3. Update currently installed packages:
sudo apt update && sudo apt upgrade
  1. Enter password if prompted.
  2. Add the VirtualBox Guest Additions build dependencies:
sudo apt install -y build-essential linux-headers-$(uname -r)
  1. Close the terminal.
  2. Click 'Devices' in the VirtualBox window menu.
  3. Select 'Insert Guest Additions CD image'.
  4. In Ubuntu click on the CD icon which appears on the dock menu panel.
  5. Right click within the new file manager window and select 'Open in Terminal'.
  6. Run the script autorun.sh:
./autorun.sh
  1. Enter your password when prompted.
  2. Press 'Return' when prompted.
  3. Restart Ubuntu.
  4. Right click on the CD icon and select 'Eject' to remove it when resizing is working.

Source: https://youtu.be/v1JVqd8M3Yc

Ubuntu Desktop Turns Black when the VirtualBox Window is Resized

  • Open the virtual machine's settings in VirtualBox.
  • Click on the 'Display' tab.
  • Change the video memory to 128 MB.
  • Change the graphics controller to VMSVGA from the display tab in the settings of the virtual machine.

Source: https://blog.ldtalentwork.com/2022/02/28/how-to-fix-the-ubuntu-black-screen-issue-in-virtualbox/