您现在的位置: 万盛学电脑网 >> 程序编程 >> 服务器教程 >> 正文

windows后台启动VirtualBox虚拟机

作者:佚名    责任编辑:admin    更新时间:2022-06-22

不太习惯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

强制关闭虚拟机