Twitter: @riku

VirtualBox 命令行工具 VBoxHeadless Man 文档(英文)

VBoxHeadless 用于启动 Virtualbox 无头 VM ,也就是不用显示界面。会开启 3389 端口,运用 Windows 上的远程桌面连接工具就可以显示这个 VM 。

Usage:
   -s, -startvm, --startvm <name|uuid>   Start given VM (required argument) // 启动 VM
   -v, -vrdp, --vrdp on|off|config       Enable (default) or disable the VRDP // 开启 VRDP 协议,默认是开启的。
                                         server or don't change the setting
   -p, -vrdpport, --vrdpport <ports>     Comma-separated list of ports the VRDP // 指定 VRDP 端口
                                         server can bind to. Use a dash between
                                         two port numbers to specify a range
   -a, -vrdpaddress, --vrdpaddress <ip>  Interface IP the VRDP will bind to // 指定 VRDP IP
   -c, -capture, --capture               Record the VM screen output to a file
   -w, --width                           Frame width when recording
   -h, --height                          Frame height when recording
   -r, --bitrate                         Recording bit rate when recording
   -f, --filename                        File name when recording.  The codec
                                         used will be chosen based on the
                                         file extension

样例 :无头启动名为 mini 的 VM 并录制视频文件到 test.mpg.

VBoxHeadless -s mini -c -w 1024 -h 768 -f test.mpg -r 300000

关联文档:

VirtualBox 命令行工具 VBoxManage Man 文档(英文)