Upon installing Oracle VirtualBox on Ubuntu we can see the installation directories (use something like $ sudo find / -name "*VirtualBox*" to find all affected locations):
/root/.config/VirtualBox
/root/.config/VirtualBox/VirtualBox.xml
/root/.config/VirtualBox/VirtualBox.xml-prev
/home/bojan/.config/VirtualBox
/home/bojan/.config/VirtualBox/VirtualBox.xml
/home/bojan/.config/VirtualBox/VirtualBox.xml-prev
/usr/lib/python2.7/dist-packages/vboxapi/VirtualBox_constants.pyc
/usr/lib/python2.7/dist-packages/vboxapi/VirtualBox_constants.py
/usr/lib/virtualbox/VirtualBoxVM.so
/usr/lib/virtualbox/components/VirtualBox_XPCOM.xpt
/usr/lib/virtualbox/VirtualBoxVM
/usr/lib/virtualbox/VirtualBox
/usr/share/doc/virtualbox-6.0/VirtualBox.chm
/usr/share/virtualbox/nls/VirtualBox_da.qm
/usr/share/virtualbox/nls/VirtualBox_th.qm
/usr/share/virtualbox/nls/VirtualBox_en.qm
...
/usr/share/virtualbox/nls/VirtualBox_fa.qm
/usr/share/virtualbox/nls/VirtualBox_ko.qm
/usr/share/virtualbox/nls/VirtualBox_tr.qm
/usr/bin/VirtualBoxVM
/usr/bin/VirtualBox
If we create VM named "Win10 pro" VirtualBox will create two files:
- Win10 pro.vbox - XML file with settings such as the virtual machine name, OS type, system memory
- Win10 pro.vbox-prev - backup of the file contents prior to the most recent save. If the file is saved again then the vbox-prev file will be deleted, the existing vbox will be renamed to vbox-prev, and a new vbox will be written.
- Win10 Pro.vdi - virtual disk image; stores all contents for a virtual disk
Main config file is:
$ cat /home/bojan/.config/VirtualBox/VirtualBox.xml
<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.12-linux">
<Global>
<ExtraData>
<ExtraDataItem name="GUI/Details/Elements" value="general,system,preview,display,storage,audio,network,usb,sharedFolders,description"/>
<ExtraDataItem name="GUI/GroupDefinitions/" value="go=Win 10"/>
<ExtraDataItem name="GUI/GroupDefinitions/Win 10" value="m=e4b15bdf-c6d7-4d18-b301-1c4501900eba"/>
<ExtraDataItem name="GUI/HideDescriptionForWizards" value="CloneVM"/>
<ExtraDataItem name="GUI/LastItemSelected" value="m=Win10 pro"/>
<ExtraDataItem name="GUI/LastWindowPosition" value="363,507,1853,1023"/>
<ExtraDataItem name="GUI/SnapshotManager/Details/Expanded" value="true"/>
<ExtraDataItem name="GUI/SplitterSizes" value="612,1240"/>
<ExtraDataItem name="GUI/Tools/LastItemsSelected" value="Welcome,Snapshots"/>
<ExtraDataItem name="GUI/UpdateCheckCount" value="5"/>
<ExtraDataItem name="GUI/UpdateDate" value="1 d, 2019-12-13, stable, 6.0.4"/>
</ExtraData>
<MachineRegistry>
<MachineEntry uuid="{e4b15bdf-c6d7-4d18-b301-1c4501900eba}" src="/home/bojan/dev/vm/Win10 pro.vbox"/>
</MachineRegistry>
<NetserviceRegistry>
<DHCPServers>
<DHCPServer networkName="HostInterfaceNetworking-vboxnet0" IPAddress="192.168.xxx.xxx" networkMask="255.255.255.0" lowerIP="192.168..xxx.xxx" upperIP="192.168..xxx.xxx" enabled="1"/>
</DHCPServers>
</NetserviceRegistry>
<SystemProperties defaultMachineFolder="/home/bojan/VirtualBox VMs" defaultHardDiskFormat="VDI" VRDEAuthLibrary="VBoxAuth" webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3" proxyMode="0" exclusiveHwVirt="true"/>
<USBDeviceFilters/>
</Global>
</VirtualBox>
../Snapshots $ ls
{619a9085-0295-4f5b-a6a8-50680e051442}.vdi
{6427b873-0f4c-4597-a362-f717f6b23ec1}.vdi
...
{f51b69c4-8da7-42fb-b0d8-a6f9217bf726}.vdi
To find out the information about snapshot, select it in UI, right click and choose "Properties":
As we can see, information about UUID is not provided. To find out UUID that matches snapshot name we'll need to use one of the command line tools that comes with VirtualBox.
$ vbox
vboxautostart vboxconfig vboxmanage
vboxballoonctrl vboxheadless vboxsdl
vboxbugreport vbox-img vboxwebsrv
The main tool is vboxmanage:
$ vboxmanage --help
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.15.0-72-generic) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
Oracle VM VirtualBox Command Line Management Interface Version 6.0.4
(C) 2005-2019 Oracle Corporation
All rights reserved.
Usage:
VBoxManage [<general option>] <command>
General Options:
[-v|--version] print version number and exit
[-q|--nologo] suppress the logo
[--settingspw <pw>] provide the settings password
[--settingspwfile <file>] provide a file containing the settings password
[@<response-file>] load arguments from the given response file (bourne style)
Commands:
list [--long|-l] [--sorted|-s] vms|runningvms|ostypes|hostdvds|hostfloppies|
intnets|bridgedifs|hostonlyifs|natnets|dhcpservers|
hostinfo|hostcpuids|hddbackends|hdds|dvds|floppies|
usbhost|usbfilters|systemproperties|extpacks|
groups|webcams|screenshotformats|cloudproviders|
cloudprofiles
showvminfo <uuid|vmname> [--details]
[--machinereadable]
showvminfo <uuid|vmname> --log <idx>
registervm <filename>
unregistervm <uuid|vmname> [--delete]
createvm --name <name>
[--groups <group>, ...]
[--ostype <ostype>]
[--register]
[--basefolder <path>]
[--uuid <uuid>]
[--default]
modifyvm <uuid|vmname>
[--name <name>]
[--groups <group>, ...]
[--description <desc>]
[--ostype <ostype>]
[--iconfile <filename>]
[--memory <memorysize in MB>]
[--pagefusion on|off]
[--vram <vramsize in MB>]
[--acpi on|off]
[--pciattach 03:04.0]
[--pciattach 03:04.0@02:01.0]
[--pcidetach 03:04.0]
[--ioapic on|off]
[--hpet on|off]
[--triplefaultreset on|off]
[--apic on|off]
[--x2apic on|off]
[--paravirtprovider none|default|legacy|minimal|
hyperv|kvm]
[--paravirtdebug <key=value> [,<key=value> ...]]
[--hwvirtex on|off]
[--nestedpaging on|off]
[--largepages on|off]
[--vtxvpid on|off]
[--vtxux on|off]
[--pae on|off]
[--longmode on|off]
[--ibpb-on-vm-exit on|off]
[--ibpb-on-vm-entry on|off]
[--spec-ctrl on|off]
[--l1d-flush-on-sched on|off]
[--l1d-flush-on-vm-entry on|off]
[--nested-hw-virt on|off]
[--cpu-profile "host|Intel 80[86|286|386]"]
[--cpuid-portability-level <0..3>
[--cpuid-set <leaf[:subleaf]> <eax> <ebx> <ecx> <edx>]
[--cpuid-remove <leaf[:subleaf]>]
[--cpuidremoveall]
[--hardwareuuid <uuid>]
[--cpus <number>]
[--cpuhotplug on|off]
[--plugcpu <id>]
[--unplugcpu <id>]
[--cpuexecutioncap <1-100>]
[--rtcuseutc on|off]
[--graphicscontroller none|vboxvga|vmsvga|vboxsvga]
[--monitorcount <number>]
[--accelerate3d on|off]
[--accelerate2dvideo on|off]
[--firmware bios|efi|efi32|efi64]
[--chipset ich9|piix3]
[--bioslogofadein on|off]
[--bioslogofadeout on|off]
[--bioslogodisplaytime <msec>]
[--bioslogoimagepath <imagepath>]
[--biosbootmenu disabled|menuonly|messageandmenu]
[--biosapic disabled|apic|x2apic]
[--biossystemtimeoffset <msec>]
[--biospxedebug on|off]
[--boot<1-4> none|floppy|dvd|disk|net>]
[--nic<1-N> none|null|nat|bridged|intnet|hostonly|
generic|natnetwork]
[--nictype<1-N> Am79C970A|Am79C973|
82540EM|82543GC|82545EM|
virtio]
[--cableconnected<1-N> on|off]
[--nictrace<1-N> on|off]
[--nictracefile<1-N> <filename>]
[--nicproperty<1-N> name=[value]]
[--nicspeed<1-N> <kbps>]
[--nicbootprio<1-N> <priority>]
[--nicpromisc<1-N> deny|allow-vms|allow-all]
[--nicbandwidthgroup<1-N> none|<name>]
[--bridgeadapter<1-N> none|<devicename>]
[--hostonlyadapter<1-N> none|<devicename>]
[--intnet<1-N> <network name>]
[--nat-network<1-N> <network name>]
[--nicgenericdrv<1-N> <driver>
[--natnet<1-N> <network>|default]
[--natsettings<1-N> [<mtu>],[<socksnd>],
[<sockrcv>],[<tcpsnd>],
[<tcprcv>]]
[--natpf<1-N> [<rulename>],tcp|udp,[<hostip>],
<hostport>,[<guestip>],<guestport>]
[--natpf<1-N> delete <rulename>]
[--nattftpprefix<1-N> <prefix>]
[--nattftpfile<1-N> <file>]
[--nattftpserver<1-N> <ip>]
[--natbindip<1-N> <ip>
[--natdnspassdomain<1-N> on|off]
[--natdnsproxy<1-N> on|off]
[--natdnshostresolver<1-N> on|off]
[--nataliasmode<1-N> default|[log],[proxyonly],
[sameports]]
[--macaddress<1-N> auto|<mac>]
[--mouse ps2|usb|usbtablet|usbmultitouch]
[--keyboard ps2|usb
[--uart<1-N> off|<I/O base> <IRQ>]
[--uartmode<1-N> disconnected|
server <pipe>|
client <pipe>|
tcpserver <port>|
tcpclient <hostname:port>|
file <file>|
<devicename>]
[--uarttype<1-N> 16450|16550A|16750
[--lpt<1-N> off|<I/O base> <IRQ>]
[--lptmode<1-N> <devicename>]
[--guestmemoryballoon <balloonsize in MB>]
[--audio none|null|oss|alsa|pulse]
[--audioin on|off]
[--audioout on|off]
[--audiocontroller ac97|hda|sb16]
[--audiocodec stac9700|ad1980|stac9221|sb16]
[--clipboard disabled|hosttoguest|guesttohost|
bidirectional]
[--draganddrop disabled|hosttoguest|guesttohost|
bidirectional]
[--vrde on|off]
[--vrdeextpack default|<name>
[--vrdeproperty <name=[value]>]
[--vrdeport <hostport>]
[--vrdeaddress <hostip>]
[--vrdeauthtype null|external|guest]
[--vrdeauthlibrary default|<name>
[--vrdemulticon on|off]
[--vrdereusecon on|off]
[--vrdevideochannel on|off]
[--vrdevideochannelquality <percent>]
[--usbohci on|off]
[--usbehci on|off]
[--usbxhci on|off]
[--usbrename <oldname> <newname>]
[--snapshotfolder default|<path>]
[--teleporter on|off]
[--teleporterport <port>]
[--teleporteraddress <address|empty>
[--teleporterpassword <password>]
[--teleporterpasswordfile <file>|stdin]
[--tracing-enabled on|off]
[--tracing-config <config-string>]
[--tracing-allow-vm-access on|off]
[--usbcardreader on|off]
[--autostart-enabled on|off]
[--autostart-delay <seconds>]
[--recording on|off]
[--recording screens all|<screen ID> [<screen ID> ...]]
[--recording filename <filename>]
[--recording videores <width> <height>]
[--recording videorate <rate>]
[--recording videofps <fps>]
[--recording maxtime <s>]
[--recording maxfilesize <MB>]
[--recording opts <key=value> [,<key=value> ...]]
[--defaultfrontend default|<name>]
clonevm <uuid|vmname>
[--snapshot <uuid>|<name>]
[--mode machine|machineandchildren|all]
[--options link|keepallmacs|keepnatmacs|
keepdisknames|keephwuuids]
[--name <name>]
[--groups <group>, ...]
[--basefolder <basefolder>]
[--uuid <uuid>]
[--register]
movevm <uuid|vmname>
--type basic
[--folder <path>]
import <ovfname/ovaname>
[--dry-run|-n]
[--options keepallmacs|keepnatmacs|importtovdi]
[more options]
(run with -n to have options displayed
for a particular OVF)
export <machines> --output|-o <name>.<ovf/ova/tar.gz>
[--legacy09|--ovf09|--ovf10|--ovf20|--opc10]
[--manifest]
[--iso]
[--options manifest|iso|nomacs|nomacsbutnat]
[--vsys <number of virtual system>]
[--vmname <name>]
[--product <product name>]
[--producturl <product url>]
[--vendor <vendor name>]
[--vendorurl <vendor url>]
[--version <version info>]
[--description <description info>]
[--eula <license text>]
[--eulafile <filename>]
[--cloud <number of virtual system>]
[--vmname <name>]
[--cloudprofile <cloud profile name>]
[--cloudshape <shape>]
[--clouddomain <domain>]
[--clouddisksize <disk size in GB>]
[--cloudbucket <bucket name>]
[--cloudocivcn <OCI vcn id>]
[--cloudocisubnet <OCI subnet id>]
[--cloudkeepobject <true/false>]
[--cloudlaunchinstance <true/false>]
[--cloudpublicip <true/false>]
startvm <uuid|vmname>...
[--type gui|sdl|headless|separate]
[-E|--putenv <NAME>[=<VALUE>]]
controlvm <uuid|vmname>
pause|resume|reset|poweroff|savestate|
acpipowerbutton|acpisleepbutton|
keyboardputscancode <hex> [<hex> ...]|
keyboardputstring <string1> [<string2> ...]|
keyboardputfile <filename>|
setlinkstate<1-N> on|off |
nic<1-N> null|nat|bridged|intnet|hostonly|generic|
natnetwork [<devicename>] |
nictrace<1-N> on|off |
nictracefile<1-N> <filename> |
nicproperty<1-N> name=[value] |
nicpromisc<1-N> deny|allow-vms|allow-all |
natpf<1-N> [<rulename>],tcp|udp,[<hostip>],
<hostport>,[<guestip>],<guestport> |
natpf<1-N> delete <rulename> |
guestmemoryballoon <balloonsize in MB> |
usbattach <uuid>|<address>
[--capturefile <filename>] |
usbdetach <uuid>|<address> |
audioin on|off |
audioout on|off |
clipboard disabled|hosttoguest|guesttohost|
bidirectional |
draganddrop disabled|hosttoguest|guesttohost|
bidirectional |
vrde on|off |
vrdeport <port> |
vrdeproperty <name=[value]> |
vrdevideochannelquality <percent> |
setvideomodehint <xres> <yres> <bpp>
[[<display>] [<enabled:yes|no> |
[<xorigin> <yorigin>]]] |
setscreenlayout <display> on|primary <xorigin> <yorigin> <xres> <yres> <bpp> | off
screenshotpng <file> [display] |
recording on|off |
recording screens all|none|<screen>,[<screen>...] |
recording filename <file> |
recording videores <width>x<height> |
recording videorate <rate> |
recording videofps <fps> |
recording maxtime <s> |
recording maxfilesize <MB> |
setcredentials <username>
--passwordfile <file> | <password>
<domain>
[--allowlocallogon <yes|no>] |
teleport --host <name> --port <port>
[--maxdowntime <msec>]
[--passwordfile <file> |
--password <password>] |
plugcpu <id> |
unplugcpu <id> |
cpuexecutioncap <1-100>
webcam <attach [path [settings]]> | <detach [path]> | <list>
addencpassword <id>
<password file>|-
[--removeonsuspend <yes|no>]
removeencpassword <id>
removeallencpasswords
changeuartmode<1-N> disconnected|
server <pipe>|
client <pipe>|
tcpserver <port>|
tcpclient <hostname:port>|
file <file>|
<devicename>]
discardstate <uuid|vmname>
adoptstate <uuid|vmname> <state_file>
snapshot <uuid|vmname>
take <name> [--description <desc>] [--live]
[--uniquename Number,Timestamp,Space,Force] |
delete <uuid|snapname> |
restore <uuid|snapname> |
restorecurrent |
edit <uuid|snapname>|--current
[--name <name>]
[--description <desc>] |
list [--details|--machinereadable] |
showvminfo <uuid|snapname>
closemedium [disk|dvd|floppy] <uuid|filename>
[--delete]
storageattach <uuid|vmname>
--storagectl <name>
[--port <number>]
[--device <number>]
[--type dvddrive|hdd|fdd]
[--medium none|emptydrive|additions|
<uuid|filename>|host:<drive>|iscsi]
[--mtype normal|writethrough|immutable|shareable|
readonly|multiattach]
[--comment <text>]
[--setuuid <uuid>]
[--setparentuuid <uuid>]
[--passthrough on|off]
[--tempeject on|off]
[--nonrotational on|off]
[--discard on|off]
[--hotpluggable on|off]
[--bandwidthgroup <name>]
[--forceunmount]
[--server <name>|<ip>]
[--target <target>]
[--tport <port>]
[--lun <lun>]
[--encodedlun <lun>]
[--username <username>]
[--password <password>]
[--passwordfile <file>]
[--initiator <initiator>]
[--intnet]
storagectl <uuid|vmname>
--name <name>
[--add ide|sata|scsi|floppy|sas|usb|pcie]
[--controller LSILogic|LSILogicSAS|BusLogic|
IntelAHCI|PIIX3|PIIX4|ICH6|I82078|
[ USB|NVMe]
[--portcount <1-n>]
[--hostiocache on|off]
[--bootable on|off]
[--rename <name>]
[--remove]
bandwidthctl <uuid|vmname>
add <name> --type disk|network
--limit <megabytes per second>[k|m|g|K|M|G] |
set <name>
--limit <megabytes per second>[k|m|g|K|M|G] |
remove <name> |
list [--machinereadable]
(limit units: k=kilobit, m=megabit, g=gigabit,
K=kilobyte, M=megabyte, G=gigabyte)
showmediuminfo [disk|dvd|floppy] <uuid|filename>
createmedium [disk|dvd|floppy] --filename <filename>
[--size <megabytes>|--sizebyte <bytes>]
[--diffparent <uuid>|<filename>
[--format VDI|VMDK|VHD] (default: VDI)
[--variant Standard,Fixed,Split2G,Stream,ESX,
Formatted]
modifymedium [disk|dvd|floppy] <uuid|filename>
[--type normal|writethrough|immutable|shareable|
readonly|multiattach]
[--autoreset on|off]
[--property <name=[value]>]
[--compact]
[--resize <megabytes>|--resizebyte <bytes>]
[--move <path>]
[--setlocation <path>]
[--description <description string>]
clonemedium [disk|dvd|floppy] <uuid|inputfile> <uuid|outputfile>
[--format VDI|VMDK|VHD|RAW|<other>]
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--existing]
mediumproperty [disk|dvd|floppy] set <uuid|filename>
<property> <value>
[disk|dvd|floppy] get <uuid|filename>
<property>
[disk|dvd|floppy] delete <uuid|filename>
<property>
encryptmedium <uuid|filename>
[--newpassword <file>|-]
[--oldpassword <file>|-]
[--cipher <cipher identifier>]
[--newpasswordid <password identifier>]
checkmediumpwd <uuid|filename>
<pwd file>|-
convertfromraw <filename> <outputfile>
[--format VDI|VMDK|VHD]
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--uuid <uuid>]
convertfromraw stdin <outputfile> <bytes>
[--format VDI|VMDK|VHD]
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--uuid <uuid>]
getextradata global|<uuid|vmname>
<key>|[enumerate]
setextradata global|<uuid|vmname>
<key>
[<value>] (no value deletes key)
setproperty machinefolder default|<folder> |
hwvirtexclusive on|off |
vrdeauthlibrary default|<library> |
websrvauthlibrary default|null|<library> |
vrdeextpack null|<library> |
autostartdbpath null|<folder> |
loghistorycount <value>
defaultfrontend default|<name>
logginglevel <log setting>
proxymode system|noproxy|manual
proxyurl <url>
usbfilter add <index,0-N>
--target <uuid|vmname>|global
--name <string>
--action ignore|hold (global filters only)
[--active yes|no] (yes)
[--vendorid <XXXX>] (null)
[--productid <XXXX>] (null)
[--revision <IIFF>] (null)
[--manufacturer <string>] (null)
[--product <string>] (null)
[--remote yes|no] (null, VM filters only)
[--serialnumber <string>] (null)
[--maskedinterfaces <XXXXXXXX>]
usbfilter modify <index,0-N>
--target <uuid|vmname>|global
[--name <string>]
[--action ignore|hold] (global filters only)
[--active yes|no]
[--vendorid <XXXX>|""]
[--productid <XXXX>|""]
[--revision <IIFF>|""]
[--manufacturer <string>|""]
[--product <string>|""]
[--remote yes|no] (null, VM filters only)
[--serialnumber <string>|""]
[--maskedinterfaces <XXXXXXXX>]
usbfilter remove <index,0-N>
--target <uuid|vmname>|global
sharedfolder add <uuid|vmname>
--name <name> --hostpath <hostpath>
[--transient] [--readonly] [--automount]
sharedfolder remove <uuid|vmname>
--name <name> [--transient]
guestproperty get <uuid|vmname>
<property> [--verbose]
guestproperty set <uuid|vmname>
<property> [<value> [--flags <flags>]]
guestproperty delete|unset <uuid|vmname>
<property>
guestproperty enumerate <uuid|vmname>
[--patterns <patterns>]
guestproperty wait <uuid|vmname> <patterns>
[--timeout <msec>] [--fail-on-timeout]
guestcontrol <uuid|vmname> [--verbose|-v] [--quiet|-q]
[--username <name>] [--domain <domain>]
[--passwordfile <file> | --password <password>]
run [common-options]
[--exe <path to executable>] [--timeout <msec>]
[-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args]
[--ignore-operhaned-processes] [--profile]
[--no-wait-stdout|--wait-stdout]
[--no-wait-stderr|--wait-stderr]
[--dos2unix] [--unix2dos]
-- <program/arg0> [argument1] ... [argumentN]]
start [common-options]
[--exe <path to executable>] [--timeout <msec>]
[-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args]
[--ignore-operhaned-processes] [--profile]
-- <program/arg0> [argument1] ... [argumentN]]
copyfrom [common-options]
[--follow] [-R|--recursive]
<guest-src0> [guest-src1 [...]] <host-dst>
copyfrom [common-options]
[--follow] [-R|--recursive]
[--target-directory <host-dst-dir>]
<guest-src0> [guest-src1 [...]]
copyto [common-options]
[--follow] [-R|--recursive]
<host-src0> [host-src1 [...]] <guest-dst>
copyto [common-options]
[--follow] [-R|--recursive]
[--target-directory <guest-dst>]
<host-src0> [host-src1 [...]]
mkdir|createdir[ectory] [common-options]
[--parents] [--mode <mode>]
<guest directory> [...]
rmdir|removedir[ectory] [common-options]
[-R|--recursive]
<guest directory> [...]
removefile|rm [common-options] [-f|--force]
<guest file> [...]
mv|move|ren[ame] [common-options]
<source> [source1 [...]] <dest>
mktemp|createtemp[orary] [common-options]
[--secure] [--mode <mode>] [--tmpdir <directory>]
<template>
stat [common-options]
<file> [...]
guestcontrol <uuid|vmname> [--verbose|-v] [--quiet|-q]
list <all|sessions|processes|files> [common-opts]
closeprocess [common-options]
< --session-id <ID>
| --session-name <name or pattern>
<PID1> [PID1 [...]]
closesession [common-options]
< --all | --session-id <ID>
| --session-name <name or pattern> >
updatega|updateguestadditions|updateadditions
[--source <guest additions .ISO>]
[--wait-start] [common-options]
[-- [<argument1>] ... [<argumentN>]]
watch [common-options]
metrics list [*|host|<vmname> [<metric_list>]]
(comma-separated)
metrics setup
[--period <seconds>] (default: 1)
[--samples <count>] (default: 1)
[--list]
[*|host|<vmname> [<metric_list>]]
metrics query [*|host|<vmname> [<metric_list>]]
metrics enable
[--list]
[*|host|<vmname> [<metric_list>]]
metrics disable
[--list]
[*|host|<vmname> [<metric_list>]]
metrics collect
[--period <seconds>] (default: 1)
[--samples <count>] (default: 1)
[--list]
[--detach]
[*|host|<vmname> [<metric_list>]]
natnetwork add --netname <name>
--network <network>
[--enable|--disable]
[--dhcp on|off]
[--port-forward-4 <rule>]
[--loopback-4 <rule>]
[--ipv6 on|off]
[--port-forward-6 <rule>]
[--loopback-6 <rule>]
natnetwork remove --netname <name>
natnetwork modify --netname <name>
[--network <network>]
[--enable|--disable]
[--dhcp on|off]
[--port-forward-4 <rule>]
[--loopback-4 <rule>]
[--ipv6 on|off]
[--port-forward-6 <rule>]
[--loopback-6 <rule>]
natnetwork start --netname <name>
natnetwork stop --netname <name>
natnetwork list [<pattern>]
hostonlyif ipconfig <name>
[--dhcp |
--ip<ipv4> [--netmask<ipv4> (def: 255.255.255.0)] |
--ipv6<ipv6> [--netmasklengthv6<length> (def: 64)]]
create |
remove <name>
dhcpserver add|modify --netname <network_name> |
--ifname <hostonly_if_name>
[--ip <ip_address>
--netmask <network_mask>
--lowerip <lower_ip>
--upperip <upper_ip>]
[--enable | --disable]
[--options [--vm <name> --nic <1-N>]
--id <number> [--value <string> | --remove]]
(multiple options allowed after --options)
dhcpserver remove --netname <network_name> |
--ifname <hostonly_if_name>
usbdevsource add <source name>
--backend <backend>
--address <address>
usbdevsource remove <source name>
Medium content access:
VBoxManage mediumio <[--disk=uuid|filename] | [--dvd=uuid|filename] | [--floppy=uuid|filename]> [--password-file-|filename] formatfat
[--quick]
VBoxManage mediumio <[--disk=uuid|filename] | [--dvd=uuid|filename] | [--floppy=uuid|filename]> [--password-file-|filename] cat [--hex]
[--offset=byte-offset] [--size=bytes] [--output=-|filename]
VBoxManage mediumio <[--disk=uuid|filename] | [--dvd=uuid|filename] | [--floppy=uuid|filename]> [--password-file-|filename] stream
[--format=image-format] [--variant=image-variant] [--output=-|filename]
Introspection and guest debugging:
VBoxManage debugvm <uuid|vmname> dumpvmcore [--filename=name]
VBoxManage debugvm <uuid|vmname> info <item> [args...]
VBoxManage debugvm <uuid|vmname> injectnmi
VBoxManage debugvm <uuid|vmname> log [[--release] | [--debug]] [group-settings...]
VBoxManage debugvm <uuid|vmname> logdest [[--release] | [--debug]] [destinations...]
VBoxManage debugvm <uuid|vmname> logflags [[--release] | [--debug]] [flags...]
VBoxManage debugvm <uuid|vmname> osdetect
VBoxManage debugvm <uuid|vmname> osinfo
VBoxManage debugvm <uuid|vmname> osdmesg [--lines=lines]
VBoxManage debugvm <uuid|vmname> getregisters [--cpu=id] [reg-set.reg-name...]
VBoxManage debugvm <uuid|vmname> setregisters [--cpu=id] [reg-set.reg-name=value...]
VBoxManage debugvm <uuid|vmname> show [[--human-readable] | [--sh-export] | [--sh-eval] | [--cmd-set]] [settings-item...]
VBoxManage debugvm <uuid|vmname> stack [--cpu=id]
VBoxManage debugvm <uuid|vmname> statistics [--reset] [--descriptions] [--pattern=pattern]
Extension package management:
VBoxManage extpack install [--replace] <tarball>
VBoxManage extpack uninstall [--force] <name>
VBoxManage extpack cleanup
Unattended guest OS installation:
VBoxManage unattended detect <--iso=install-iso> [--machine-readable]
VBoxManage unattended install <uuid|vmname> <--iso=install-iso> [--user=login] [--password=password] [--password-file=file]
[--full-user-name=name] [--key=product-key] [--install-additions] [--no-install-additions] [--additions-iso=add-iso] [--install-txs]
[--no-install-txs] [--validation-kit-iso=testing-iso] [--locale=ll_CC] [--country=CC] [--time-zone=tz] [--hostname=fqdn]
[--package-selection-adjustment=keyword] [--dry-run] [--auxiliary-base-path=path] [--image-index=number] [--script-template=file]
[--post-install-template=file] [--post-install-command=command] [--extra-install-kernel-parameters=params] [--language=lang]
[--start-vm=session-type]
To list all virtual machines:
$ vboxmanage list vms
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.15.0-72-generic) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
"Win10 pro" {e4b15bdf-c6d7-4d18-b301-1c4501900eba}
To list all virtual hard drives:
$ vboxmanage list hdds
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.15.0-72-generic) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
UUID: 100606d9-181f-4dde-91e0-cee3fa072ab6
Parent UUID: base
State: created
Type: normal (base)
Location: /home/bojan/dev/vm/Win10 Pro.vdi
Storage format: VDI
Capacity: 32768 MBytes
Encryption: disabled
UUID: f51b69c4-8da7-42fb-b0d8-a6f9217bf726
Parent UUID: 100606d9-181f-4dde-91e0-cee3fa072ab6
State: created
Type: normal (differencing)
Location: /home/bojan/dev/vm/Snapshots/{f51b69c4-8da7-42fb-b0d8-a6f9217bf726}.vdi
Storage format: VDI
Capacity: 32768 MBytes
Encryption: disabled
...
UUID: 03c80743-a1a3-49d9-9dbb-b80d98dd7206
Parent UUID: 6427b873-0f4c-4597-a362-f717f6b23ec1
State: created
Type: normal (differencing)
Location: /home/bojan/dev/vm/Snapshots/{03c80743-a1a3-49d9-9dbb-b80d98dd7206}.vdi
Storage format: VDI
Capacity: 32768 MBytes
Encryption: disabled
To list all snapshots (with Name and UUID for each one):
$ vboxmanage snapshot "Win10 pro" list
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.15.0-72-generic) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
Name: All updates as of 2017-10-09 installed (UUID: 8d8f439c-e706-4fd0-a9ef-8b26aaa61776)
Name: Clean, updated (UUID: fb52eda0-6dc7-4225-9342-29407b929d61)
Name: Clean, Updated - Feature update to Windows 10, version 1803 (UUID: 660cbaae-1f78-428d-aa58-b20f160c49ae)
Name: Clean, Updated - Feature update to Windows 10, version 1803, Installed additions (UUID: 0b7c3fbc-b535-45da-be29-4653e1913a78)
Description: VPN is NOT installed.
....
Name: No AV installed (UUID: e71f07c8-ff21-40f2-b18d-3225bf74c385)
...
Name: Snapshot 2 (UUID: 8850886c-aac8-42bb-b1c4-a2fa0e6e1656)
To find UUID of snapshot with particular name we can combine the previous command with grep:
$ vboxmanage snapshot "Win10 pro" list | grep "Installed major OS update (2019-03)"
Name: Installed major OS update (2019-03) (UUID: bfcead22-d5e6-4592-9e2f-9c3bce549c90) *
NOTE: There is a clash between kernel components of Docker daemon and VirtualBox. At my current setup I had to give priority to Docker so left VB without its kernel module installed. That's why the output of all commands above starts with:
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.15.0-72-generic) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
Indeed, when I try to start a VM, I get:
How to migrate VirtualBox VM from Ubuntu to Windows machine?
Copy over to Windows box entire content of directory containing:
- Logs
- Snapshots
- Win10 pro.vbox
- Win10 pro.vbox-prev
- Win10 pro.vdi
If you get the error like:
Failed to open virtual machine located in ../VMs/Win10 pro/Win10 pro.vbox.
Cannot register the DVD image 'C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso' {a91a1834-f809-4ab8-a434-810a88fab6a2} because a CD/DVD image 'C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso' with UUID {4c1ca4e3-cb6b-46f8-84d3-d7fa933be798} already exists.
Result Code: E_INVALIDARG (0x80070057)
Component: VirtualBoxWrap
Interface: IVirtualBox {d0a0163f-e254-4e5b-a1f2-011cf991c38d}
...then use some text editor to open Win10 pro.vbox and replace:
<DVDImages>
<Image uuid="{a91a1834-f809-4ab8-a434-810a88fab6a2}" location="C:/Program Files/Oracle/VirtualBox/VBoxGuestAdditions.iso"/>
<Image uuid="{33df2a0b-d829-4030-9575-d36ce5de254f}" location="/usr/share/virtualbox/VBoxGuestAdditions.iso"/>
</DVDImages>
with:
<DVDImages>
</DVDImages>
My advice is to remove shared folders as otherwise you'll get warning:
When I tried to remove it and save the settings I was getting error:
The machine is not mutable or running (state is Saved).
code:VBOX_E_INVALID_VM_STATE (0x80BB0002)
Component: SessionMachine
Interface:IMachine
The problem might have been solved by following this advice:
Your virtual machine needs to be completely shut down, not just suspended. Make sure you used the Machine >> Close >> Power off menu item.
I solved it by selecting VM, right click >> Discard Saved State.
No comments:
Post a Comment