Archives For Virtualbox

Virtualbox

This tutorial shows how to mount the VirtualBox virtual disk image in Ubuntu, so you can access the Guest OS file system with read and write permission, if it does not boot.

After misconfigured my VirtualBox Guest OS, it does not longer work. I know how to correct the issue to make it boot again, but firstly accessing to the file system is required!

Since the VBox user manual does not work, here’s what I did in Ubuntu 20.04 host with VirtualBox 6.1.x:

Before getting started, make sure Guest OS is shutdown. And the disk image is not in use. Also UN-MOUNT the disk once the job done.

1.) Firstly open terminal from system application launcher. When it opens, run command:

vboximg-mount --list

vboximg-mount is a utility to make VBox disk images available to the host. With --list, it list all Disk Images as well as the UUID.

In the case, I have all Guest OSes on single Disk Image (.vdi). And the uuid is: “3db5fd91-fd56-46af-a2d2-98cd62b05ea3”

2.) Next perform a FUSE mount of the virtual disk image:

  • First create a folder as mount point, vbox_sysdisk for instance:
    mkdir vbox_sysdisk
  • Then mount it via command (remember to change the UUID to yours):
    vboximg-mount -i 3db5fd91-fd56-46af-a2d2-98cd62b05ea3 -o allow_root vbox_sysdisk

NOTE: You may need to edit the “/etc/fuse.conf” to make the -o allow_root flag work. To do so, run command sudo gedit /etc/fuse.conf and enable (remove # at its beginning) “user_allow_other” line.

3.) As the previous picture shows, I have 5 disk partitions: vol0, vol1, …, vol4. Now mount either partition (vol4 for instance) to /mnt via command:

sudo mount vbox_sysdis/vol4 /mnt

Finally go to /mnt directory and there you are.

Unmount:

To un-mount the guest os file system, run command:

sudo umount /mnt

To un-mount the VBox disk image, run command:

umount ~/vbox_sysdisk

And you may finally remove that folder either from file manager or by running command in terminal:

rm -r ~/vbox_sysdisk

Virtualbox

Running Ubuntu as virtual machine via VirtualBox? You may encounter permission issue to access the shared folder between host and guest.

Shared Folders is an useful feature for file sync between Virtualbox host and guest OSes. However, after you created one, the shared folder is marked with cross and lock icons. And it pops up an error dialog when you trying to open it:

Unhandled error message:
GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Unix process subject does not have uid set.

Or it prompts permission issue while accessing from the left pane in file manager:

You do not have permissions necessary to view the contents of “xxx”

Fix shared folder permission issue:

The shared folder belongs to vboxsf group in the guest. All you need to do is add your user into this group.

There are a few ways to add an user to a group. Here I’m going to do it via a single command:

  1. Firstly, start the virtual machine and login.
  2. Open a terminal window from system app launcher.
  3. When terminal opens, run command to check your username in case you don’t remember:
    whoami
  4. Finally add user to vboxsf group (replace USER_NAME with what printed in last command.):
    sudo adduser USER_NAME vboxsf

Restart VM to apply change and enjoy!

Oracle Virtualbox 5.1.12

Oracle VirtualBox released version 6.1.20 as the tenth update for the 6.1 release series of the open-source virtualization software.

For Linux host and guest, the release added support for both Kernel 5.11 and Kernel 5.12. And the maximum MTU size has been increased to 16110 for host-only adapters on Linux kernels 4.10+.

There are also bug-fixes for Linux guest additions, including vboxvideo module compilation fix for kernel version 5.10.x, and kernel module build fix for RHEL 8.4 beta and CentOS Stream.

Other changes in VirtualBox 6.1.20 include:

  • Fixed extremely poor VM performance depending on the timing of various actions.
  • Fixed guest OS hanging under certain circumstances when Hyper-V is present.
  • Fixed Guru Meditation error when using a nested hypervisor under certain circumstances.
  • Fixed a SMAP related host panic affecting Solaris 11.4 systems with Intel Haswell CPUs or later.
  • Add cloud-init support for export to OCI and for OCI instance creation.
  • Fixed “Delete all files” leaving behind Logs/VBoxUI.log.
  • Multiple audio fixes and enhancements.
  • Fixed detection of duplex audio devices on macOS.
  • Fixed link status reporting for “not attached” adapters.
  • Fixed connectivity issues with e1000 in OS/2 guests.
  • Fixed VxWorks e1000 driver compatibility issue.
  • Fixed GUI checks for port forwarding rules rejecting IPv6 with “Nat Network”.
  • Fixed possible VM hang when using the a serial port in disconnected mode.
  • Fixed interoperability with v4l2loopback and fixed a webcam crash under certain circumstances.
  • Fixed sporadic Windows VM hang or reboot on high CPU load.
  • Allow changing network adapter attachment of a saved VM with “modifyvm”.
  • Fix for argument processing to honor the ‘–root’ option.

How to Install VirtualBox 6.1.20 in Ubuntu:

The official .deb packages are available for download at the link below:

If you’ve already added the Oracle apt repository for Linux, install the updates simply via Software Updater.

Or add the apt repository by running following commands one by one:

1. Open terminal (Ctrl+Alt+T), paste below command and run to add the repository:

sudo sh -c 'echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" >> /etc/apt/sources.list.d/virtualbox.list'

For Linux Mint, you HAVE to replace $(lsb_release -sc) in the command with bionic for Mint 19.x, or xenial for Mint 18.x, or focal for Linux Mint 20.

2. Then download and install the repository key via command:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

3. Refresh system package cache via command:

sudo apt update

4. Finally install Virtualbox 6.1:

sudo apt install virtualbox-6.1

Uninstall:

To remove it, simply run command in terminal:

sudo apt remove --autoremove virtualbox-6.1

And go to Software & Updates -> Other Software to remove apt repositories.

Virtualbox

Oracle VirtualBox 6.1.16 was released as a new maintenance release with Kernel 5.9 support for Linux host and guest.

Virtualbox 6.1.16 changelog:

  • Fixed random memory corruption and XMM register state corruption inside the VM when Hyper-V is used
  • Fixed VMSVGA 3D support with Linux guests when Hyper-V is used
  • Fixed some Qt related crashes on macOS Big Sur
  • Fixed network integration not working behind some proxies
  • Mask out remote wake capability to avoid unresponsive devices
  • Fixed issues with audio playback after host goes to sleep
  • Keep transferring data if the status line monitoring fails
  • Fixed blocking a re-connect when TCP mode is used
  • Fixed inability of guests to use the last timer
  • Fixed detection of system locale when running ‘VBoxManage unattended install’ without –locale
  • macOS host: Installer on Big Sur is now reminding user that system has to be rebooted to load the installed KEXTs
  • Support kernel version 5.9
  • Linux guest: Workaround to improve resizing of 32-bit VMs with VMSVGA graphics controller, and do not try to use RandR version 1.3 due to bugs causing the X server to hang
  • Linux guest: Fixed VBoxService crashing in the CPU hot-plug service under certain circumstances during a CPU hot-unplug event.
  • Fixed Guest additions build for RHEL 8.3 beta

How to Install VirtualBox 6.1.16 in Ubuntu:

The official .deb packages are available for download at the link below:

Download VirtualBox

If you’ve already added the Oracle apt repository for Linux, install the updates simply via Software Updater.

Or add the apt repository by running following commands one by one:

1. Open terminal (Ctrl+Alt+T), paste below command and run to add the repository:

sudo sh -c 'echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" >> /etc/apt/sources.list.d/virtualbox.list'

For Linux Mint, you HAVE to replace $(lsb_release -sc) in the command with bionic for Mint 19.x, or xenial for Mint 18.x, or focal for Linux Mint 20.

2. Then download and install the repository key via command:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

3. Refresh system package cache via command:

sudo apt update

4. Finally install Virtualbox 6.1:

sudo apt install virtualbox-6.1

Uninstall:

To remove it, simply run command in terminal:

sudo apt remove --autoremove virtualbox-6.1

And go to Software & Updates -> Other Software to remove apt repositories.

Oracle virtualbox 5.0

Oracle Virtualbox 6.1.10 was released as the fifth maintenance release for the 6.1 series.

Virtualbox 6.1.10 features Kernel 5.7 support on Linux host and guest. Other changes include:

  • Fixed crash when using Qt on Xwayland sessions
  • Fixed mouse pointer doesn’t work properly in Windows guests when scaling is on.
  • Fixed crash of ‘VBoxManage internalcommands repairhd’ when processing invalid input
  • Disable audio input and audio output by default for new VMs
  • Fixed resizing and multi monitor handling for Wayland guests.
  • Fixed VBoxClient error: The parent session seems to be non-X11.

How to Install VirtualBox 6.1.10 in Ubuntu:

The official .deb packages are available for download at the link below:

Download VirtualBox

If you’ve already added the Oracle apt repository for Linux, install the updates simply via Software Updater.

Or add the apt repository by running following commands one by one:

1. Open terminal (Ctrl+Alt+T), paste below command and run to add the repository:

sudo sh -c 'echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" >> /etc/apt/sources.list.d/virtualbox.list'

For Linux Mint, you HAVE to replace $(lsb_release -sc) in the command with bionic for Mint 19.x, or xenial for Mint 18.x.

2. Then download and install the repository key via command:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

3. Refresh system package cache via command:

sudo apt update

4. Finally install Virtualbox 6.1:

sudo apt install virtualbox-6.1

Uninstall:

To remove it, simply run command in terminal:

sudo apt remove --autoremove virtualbox-6.1

And go to Software & Updates -> Other Software to remove apt repositories.