〖Linux〗使用纯命令行来操作VBOX(宿主机不需要X11 Server)

1. Linux安装vbox,略过

2. 查看已安装扩展插件

    VBoxManage list extpacks

3. 创建一个vm:

    VBoxManage createvm --name "testvm" --register

4. 修改vm属性:

    VBoxManage modifyvm "testvm" --memory 1024 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0 --ostype Ubuntu

5. 创建vm虚拟硬盘:

    VBoxManage createvdi --filename ~/VirtualBox VMs/testvm/testvm-disk01.vdi --size 10000

6. 修改虚拟硬盘属性:

    VBoxManage storagectl "testvm" --name "IDE Controller" --add ide

7. 链接iso文件:

    VBoxManage storageattach "testvm" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium ~/VirtualBox VMs/testvm/testvm-disk01.vdi

    VBoxManage storageattach "testvm" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium /iso/ubuntu-12.04.1-server-i386.iso

8. 启动虚拟机:

    VBoxHeadless --startvm "testvm" &

    VBoxHeadless --startvm "testvm" -e "TCP/Ports=4444" & # VRDE端口4444

    VBoxHeadless --startvm "testvm" --vrde off & # 强制关闭VRDE默认3389端口

9. 链接VRDE server:

    ​rdesktop -a 16 <IP_address_host_machine:port_number>

参考来源:http://xmodulo.com/2013/05/how-to-create-and-start-virtualbox-vm-without-gui.html 

原文地址:https://www.cnblogs.com/scue/p/3958684.html