一、VirtualBox无界面启动方式
‘C:\Program Files\Oracle\VirtualBox\’
为VirtualBox安装目录
‘Windows7’
你要启动的虚拟机名称
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm "Windows7" --type headless
这样就可以无界面静默启动了
如果需要开机启动,把命令保存为bat,设置开机自启
@echo off
@title VirtualBox
mode con cols=100 lines=20
echo.等待5秒
TIMEOUT /T 5
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm "Windows7" --type headless
可以放到启动目录
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
或者写入注册表启动项
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"虚拟机"="D:\\Windows7.bat"
二、VMware无界面启动方式
‘C:\Program Files (x86)\VMware\VMware Workstation\’
为VMware安装目录
‘D:\Windows7\’
为启动的虚拟机目录
软 关机
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" stop "D:\Windows7\Windows7.vmx" soft
硬 关机
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" stop "D:\Windows7\Windows7.vmx" hard
界面启动
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" start "D:\Windows7\Windows7.vmx" gui
无界面启动
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" start "D:\Windows7\Windows7.vmx" nogui
软 重启
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" reset "D:\Windows7\Windows7.vmx" soft
硬 重启
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" reset "D:\Windows7\Windows7.vmx" hard