VirtualBox is a virtualizer for x86 and amd64/intel64 hardware, that is, it allows one to run a guest operating system under a host operating system. On this page the focus is on Debian GNU/Linux as the guest operating system.
If you have problems getting VirtualBox to work, an open-source alternative is QEMU, which I haven’t tried. Another alternative for Linux is KVM. Another alternative is VMWare Workstation Player, which is a commercial product that is free of charge for personal non-commercial use. It is available for MS Windows and for Linux; VMWare Fusion is available for the Mac but is not free of charge.
Windows Subsystem for Linux is another possibility for running Linux applications under MS Windows. It is available under Windows 10. It is intended mainly for developers, and apparently there are (or were) stability problems when using graphics.
VirtualBox is not included in Debian 9 (Stretch) but
can be installed from
or directly from
This page mostly assumes that the guest operating system is Linux.
In the VirtualBox Manager, do
Debian-11-64, or whatever you like).
In the next windows:
If you immediately get a
Segmentation fault error message
when you try to run a programme in a guest operating system,
you may need to
increase the amount of memory
allocated to the virtual machine. The amount of memory
can be changed by shutting down the virtual machine and doing
.vdifile with a default location under a directory called
VirtualBox VMsin your home directory.
The virtual disk doesn’t normally have to be very big because your data files and other non-system files can be (and usually should be) stored directly in the file system of the host operating system (see Sharing below), so in most cases you can accept the default size of 8 GB, or perhaps set it to 10 GB for extra leeway. However, if you need to install a lot of software or big software (e.g., finite-element software) on the virtual disk, you should create a larger disk. If you have lots of free disk space, you may want to create a somewhat larger virtual disk just so it doesn’t gradually fill up over time.
It is non-trivial but possible to later increase the size of the virtual disk (see Resizing below).
Files can be extracted from a
.vdi file using
Display, for the graphics controller there is a choice between VBoxVGA and newer VBoxSVGA (for Windows guests) or VMSVGA (for Linux guests). As of 2019 Apr, the default VMSVGA for Linux guests was buggy (or at least my software didn’t work properly with it) so VBoxVGA needed to be selected. As of 2020 Jun 15, my software seems to work with VMSVGA. As of 2020 Aug 29, the use of VMSVGA causes an error message saying
Failed to send host log message
When a new virtual machine is started the first time, you will be prompted
for the location of a virtual or physical optical drive from which to
boot or install the guest operating system. For example,
browse to where you’ve downloaded and stored a
.iso image file
on your host computer.
Follow the usual installation procedure for the guest operating system. If you plan to use AudiLab software, follow this installation procedure. Then install the VirtualBox Guest Additions.
Guest Additions are additions to the operating system that has been installed as a VirtualBox guest. The additions provide important features such as access to directories and files on the host from within the guest operating system; mouse pointer integration; shared clipboard and drag-and-drop between host and guest; automatic resizing of the guest desktop when its host window is resized; and ‘seamless’ mode (in the guest). Guest Additions may be necessary for proper functioning of the mouse and keyboard when the host operating system is macOS.
To make sure you have the required packages for adding the Guest Additions,
open a terminal window
in the virtual (guest) machine
Give the command
sudo apt install make gcc dkms build-essential perl
Enter your password when requested, to enable
then type Y and Enter when asked
whether to continue or not.
(These packages may not be available to you if you have not specified a download mirror in your
The architecture specification
in the package name
may not be appropriate for you.
The output of the command
uname -r can be used
in place of
amd64 in the package name.
Once you’ve installed these packages, it may be necessary to restart the virtual machine before doing the next step.
A procedure (the best one?) for installing Guest Additions in a Linux
If a virtual CD called something like
doesn’t already appear on the desktop
of the the Linux guest, then
in the VirtualBox window of the running guest machine do
; if you see a message
click on .
To ensure that no disk is present in the virtual optical drive,
you can shut down the virtual machine by doing
VirtualBox menu, or
in the Linux menu.
Then in the VirtualBox Manager window,
under ensure that it says
if it doesn't, click on
and use ,
then restart the guest machine.
A virtual CD should appear
in the menu
and possibly on the desktop.
If that doesn't work, try
You should see
as ‘Attached’; select it and
click on .
If necessary, click on
If a window pops up saying
You have just inserted a medium … Choose what
application to launch., you can just select
click on .
In a terminal window
If that doesn’t work, you can determine the correct directory for the guest additions by double-clicking on the CD icon on your desktop. For example, you may need to do something like
Once you’re in the correct directory, do
sudo sh ./VBoxLinuxAdditions.run
and wait while it works. Check the output carefully to determine whether the process was successful or not.
After successful completion of
restart the guest machine. One method is to give the command
sudo shutdown -r now.
Alternatively, do then restart the guest machine.
The Guest Additions must have been installed.
To add a shared folder:
Powered Off, select it in the column at the left in the
Folder Pathof the drive or folder that you want to share and select it.
Folder Name(i.e., a ‘share name’) or specify a new one.
Folder Pathand keep the default
Users/directory and use
Hostas the name.
mkdircommand to create an empty directory that will be used as the ‘mount point’. For example, in your home directory:
sudobecause it requires root privileges) to manually mount the shared drive at the mount point. For example,
sudo mount -t vboxsf C_DRIVE HostCunder MS Windows
sudo mount -t vboxsf Users Hostunder Mac OS
bin/in your Linux home directory and edited to match your setup.
vboxsfgroup. This can be done with the command
sudo usermod -a -G vboxsf username
usernameis replaced by the user name you’ve defined for yourself. You need to logout of the guest machine and log back in for this to take effect. You can use the
groupscommand to check that
vboxsfis listed among your groups. If it is not, waiting for 20 seconds or so may help, or you may need to shut down the guest machine and start it up again (ref).
/mediaas something like
/media/sf_C_DRIVE. For convenience, you can define a ‘symbolic link’ in your home directory with a command something like
ln -s /media/sf_C_DRIVE HostC
HostCin your home directory.
HostC, so when browsing for files in that software it will be necessary to use the path
The Guest Additions must have been installed.
To enable the sharing of clipboards between guest and host, do. Under select or one of the other options. You can also enable between guest and host here.
CD’s and DVD’s are made available to the guest operating system
Oracle VM VirtualBox Manager window and using
Oracle VM VirtualBox window of a running guest operating system.
Real disks can be used in the host’s physical CD/DVD drive,
and .iso files can be used as virtual disks.
Under Windows 7, VirtualBox makes a network connection that appears,
at least in my case, as an
Unidentified network that is
shown as having no network access but which works fine. In one case,
after upgrading VirtualBox the network connection did not work. I
fixed it by disconnecting and reconnecting the network using
See this overview of networking in VirtualBox. There are more details in virtual-networking chapter of the VirtualBox manual.
The guest machine can be powered off using. The three options are provided:
It is possible to increase (but not decrease) the size of an existing virtual disk (e.g., refs 1, 2, 3). The following instructions are for VirtualBox 6.1. They make a lot of assumptions and ignore a lot of alternatives.
.isoCD image file to download.
.isofile that you downloaded (e.g.,
gparted-live-1.1.0-5-amd64.iso. Click and then .
VBoxGuestAdditions.iso), the click on the CD icon (at the right in the section) and select the GParted
.isothat is listed in the pop-up menu. The name of that
.isofile should now appear under . Click on .
sda1) and a 2-GB swap partition (
sda2). We could create a new partition to use the newly available space. However, since the swap partition doesn’t contain anything valuable, it’s easy to work around it and extend the
sda1partition. The swap partition can be deleted (delete
sda5first and then
sda2) and then recreated after
sda1has been extended. (The newly created partitions will get temporary names until you actually apply your changes, at which point they’ll get names of the form
Alternatively, the swap partition can be moved
to the end of the disk by (1) extending
to the end of the disk; (2) moving
sda5 to the
sda2; and then (3) resizing
by moving its start up against the start of
To avoid small 1- and 2-MB bits of unused space, and also avoid
certain error messages, the partition alignment can be changed
sda1 except to
As you specify changes, they’ll be listed at the bottom of the GParted window, and they can be undone. Once everything looks right, click on the green checkmark icon to apply the changes. Before you do that, convince yourself that you’ve backed up anything on the virtual disk that you don’t want to lose, in case something goes wrong.
A start job is running for /dev/disk/by-uuid/…
sudo swapon -s(or
sudo swapon --show)
sudo blkid | grep swap
more /etc/fstab|grep swap
/etc/fstab. First make a backup copy using the command
sudo cp -p /etc/fstab /etc/fstab_old
sudo nano /etc/fstab
nano, saving the modified file. Hopefully the delay when rebooting will no longer happen.
As of 2015 Mar 29 I have a problem with my Windows 7 running out of
memory and requiring me to shut down applications.
It’s probably related to this
Wacom forum posting (dated 2014 Nov 19) about a memory leak in
the Wacom Bamboo driver when VirtualBox is running, even if the
device isn’t being used. At this moment, for example, Pen_Tablet.exe
has a Working Set size of ~1.8 GB and growing.
The problem seems to have arisen for me only in the past few weeks.
With the Task Manager I cannot directly kill
the process Pen_Tablet.exe, nor stop the service TabletServicePen directly
by right-clicking, but I could stop it by using the
button, at which point the memory was released.