How to create VirtualBox virtual machines from Command line
You can create VirtualBox virtual machines from command line in 3 easy steps. We will assume Ubuntu 9.10 in the following example.
- Create new virtual machine:
$ VBoxManage createvm --name "Ubuntu 9.10" --register
- Create virtual hard disk (5 GB):
$ VBoxManage createhd --filename "Ubuntu.vdi" --size 5000 --remember
- Modify virtual machine:
$ VBoxManage modifyvm "Ubuntu 9.10" --memory "512MB" --hda "Ubuntu.vdi" --dvd /home/toor/karmic-desktop-i386.iso --acpi on --boot1 dvd --nic1 nat
- –memory - memory size
- –hda - specify virtual hard disk
- –dvd - specify ISO image file
- –acpi on - enable ACPI support
- –boot1 - specify boot order
- –nic1 - network setting
Now you can start virtual machine by typing this command:
$ VBoxManage startvm "Ubuntu 9.10"
Comments
Post a Comment