The virtual processor corresponds to the host's actual processor. This is different from
QEMU where the processor is emulated (or imitated).
Some command line examples
VirtualBox can be configured from the command line.
Starting and shutting down a virtual machine
The following command starts a
virtual machine whose name is
lnx. lnx needs to be either in powered-off or saved state.
VBoxManage startvm lnx
After starting the virtual machine, it probably needs to be resumed:
VBoxManage controlvm lnx resume
The virtual machine can be shut down the hard way:
VBoxManage controlvm lnx poweroff
Remove hard disk, DVD or floppy image
A hard-disk, DVD or floppy image can be removed from the the media registry like so. With --delete
, the associated files will also be removed.
VBoxManage closemedium [disk|dvd|floppy] <uuid|filename> [--delete]
Adding a custom screen resolution
It seems that, at least when running on a Windows host, the virtual box only has some predefined screen resolutions: 1600x1200, 1280x1024, 1152x864, 1024x768 and 800x600.
These predefined resolutions can be extended with a
custom video mode . First, the
virtual machine must be stopped. Then (within
cmd.exe),
VBoxManage.exe
can be executed:
"c:\Program Files\Oracle\VBoxManage.exe" setextradata "VIRTUAL BOX NAME HERE" CustomVideoMode 1600x900x32
Arch Linux
Apparently, under
Arch Linux, VirtualBox is loaded through/via/by the
vboxdrv
kernel module which must be loaded before any virtual machine can run.
This modules is installed with
sudo pacman -S virtualbox
and then loaded with
The user who wants to use the VirtualBox must be member of the vboxusers
group:
gpasswd -a $USER vboxusers
Apparently, the executable to start the VirtualBox, virtualbox
, must be installed separately:
sudo pacman -S virtualbox
TODO: Apparently, it cannot hurt to also install virtualbox-guest-iso
.
TODO: does it also need sudo pacman -S virtualbox-host-modules-arch
?
Windows / Hyper-V
As per some comments that I found in the vast depths of the Internet, VirtualBox cannot be run on
Windows 10 if
Hyper-V is active because Hyper-V does not release
VT-x once it has acquired it.
Apparently though, VirtualBox and VMWare can coexist.
However, at least with VirtualBox version six, there seems to be an experimental feature where VirtualBox detects
Hyper-V and uses it if it finds it. Such a configuration is indicated by a CPU icon in the VM window status bar.
Apparently, the interaction with Hyper-V leads to performance degradation.
An advantage of VirtualBox over Hyper-V is that it is free and also runs on a Windows home edition.
Auto Capture Keyboard
When Auto Capture Keyboard is enabled, it causes the Virtual Machine to automatically capture the keyboard every time the VM window is activated and make it unavailable to other application running (for example Alt-Tab).
This feature can be enabled or disabled in the Virtual Machine Manager's Menu Preferences -> Input -> Keyboard -> Keyboard Settings.
TODO
VboxSDS is the process (service) that monitors a guest's system resources (
VBoxManage.exe metrics
). This process/services ends shortly after all VMs and frontends have been closed.
PS C:\> (get-service VBoxSDS).displayName
VirtualBox system service
/dev/vboxuser
and /dev/vboxguest
/proc/irq/n/vboxvideo
and /proc/irq/n/vboxguest
/sys/kernel/debug/printk/index/vboxvideo
and /sys/kernel/debug/printk/index/vboxguest
-` /sys/class/misc/vboxuser
and /sys/class/misc/vboxguest
/sys/devices/virtual/misc/vboxuser
and /sys/devices/virtual/misc/vboxguest
/sys/bus/pci/drivers/vboxvideo
and /sys/bus/pci/drivers/vboxguest
/sys/module/drm_kms_helper/holders/vboxvideo
, /sys/module/drm_vram_helper/holders/vboxvideo
/sys/module/vboxvideo
and /sys/module/vboxguest
After installing Windows 10 in a guest, it turned out that some web pages (with WebGL?) were sluggish.
By enabling 3D acceleration, this problem went away:
VBoxManage modifyvm $VBNAME --accelerate3d on
However, with accelerated 3D, the start menu and the taskbar became transparent so that the text could not be read anymore.
So, «Windows transparency» must be disabled:
$null = set-itemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize -name EnableTransparency -type dWord -value 0