VBoxManage经常使用命令用法

VBoxManage命令经常使用用法
系统环境:CentOS 6.3 x86_64
VirtualBox版本:4.2.8
VirtualBox扩展版本:4.2.8前端

增长一个新的扩展包
VBoxManage extpack install <.vbox-extpack>后端

卸载指定扩展包
VBoxManage extpack uninstall <name>微信

显示已安装的扩展包
VBoxManage list extpacks网络

移除安装扩展包失败或卸载扩展包失败时可能遗留下来的文件和目录
VBoxManage extpack cleanupless

列出全部的虚拟机
VBoxManage list vmside

显示全部虚拟机的配置信息
VBoxManage list vms --longui

列出全部正在运行的虚拟机
VBoxManage list runningvms操作系统

列出VirtualBox所能识别的全部客户机操做系统
VBoxManage list ostypes线程

显示主机的Hardware time、CPU、内存、操做系统及系统版本信息
VBoxManage list hostinfo
//输出中的"Processor count"指的是CPU的线程数server

列出全部VirtualBox支持的虚拟磁盘后端
VBoxManage list hddbackends

列出VirtualBox当前正在使用的虚拟磁盘的信息
VBoxManage list hdds

列出虚拟机配置文件中加载的虚拟磁盘镜像的信息
VBoxManage list dvds

显示VirtualBox的一些全局设置信息,包括Guest Additions文件的路径
VBoxManage list systemproperties

显示虚拟机的配置信息
VBoxManage showvminfo <uuid>|<name>

详细显示虚拟机的配置信息
VBoxManage showvminfo <uuid>|<name> [--details]

建立并注册一个虚拟机
VBoxManage createvm --name "Win 2008" --register

将虚拟机Win 2008重命名为win2008
VBoxManage modifyvm "Win 2008" --name win2008

将虚拟机win2008的操做系统类型改成Windows 2008(32位)
VBoxManage modifyvm win2008 --ostype Windows2008

修改虚拟机的内存大小
VBoxManage modifyvm <uuid|name> [--memory <memorysize in MB>]

将虚拟机win2008的CPU个数设为2个
VBoxManage modifyvm win2008 --cpus 2

将虚拟机的第一启动设备设为硬盘
VBoxManage modifyvm win2008 --boot1 disk

将虚拟机win2008的第一个网卡的网络链接方式设为桥接
VBoxManage modifyvm win2008 --nic1 bridged

将虚拟机win2008的第一个网卡的网卡芯片类型设为82540EM
VBoxManage modifyvm win2008 --nictype1 82540EM

将虚拟机win2008的第一个网卡桥接到host的eth0网卡上
VBoxManage modifyvm win2008 --bridgeadapter1 eth0
//前提是虚拟网卡1使用的网络链接方式是桥接

开启VirtualBox remote desktop extension (VRDE) server
VBoxManage modifyvm win2008 --vrde on
//VRDE server的默认监听地址为0.0.0.0,默认监听端口为3389

以VBoxHeadless做为前端来启动虚拟机win2008
VBoxManage startvm win2008 --type headless

建立一个大小为100G的虚拟硬盘
VBoxManage createhd --filename win2008.vdi --size 102400

给虚拟机win2008添加一个IDE控制器
VBoxManage storagectl win2008 --name "IDE Controller" --add ide --controller PIIX4

将win2008.vdi文件做为虚拟机win2008的第一块IDE硬盘
VBoxManage storageattach win2008 --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium win2008.vdi

配置第一个IDE光驱,并挂载安装光盘
VBoxManage storageattach win2008 --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium server_2008_64.iso

将主机的/home/vbox目录共享给Guest虚拟机win2008,且共享名为share
VBoxManage sharedfolder add win2008 --name share --hostpath /home/vbox
//该命令必须在关闭虚拟机以后才能执行

将主机的/home/vbox目录瞬间共享给Guest虚拟机win2008,且共享名为share
VBoxManage sharedfolder add win2008 --name share --hostpath /home/vbox --transient
//该命令在虚拟机运行时就能够执行,但当虚拟机关闭(指虚拟机的状态为poweroff)后该共享文件夹不会保留

备注:
1.使用VBoxManage modifyvm命令的前提是虚拟机已经处于关机状态;

2.在CentOS 6.3 x86_64 + VirtualBox 4.2.8 + Windows Server 2008 32bit(VirtualBox建立的虚拟机)的环境下,网卡芯片的默认类型为Am79C973,若使用这个类型的网卡芯片,Windows Server 2008 32bit 装好后网卡是没有驱动的;

 

本人微信:   本人QQ:

相关文章
相关标签/搜索