VirtualBox命令⾏⼯具(VBoxManage)使⽤,最全最详细
此⽂章禁⽌任何⽅式转载,请尊重作者的劳动成果
最后更新于2020.08.06
VirtualBox命令⾏⼯具是,在VirtualBox安装⽬录下。
长⽂告警,持续更新
好了,现在进⼊正⽂。
讲讲⽤途
很多主机(如服务器)没有图像显⽰设备,甚⾄只⽀持命令⾏没有GUI,所以如果要在这⼀类主机上搭建虚拟机只能采取这种⽅法。
命令使⽤
创建新虚拟机
VBoxManage createvm --name <;名称> --ostype <;系统类型> --register
其中<;名称>是⾃定义的,但是必须⽤英⽂双引号包围,如:"test"
(⼀个个字敲上去的QwQ)
<;系统类型>可以是如下的表格的第⼀列。
名称描述⾪属制造商是否为x64系统Other Other/Unknown Other Other
Other_64Other/Unknown(64-bit)Other Other
Windows31Windows3.1Windows MicrosoftWindows
Windows95Windows95Windows MicrosoftWindows
Windows98Windows98Windows MicrosoftWindows
WindowsMe WindowsME Windows MicrosoftWindows
WindowsNT4WindowsNT4Windows MicrosoftWindows
Windows2000Windows2000Windows MicrosoftWindows
WindowsXP WindowsXP(32-bit)Windows MicrosoftWindows
WindowsXP_64WindowsXP(64-bit)Windows MicrosoftWindows
Windows2003Windows2003(32-bit)Windows MicrosoftWindows
Windows2003_64Windows2003(64-bit)Windows MicrosoftWindows
名称描述⾪属制造商是否为x64系统WindowsVista WindowsVista(32-bit)Windows MicrosoftWindows
WindowsVista_64WindowsVista(64-bit)Windows MicrosoftWindows
Windows2008Windows2008(32-bit)Windows MicrosoftWindows
Windows2008_64Windows2008(64-bit)Windows MicrosoftWindows
Windows7Windows7(32-bit)Windows MicrosoftWindows
Windows7_64Windows7(64-bit)Windows MicrosoftWindows
医保转移Windows8Windows8(32-bit)Windows MicrosoftWindows
Windows8_64Windows8(64-bit)Windows MicrosoftWindows
Windows81Windows8.1(32-bit)Windows MicrosoftWindows
Windows81_64Windows8.1(64-bit)Windows MicrosoftWindows
Windows2012_64Windows2012(64-bit)Windows MicrosoftWindows
Windows10Windows10(32-bit)Windows MicrosoftWindows
英语学校Windows10_64Windows10(64-bit)Windows MicrosoftWindows
Windows2016_64Windows2016(64-bit)Windows MicrosoftWindows
WindowsNT OtherWindows(32-bit)Windows MicrosoftWindows
WindowsNT_64OtherWindows(64-bit)Windows MicrosoftWindows
Linux22Linux2.2Linux Linux
Linux24Linux2.4(32-bit)Linux Linux
绿色出行图片
Linux24_64Linux2.4(64-bit)Linux Linux
Linux26Linux2.6/3.x/4.x(32-bit)Linux Linux
Linux26_64Linux2.6/3.x/4.x(64-bit)Linux Linux
名称描述⾪属制造商是否为x64系统ArchLinux ArchLinux(32-bit)Linux Linux
ArchLinux_64ArchLinux(64-bit)Linux Linux
Debian Debian(32-bit)Linux Linux
Debian_64Debian(64-bit)Linux Linux
OpenSUSE openSUSE(32-bit)Linux Linux
OpenSUSE_64openSUSE(64-bit)Linux Linux
Fedora Fedora(32-bit)Linux Linux
Fedora_64Fedora(64-bit)Linux Linux服从领导安排
Gentoo Gentoo(32-bit)Linux Linux
Gentoo_64Gentoo(64-bit)Linux Linux
Mandriva Mandriva(32-bit)Linux Linux
Mandriva_64Mandriva(64-bit)Linux Linux
RedHat RedHat(32-bit)Linux Linux
RedHat_64RedHat(64-bit)Linux Linux
Turbolinux Turbolinux(32-bit)Linux Linux
Turbolinux_64Turbolinux(64-bit)Linux Linux
Ubuntu Ubuntu(32-bit)Linux Linux
Ubuntu_64Ubuntu(64-bit)Linux Linux
Xandros Xandros(32-bit)Linux Linux
Xandros_64Xandros(64-bit)Linux Linux
儿童素描Oracle Oracle(32-bit)Linux Linux
Oracle_64Oracle(64-bit)Linux Linux
名称描述⾪属制造商是否为x64系统Linux OtherLinux(32-bit)Linux Linux
Linux_64OtherLinux(64-bit)Linux Linux
Solaris OracleSolaris105/09andearlier(32-bit)Solaris Solaris
Solaris_64OracleSolaris105/09andearlier(64-bit)Solaris Solaris
平平仄仄是什么意思OpenSolaris OracleSolaris1010/09andlater(32-bit)Solaris Solaris
OpenSolaris_64OracleSolaris1010/09andlater(64-bit)Solaris Solaris
Solaris11_64OracleSolaris11(64-bit)Solaris Solaris FreeBSD FreeBSD(32-bit)BSD BSD
FreeBSD_64FreeBSD(64-bit)BSD BSD
奥康皮鞋怎么样OpenBSD OpenBSD(32-bit)BSD BSD
OpenBSD_64OpenBSD(64-bit)BSD BSD
NetBSD NetBSD(32-bit)BSD BSD
NetBSD_64NetBSD(64-bit)BSD BSD
OS2Warp3OS/2Warp3OS2IBMOS/2
OS2Warp4OS/2Warp4OS2IBMOS/2
OS2Warp45OS/2Warp4.5OS2IBMOS/2
OS2eCS eComStation OS2IBMOS/2
OS21x OS/21.x OS2IBMOS/2
OS2OtherOS/2OS2IBMOS/2
MacOS MacOSX(32-bit)MacOS MacOSX
MacOS_64MacOSX(64-bit)MacOS MacOSX
2008年北京奥运会名称描述⾪属制造商是否为x64系统MacOS106MacOSX10.6SnowLeopard(32-bit)MacOS MacOSX
MacOS106_64MacOSX10.6SnowLeopard(64-bit)MacOS MacOSX
MacOS107_64MacOSX10.7Lion(64-bit)MacOS MacOSX
MacOS108_64MacOSX10.8MountainLion(64-bit)MacOS MacOSX
MacOS109_64MacOSX10.9Mavericks(64-bit)MacOS MacOSX
MacOS1010_64MacOSX10.10Yomite(64-bit)MacOS MacOSX
MacOS1011_64MacOSX10.11ElCapitan(64-bit)MacOS MacOSX
MacOS1012_64macOS10.12Sierra(64-bit)MacOS MacOSX
MacOS1013_64macOS10.13HighSierra(64-bit)MacOS MacOSX
DOS DOS Other Other
Netware Netware Other Other
L4L4Other Other
QNX QNX Other Other
JRockitVE JRockitVE Other Other
VBoxBS_64VirtualBoxBootctorTest(64-bit)Other Other
如果没有指定–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
将第三步中创建的虚拟硬盘添加到虚拟机: