VBoxManage Introduction
https://www.virtualbox.org/manual/ch08.html#idm3663
As briefly mentioned in Section 1.17, “Alternative Front-Ends”, VBoxManage is the command-line interface to Oracle VM VirtualBox. With it, you can completely control Oracle VM VirtualBox from the command line of your host operating system. VBoxManage supports all the features that the graphical user interface gives you access to, but it supports a lot more than that. It exposes all the features of the virtualization engine, even those that cannot be accessed from the GUI.
Display a list of virtual machines created by VirutalBox.
VBoxManage list vms
create virtual machine name
specify the virtual machine name to create the VirualBox configuration file.
VBoxManage createvm --name CentOS-6.4-x86_64-minimal
Virtual Machine Settings
Registered the virtual machine, there is nothing set up for the virtual machine, so set up the virtual machine.
In addition to the specifications of the above virtual machines, the clipboard sharing is specified bidirectionally, and the boot order is changed from HDD to DVD to NET here.
VBoxManage modifyvm CentOS-6.4-x86_64-minimal --ostype RedHat_6
Create a virtual hard disk
Create a virtual hard disk with a fixed size. Although you can specify an arbitrary folder with the -filename option, it is created by specifying the folder to save the VirtualBox.
VBoxManage createhd --size 8192 --variant Fixed --filename F:/VirtualBox/CentOS-6.4-x86_64-minimal/CentOS-6.4-x86_64-minimal.vdi
Add storage controller
Add a SATA(Serial ATA) controller to assign virtual hard disk and virutal DVD drive. In addition to sata, ide / sscsi / floppy can be specified. Also, by specifying -bootable on, it is set as a Bootable controller.
$ VBoxManage storagectl CentOS-6.4-x86_64-minimal --name SATA --add sata --sataportcount 5 --bootable on
Assign virtual hard disk
After adding the storage controller, assign the virtual hard disk by specifying the name of the added storage controller.
VBoxManage storageattach CentOS-6.4-x86_64-minimal --storagectl SATA --port 1 --type hdd --medium F:/VirtualBox/CentOS-6.4-x86_64-minimal/CentOS-6.4-x86_64-minimal.vdi
Assign virtual DVD drive
Like the virtual hard disk, assign a virtual DVD drive. The installation media specifies CentOs – 6.4 x86 – 64 minimal .iso.
$ VBoxManage storageattach CentOS-6.4-x86_64-minimal --storagectl SATA --port 2 --type dvddrive --medium I:/ISO/CentOS/CentOS-6.4-x86_64-minimal.iso
Starting a virtual machine
Now that the setting of the virtual machine has been completed, start the virutal machine.
VBoxManage startvm CentOS-6.4-x86_64-minimal