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.

  1. Create new virtual machine:

    $ VBoxManage createvm --name "Ubuntu 9.10" --register

  2. Create virtual hard disk (5 GB):

    $ VBoxManage createhd --filename "Ubuntu.vdi" --size 5000 --remember

  3. 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

Popular posts from this blog

Ubuntu 9.04 Receives OpenJDK 6 Certification

Can VLC 1.0 change the world?

ISRO All Set To Launch Bhuvan Mapping Service Today!