Environment: Ubuntu 15.04 64bit,virtualbox 5.0.16
Preparation: Download and install virtualbox,virtualbox-extensions, prepare ISO system files, such as Archlinux.iso.
1. Set up a good VBox directory.
$ cd
$ cd virtualbox\ vms/mkdir arch$ CD Arch
2. Create a new VBox disk,--size the parameter setting size, in M.
10000
3. Create a new VBox virtual machine file,--ostype set the system format for the virtual machine installation (Windows/ubuntu, etc.), you can use Vboxmanage list ostypes to view the system formats supported by VBox.
" linux_64 "--register
4. Create a new SATA disk controller and bind the newly created disk in step <2> to the virtual machine file.
" SATA Controller " --add SATA--"SATA Controller"00 --type HDD--medium Arch.vdi
5. Create a new IDE controller, set it to DVD, and bind the iOS file to the DVD, note--medium for your ISO path.
" IDE Controller "--"IDE Controller"00 --type dvddrive--medium/path /to/arch.iso
5. View your network card and set the VBox Nic as the bridge.
$ ifconfig
Output:
Wlp18s0 Link encap:ethernet HWaddr xx:xx:xx:xx:xx: xx inet addr:192.168. 0.101 bcast:192.168. 0.255 Mask:255.255. 255.0
My network card is WLP18S0, so bind the VBox nic1 NIC to it.
$ vboxmanage MODIFYVM Arch--nic1 bridged--bridgeadapter1 wlp18s0
6. Set IO control, Startup items, memory, etc.
$ vboxmanage MODIFYVM arch----boot1 DVD--boot2 disk--boot3 None--1024x768
7. Set RDPE Remote Desktop.
3389 0.0. 0.0
8. Open the VBox in the background.
$ vboxmanage STARTVM Arch--type=headless
9. Now you can connect the backstage with Rdesktop.
$ rdesktop localhost:3389
10. Exit the ISO on the DVD when the installation is complete.
" IDE Controller " 0 0 --type dvddrive--medium None
11. View the VBox system that is running, and turn off the computer.
$ vboxmanage List runningvms$ vboxmanage CONTROLVM Arch Poweroff
Finally, the rest of the features can see Help.
$ vboxmanage--help
Reference: https://www.perkin.org.uk/posts/create-virtualbox-vm-from-the-command-line.html
Install Linux system using vboxmanage under Linux command line