« HOWTO: Stop Folding at Home Scaling My CPUInstalling VirtualBox »

HOWTO: Create a New VM with VirtualBox

27/11/09

HOWTO: Create a New VM with VirtualBox

This is how to create a VirtualBox machine when you what tot use the command line or you cannot access the GUI. We will create a machine that will have the following setup

  • vbTest
  • Ubuntu Linux 64bit
  • 1Gb RAM
  • 8Gb Hard drive
  • 1 Network card (bridged to the local nic)

Lets create the the new machine called vbTest. We can register it here or we can use the registervm later. Its less typing this way :)

VBoxManage createvm --name vbTest --ostype Ubuntu_64 --register
VirtualBox Command Line Management Interface Version 3.0.12 
(C) 2005-2009 Sun Microsystems, Inc. 
All rights reserved. 
 
Virtual machine 'vbTest' is created and registered. 
UUID: d006a9e0-289c-46bf-982b-a4d0395b6484 
Settings file: '/data/VirtualBox/Machines/vbTest/vbTest.xml'

Create the hard disk called vbtext.vdi, 8Gb will be large enough. the remember flag registers the hard drive so we can install it in the virtual PC later.

VBoxManage createhd --filename vbTest.vdi --size 8000 --remember
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% 
Disk image created. UUID: 4efde4f9-0ed0-4795-ac28-df31e8ec096c

We will add some RAM. 1Gb should be plenty for now.

VBoxManage modifyvm vbTest --memory "1024MB" --acpi on

Install the hard drive into the machine.

VBoxManage modifyvm vbTest --hda vbTest.vdi

Register DVD into known list of DVDs and then add it to the VM

VBoxManage modifyvm vbTest --dvd /data/Ubuntu_ISO/ubuntu-9.10-server-amd64.iso

Set up the boot order for the dvd and hard drive, and turn off the floppy disk boot selection.

VBoxManage modifyvm vbTest --boot1 dvd --boot2 disk --boot3 none --boot4 none

The network card settings are next

VBoxManage modifyvm vbTest --nic1 bridged --nictype1 82540EM

Turn on the virtual remote desk top (only if you are using the non free version) and turn on physical address extensions which are necessary when installing Ubuntu server.

VBoxManage modifyvm vbTest --pae on --vrdp on
Note: If you want to use USB you must have the non-free version of VirtualBox AND add the following to your /etc/fstab. Where NNN = the GID for vboxusers. Look in /etc/groups for the value on your system.
none /proc/bus/usb usbfs devgid=NNN,devmode=664 0 0

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
What can birds and aeroplanes both do?
antispam test