卡饭网 > virtualbox > 正文

windows后台启动VirtualBox虚拟机

来源:本站整理 作者:梦在深巷 时间:2013-12-19 14:47:10

不太习惯Linux的使用,但也很喜欢使用Linux命令操作方式和Linxu上的开发或者折腾。所以一直使用虚拟机,在Windows下用SSH连接Linux。但Virtualbox启动总会有界面出现,感觉老别扭。在网上搜了一下还真找到方法,其实Virtualbox是提供了后台启动的。只是不是默认的。

查看有哪些虚拟机

VBoxManage list vms

查看虚拟的详细信息

VBoxManage list vms --long

查看运行着的虚拟机

VBoxManage list runningvms

开启虚拟机在后台运行

VBoxManage startvm <vm_name> -type headless

开启虚拟机并开启远程桌面连接的支持

VBoxManage startvm <vm_name> -type vrdp

改变虚拟机的远程连接端口,用于多个vbox虚拟机同时运行

VBoxManage controlvm <vm_name> vrdpprot <ports>

关闭虚拟机

VBoxManage controlvm <vm_name> acpipowerbutton

强制关闭虚拟机

VBoxManage controlvm <vm_name> poweroff

命令行进入到你的Virtualbox安装目录试试这些命令就清楚了。比如我的是cd D:ApplicationVirtualBox 然后可以试试这些命令。

要后台启动只要在桌面新建一个批处理文件(.bat文件)。 写上一句代码就可以了:

我的 是 D:ApplicationVirtualBoxVBoxManage.exe startvm UbuntuServer -type headless 把路路径和虚拟机名改成自己的就可以了。以后每次要启动双击文件就可以了。 若要开机启动把这个文件放入菜单——启动文件里就可以。 。。。。 大功告成!!!!!

相关推荐