VirtualBox命令行工具(VBoxManage)使用,最全最详细

VirtualBox命令行工具(VBoxManage)使用,最全最详细此文章禁止任何方式转载,请尊重作者的劳动成果最后更新于2020.08.06VirtualBox命令行工具是VBoxManage.exe,在VirtualBox安装目录下。如果有兴趣可以点击这里跳转到文章底部看看英文的帮助信息如果有需求可以点击这里跳转到查看详细翻译的文档长文告警,持续更新好了,现在进入正文。讲讲用途很多主机(如服务器)没有图像显示设备,甚至只支持命令行没有GUI,所以如果要在这一类主机上搭建虚拟机只能采取这种方法。命令使用创建新虚拟机VBoxManagecrea

已经弃坑了,不用看了

此文章禁止任何方式转载,请尊重作者的劳动成果

最后更新于2020.08.06

VirtualBox命令行工具是VBoxManage.exe,在VirtualBox安装目录下。

如果有兴趣可以点击这里跳转到文章底部看看英文的帮助信息

如果有需求可以点击这里跳转到查看详细翻译的文档

长文告警,持续更新

好了,现在进入正文。


讲讲用途

很多主机(如服务器)没有图像显示设备,甚至只支持命令行没有GUI,所以如果要在这一类主机上搭建虚拟机只能采取这种方法。

命令使用

  • 创建新虚拟机
VBoxManage createvm --name <名称> --ostype <系统类型> --register

其中<名称>是自定义的,但是必须用英文双引号包围,如:"test"
<系统类型>可以是如下的表格的第一列。(一个个字敲上去的QwQ)

跳到表格下方

名称 描述 隶属 制造商 是否为x64系统
Other Other/Unknown Other Other VirtualBox命令行工具(VBoxManage)使用,最全最详细
Other_64 Other/Unknown(64-bit) Other Other VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows31 Windows3.1 Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows95 Windows95 Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows98 Windows98 Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
WindowsMe WindowsME Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
WindowsNT4 WindowsNT4 Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows2000 Windows2000 Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
WindowsXP WindowsXP(32-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
WindowsXP_64 WindowsXP(64-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows2003 Windows2003(32-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows2003_64 Windows2003(64-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
WindowsVista WindowsVista(32-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
WindowsVista_64 WindowsVista(64-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows2008 Windows2008(32-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows2008_64 Windows2008(64-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows7 Windows7(32-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows7_64 Windows7(64-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows8 Windows8(32-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows8_64 Windows8(64-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows81 Windows8.1(32-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows81_64 Windows8.1(64-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows2012_64 Windows2012(64-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows10 Windows10(32-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows10_64 Windows10(64-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Windows2016_64 Windows2016(64-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
WindowsNT OtherWindows(32-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
WindowsNT_64 OtherWindows(64-bit) Windows MicrosoftWindows VirtualBox命令行工具(VBoxManage)使用,最全最详细
Linux22 Linux2.2 Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Linux24 Linux2.4(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Linux24_64 Linux2.4(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Linux26 Linux2.6/3.x/4.x(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Linux26_64 Linux2.6/3.x/4.x(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
ArchLinux ArchLinux(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
ArchLinux_64 ArchLinux(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Debian Debian(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Debian_64 Debian(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
OpenSUSE openSUSE(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
OpenSUSE_64 openSUSE(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Fedora Fedora(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Fedora_64 Fedora(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Gentoo Gentoo(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Gentoo_64 Gentoo(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Mandriva Mandriva(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Mandriva_64 Mandriva(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
RedHat RedHat(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
RedHat_64 RedHat(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Turbolinux Turbolinux(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Turbolinux_64 Turbolinux(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Ubuntu Ubuntu(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Ubuntu_64 Ubuntu(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Xandros Xandros(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Xandros_64 Xandros(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Oracle Oracle(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Oracle_64 Oracle(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Linux OtherLinux(32-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Linux_64 OtherLinux(64-bit) Linux Linux VirtualBox命令行工具(VBoxManage)使用,最全最详细
Solaris OracleSolaris105/09andearlier(32-bit) Solaris Solaris VirtualBox命令行工具(VBoxManage)使用,最全最详细
Solaris_64 OracleSolaris105/09andearlier(64-bit) Solaris Solaris VirtualBox命令行工具(VBoxManage)使用,最全最详细
OpenSolaris OracleSolaris1010/09andlater(32-bit) Solaris Solaris VirtualBox命令行工具(VBoxManage)使用,最全最详细
OpenSolaris_64 OracleSolaris1010/09andlater(64-bit) Solaris Solaris VirtualBox命令行工具(VBoxManage)使用,最全最详细
Solaris11_64 OracleSolaris11(64-bit) Solaris Solaris VirtualBox命令行工具(VBoxManage)使用,最全最详细
FreeBSD FreeBSD(32-bit) BSD BSD VirtualBox命令行工具(VBoxManage)使用,最全最详细
FreeBSD_64 FreeBSD(64-bit) BSD BSD VirtualBox命令行工具(VBoxManage)使用,最全最详细
OpenBSD OpenBSD(32-bit) BSD BSD VirtualBox命令行工具(VBoxManage)使用,最全最详细
OpenBSD_64 OpenBSD(64-bit) BSD BSD VirtualBox命令行工具(VBoxManage)使用,最全最详细
NetBSD NetBSD(32-bit) BSD BSD VirtualBox命令行工具(VBoxManage)使用,最全最详细
NetBSD_64 NetBSD(64-bit) BSD BSD VirtualBox命令行工具(VBoxManage)使用,最全最详细
OS2Warp3 OS/2Warp3 OS2 IBMOS/2 VirtualBox命令行工具(VBoxManage)使用,最全最详细
OS2Warp4 OS/2Warp4 OS2 IBMOS/2 VirtualBox命令行工具(VBoxManage)使用,最全最详细
OS2Warp45 OS/2Warp4.5 OS2 IBMOS/2 VirtualBox命令行工具(VBoxManage)使用,最全最详细
OS2eCS eComStation OS2 IBMOS/2 VirtualBox命令行工具(VBoxManage)使用,最全最详细
OS21x OS/21.x OS2 IBMOS/2 VirtualBox命令行工具(VBoxManage)使用,最全最详细
OS2 OtherOS/2 OS2 IBMOS/2 VirtualBox命令行工具(VBoxManage)使用,最全最详细
MacOS MacOSX(32-bit) MacOS MacOSX VirtualBox命令行工具(VBoxManage)使用,最全最详细
MacOS_64 MacOSX(64-bit) MacOS MacOSX VirtualBox命令行工具(VBoxManage)使用,最全最详细
MacOS106 MacOSX10.6SnowLeopard(32-bit) MacOS MacOSX VirtualBox命令行工具(VBoxManage)使用,最全最详细
MacOS106_64 MacOSX10.6SnowLeopard(64-bit) MacOS MacOSX VirtualBox命令行工具(VBoxManage)使用,最全最详细
MacOS107_64 MacOSX10.7Lion(64-bit) MacOS MacOSX VirtualBox命令行工具(VBoxManage)使用,最全最详细
MacOS108_64 MacOSX10.8MountainLion(64-bit) MacOS MacOSX VirtualBox命令行工具(VBoxManage)使用,最全最详细
MacOS109_64 MacOSX10.9Mavericks(64-bit) MacOS MacOSX VirtualBox命令行工具(VBoxManage)使用,最全最详细
MacOS1010_64 MacOSX10.10Yosemite(64-bit) MacOS MacOSX VirtualBox命令行工具(VBoxManage)使用,最全最详细
MacOS1011_64 MacOSX10.11ElCapitan(64-bit) MacOS MacOSX VirtualBox命令行工具(VBoxManage)使用,最全最详细
MacOS1012_64 macOS10.12Sierra(64-bit) MacOS MacOSX VirtualBox命令行工具(VBoxManage)使用,最全最详细
MacOS1013_64 macOS10.13HighSierra(64-bit) MacOS MacOSX VirtualBox命令行工具(VBoxManage)使用,最全最详细
DOS DOS Other Other VirtualBox命令行工具(VBoxManage)使用,最全最详细
Netware Netware Other Other VirtualBox命令行工具(VBoxManage)使用,最全最详细
L4 L4 Other Other VirtualBox命令行工具(VBoxManage)使用,最全最详细
QNX QNX Other Other VirtualBox命令行工具(VBoxManage)使用,最全最详细
JRockitVE JRockitVE Other Other VirtualBox命令行工具(VBoxManage)使用,最全最详细
VBoxBS_64 VirtualBoxBootsectorTest(64-bit) Other Other VirtualBox命令行工具(VBoxManage)使用,最全最详细

回到表格上方
如果没有指定–register参数,那么需要在后续的命令中使用registervm命令

  • 为虚拟机指定设置信息:
    VBoxManage modifyvm "ubuntu" --memory 256 --acpi on --boot1 dvd --nic1 nat

  • 为虚拟机创建虚拟硬盘(例如,20GB):

VBoxManage createhd --filename "ubuntu.vdi" --size 20000

  • 为虚拟机添加IDE控制器:

VBoxManage storagectl "ubuntu" --name "IDE Controller" --add ide --controller PIIX4

  • 将第三步中创建的虚拟硬盘添加到虚拟机:

VBoxManage storageattach "ubuntu" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium "ubuntu.vdi"

  • 将需要安装的操作系统iso文件添加到虚拟机:

VBoxManage storageattach "ubuntu" --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium /full/path/to/iso.iso

  • 启动虚拟机:

VBoxManage startvm "ubuntu" --type headless

关闭虚拟机:

VBoxManage controlvm "ubuntu" poweroff

这些是基础的命令,下面详细讲解完整命令的示例

因为<>|[](){}这些符号显示会有问题,所以放代码块里面结合示例讲解。

使用:

  VBoxManage [<常规选项>] <命令>
 
 
常规选项:
 
  [-v|--version]            打印版本号并退出
  [-q|--nologo]             关闭徽标功能
  [--settingspw <pw>]       提供设置密码
  [--settingspwfile <file>] 提供包含设置密码的文件
  [@<response-file>]        从给定的响应文件中加载参数(bourne风格)
 
 p.s.不知道怎么翻译bourne

命令:
 
  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

  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>]

  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]
                            [--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]
                            [--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>]
                            [--lpt<1-N> off|<I/O base> <IRQ>]
                            [--lptmode<1-N> <devicename>]
                            [--guestmemoryballoon <balloonsize in MB>]
                            [--audio none|null|dsound]
                            [--audioin on|off]
                            [--audioout on|off]
                            [--audiocontroller ac97|hda|sb16]
                            [--audiocodec stac9700|ad1980|stac9221|sb16]
                            [--clipboard disabled|hosttoguest|guesttohost|
                                         bidirectional]
                            [--draganddrop disabled|hosttoguest]
                            [--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>]
                            [--usb 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>]
                            [--videocap on|off]
                            [--videocapscreens all|<screen ID> [<screen ID> ...]]
                            [--videocapfile <filename>]
                            [--videocapres <width> <height>]
                            [--videocaprate <rate>]
                            [--videocapfps <fps>]
                            [--videocapmaxtime <ms>]
                            [--videocapmaxsize <MB>]
                            [--videocapopts <key=value> [,<key=value> ...]]
                            [--defaultfrontend default|<name>]

  clonevm                   <uuid|vmname>
                            [--snapshot <uuid>|<name>]
                            [--mode machine|machineandchildren|all]
                            [--options link|keepallmacs|keepnatmacs|
                                       keepdisknames]
                            [--name <name>]
                            [--groups <group>, ...]
                            [--basefolder <basefolder>]
                            [--uuid <uuid>]
                            [--register]

  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>]
                                    [--product <product name>]
                                    [--producturl <product url>]
                                    [--vendor <vendor name>]
                                    [--vendorurl <vendor url>]
                                    [--version <version info>]
                                    [--description <description info>]
                                    [--eula <license text>]
                                    [--eulafile <filename>]

  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 |
                            vrde on|off |
                            vrdeport <port> |
                            vrdeproperty <name=[value]> |
                            vrdevideochannelquality <percent> |
                            setvideomodehint <xres> <yres> <bpp>
                                            [[<display>] [<enabled:yes|no> |
                                              [<xorigin> <yorigin>]]] |
                            screenshotpng <file> [display] |
                            videocap on|off |
                            videocapscreens all|none|<screen>,[<screen>...] |
                            videocapfile <file>
                            videocapres <width>x<height>
                            videocaprate <rate>
                            videocapfps <fps>
                            videocapmaxtime <ms>
                            videocapmaxsize <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

  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]

  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]
                            [--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>

  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]
                              [--dryrun] [--follow] [-R|--recursive]
                              <guest-src0> [guest-src1 [...]] <host-dst>

                              copyfrom [common-options]
                              [--dryrun] [--follow] [-R|--recursive]
                              [--target-directory <host-dst-dir>]
                              <guest-src0> [guest-src1 [...]]

                              copyto [common-options]
                              [--dryrun] [--follow] [-R|--recursive]
                              <host-src0> [host-src1 [...]] <guest-dst>

                              copyto [common-options]
                              [--dryrun] [--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]

  dhcpserver                remove --netname <network_name> |
                                   --ifname <hostonly_if_name>

  usbdevsource              add <source name>
                            --backend <backend>
                            --address <address>
  usbdevsource              remove <source name>

 自检和调试:

  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]

 插件管理:

  VBoxManage extpack install [--replace] <tarball>

  VBoxManage extpack uninstall [--force] <name>

  VBoxManage extpack cleanup

 无人值守安装操作系统:

  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]

英文帮助信息(HELP)

Oracle VM VirtualBox Command Line Management Interface Version 5.2.16
(C) 2005-2018 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

  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>]

  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]
                            [--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]
                            [--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>]
                            [--lpt<1-N> off|<I/O base> <IRQ>]
                            [--lptmode<1-N> <devicename>]
                            [--guestmemoryballoon <balloonsize in MB>]
                            [--audio none|null|dsound]
                            [--audioin on|off]
                            [--audioout on|off]
                            [--audiocontroller ac97|hda|sb16]
                            [--audiocodec stac9700|ad1980|stac9221|sb16]
                            [--clipboard disabled|hosttoguest|guesttohost|
                                         bidirectional]
                            [--draganddrop disabled|hosttoguest]
                            [--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>]
                            [--usb 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>]
                            [--videocap on|off]
                            [--videocapscreens all|<screen ID> [<screen ID> ...]]
                            [--videocapfile <filename>]
                            [--videocapres <width> <height>]
                            [--videocaprate <rate>]
                            [--videocapfps <fps>]
                            [--videocapmaxtime <ms>]
                            [--videocapmaxsize <MB>]
                            [--videocapopts <key=value> [,<key=value> ...]]
                            [--defaultfrontend default|<name>]

  clonevm                   <uuid|vmname>
                            [--snapshot <uuid>|<name>]
                            [--mode machine|machineandchildren|all]
                            [--options link|keepallmacs|keepnatmacs|
                                       keepdisknames]
                            [--name <name>]
                            [--groups <group>, ...]
                            [--basefolder <basefolder>]
                            [--uuid <uuid>]
                            [--register]

  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>]
                                    [--product <product name>]
                                    [--producturl <product url>]
                                    [--vendor <vendor name>]
                                    [--vendorurl <vendor url>]
                                    [--version <version info>]
                                    [--description <description info>]
                                    [--eula <license text>]
                                    [--eulafile <filename>]

  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 |
                            vrde on|off |
                            vrdeport <port> |
                            vrdeproperty <name=[value]> |
                            vrdevideochannelquality <percent> |
                            setvideomodehint <xres> <yres> <bpp>
                                            [[<display>] [<enabled:yes|no> |
                                              [<xorigin> <yorigin>]]] |
                            screenshotpng <file> [display] |
                            videocap on|off |
                            videocapscreens all|none|<screen>,[<screen>...] |
                            videocapfile <file>
                            videocapres <width>x<height>
                            videocaprate <rate>
                            videocapfps <fps>
                            videocapmaxtime <ms>
                            videocapmaxsize <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

  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]

  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]
                            [--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>

  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]
                              [--dryrun] [--follow] [-R|--recursive]
                              <guest-src0> [guest-src1 [...]] <host-dst>

                              copyfrom [common-options]
                              [--dryrun] [--follow] [-R|--recursive]
                              [--target-directory <host-dst-dir>]
                              <guest-src0> [guest-src1 [...]]

                              copyto [common-options]
                              [--dryrun] [--follow] [-R|--recursive]
                              <host-src0> [host-src1 [...]] <guest-dst>

                              copyto [common-options]
                              [--dryrun] [--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]

  dhcpserver                remove --netname <network_name> |
                                   --ifname <hostonly_if_name>

  usbdevsource              add <source name>
                            --backend <backend>
                            --address <address>
  usbdevsource              remove <source name>

 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]


有需求查看详细翻译的文档?

在下面评论呗

今天的文章VirtualBox命令行工具(VBoxManage)使用,最全最详细分享到此就结束了,感谢您的阅读。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/24249.html

(0)
编程小号编程小号

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注