Useful and lesser-known features of VirtualBox
Back to Square One
An alternative to Multiple Connect is the Shared type. This type works on the same principle, but VirtualBox creates a fresh differential image each time the virtual machine is restarted. The changes made by the virtual machine and all files created are lost each time the virtual machine is restarted. The Shared type can only be assigned to image files that do not grow dynamically.
If you are using snapshots and you do not want VirtualBox to store the disk image in the current snapshot, you can set the Type to Copy. If you set the Type to Immutable instead, VirtualBox enables write protection. But be careful: The guest system can still change the data of the hard disk image. However, when you restart the virtual machine, VirtualBox restores the image to its original state.
Data you previously thought you stored is then lost. In the background, VirtualBox uses differential images, which it deletes each time the virtual machine is restarted. The Immutable type is therefore only of interest in special cases, such as on publicly accessible computers or on PCs in training rooms, where you want to automatically restore the system to its original state after use.
If an error message appears when you change the type, the disk image is most likely still in use – or it belongs to a snapshot. In these cases, you first need to share the image or delete the snapshots.
Integrated Applications
You can also bring the windows running on a virtual machine to the desktop. VirtualBox calls this mode Seamless Mode, but it can only be enabled if you installed the Guest Additions on the virtual machine and are running Windows or a Linux system with X11 as a guest.
In this case, you need to press the Host key and L. VirtualBox then inflates the virtual machine to the screen size and hides the background of the guest system. To exit this mode, press Host+L again.
On My Command!
VirtualBox comes with the VBoxSDL command-line tool. VBoxSDL starts a virtual machine in a simple window. The VirtualBox developers only used the tool for internal tests of their own work, which is why they do not officially support it. However, it can be useful if you want to start the virtual machine from a script or if you don't want the virtual machine users to interfere with the configuration. To start a virtual machine, pass VBoxSDL the name of the virtual machine in the --startvm
parameter (Listing 1, line 1).
Listing 1
VirtualBox from the Command Line
As an alternative to the graphical user interface, the virtual machines can be managed with the VBoxManage command-line tool. Like VBoxSDL, VBoxManage offers the advantage that it is suitable for use in your own scripts. In addition, the tool gives you access to some functions that the VirtualBox Manager itself does not offer. To start a virtual machine with VBoxManage, pass the startvm
command and the name of the virtual machine to the tool (Listing 1, line 2).
Instead of the name, you can enter the unique identification number (UUID) of the virtual machine. The list
command (Listing 1, line 3) reveals which virtual machine has which UUID. Information about a virtual machine is returned by showvminfo
(line 4). The virtual machine can also be stopped (line 5), resumed (line 6), restarted (line 7), and turned off (line 8). The restart and shutdown actions correspond to pressing the reset button or unplugging the power plug. If you want to shut down the virtual machine in a controlled manner, send an appropriate ACPI command to the guest (line 9).
VBoxManage also provides the ability to create new virtual machines and customize the configuration of existing machines. The commands required for this don't just look complex and cumbersome, they are. If you don't have scripts to group them, you can put a new machine together far faster in the graphical user interface.
VBoxManage is happily faster when it comes to exporting (listing 1, line 10) and importing (line 11) a virtual machine and its settings to or from a hard disk image.
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.
-
Plasma Desktop Will Soon Ask for Donations
The next iteration of Plasma has reached the soft feature freeze for the 6.2 version and includes a feature that could be divisive.
-
Linux Market Share Hits New High
For the first time, the Linux market share has reached a new high for desktops, and the trend looks like it will continue.
-
LibreOffice 24.8 Delivers New Features
LibreOffice is often considered the de facto standard office suite for the Linux operating system.
-
Deepin 23 Offers Wayland Support and New AI Tool
Deepin has been considered one of the most beautiful desktop operating systems for a long time and the arrival of version 23 has bolstered that reputation.