!!! VirtualBox 4.1.2

[{TableOfContents }]


\\I started looking at VirtualBox again, to assess it as a feasible low-cost virtualization solution.\\
I have been running my (2) servers on older laptops running in a closet at home. The laptops runs Ubuntu 8.04 (LTS) with an [OpenVZ|http://openvz.org] kernel.

Since this is getting rather old now (almost 4 years), and every now and then you want to have something new (the only difference between a man and a box is the price of his toy) and I had some (not disclosed) issues with backups, I thought let's see if VirtualBox is any good here.

!! My wishlist/requirements.

__1) - (recent) Ubuntu Guest OS__

I first had a look at the [http://openvz.org] site, but concluded that running a recent Ubuntu server is not a "default route".\\
Since my hardware also 

__2) - Easy Full Server Backup (off site)__

vbox clonehd ?

__3) - Easy re-sizing of disk images__

vbox modifyhd resize ?...

__4) - Remote console access__

vrde stuff with extension packs....

__5) - No Graphical (X) server required__

VBoxHeadless...

__6) - Capable of running 5 guests__

2 is minimal required...

__7) - Misc management capabilites__

stats , NATing, live migration ?

__8) - No dependency on hardware virtualization capabilities__


!! Resources
* [VirtualBox Home|http://www.virtualbox.org]
* [Downloads|https://www.virtualbox.org/wiki/Downloads]
* [User Manual|https://www.virtualbox.org/manual/UserManual.html]
* {Command Syntax|https://www.virtualbox.org/manual/ch08.html#idp5741680]

!! The Journey

Installation is smooth, o my testbed btw is my HP Dual Core 2GB laptop with {{Linux Mint 12 Lisa}}.
So simple installation with synaptic. 
\\But after a couple of hours you discover that you also need the [Extensions Pack|http://download.virtualbox.org/virtualbox/4.1.8/Oracle_VM_VirtualBox_Extension_Pack-4.1.8-75467.vbox-extpack], simply download and Startup VirtualBox => File => Preferences => Extensions. I needed the extensions to get VRDE to work, so I could startup a VM from the cmdline (so without a GUI) and get a VRDP session with it (using vinagre as vrdp client)
\\So the GUI now works fine, and we play a bit with creating VMs (Ubuntu 11.10 server), cloning, snapshot's, and this all works fine.

__TIP: Use VM names without blanks__


! Creating a VM

After fiddling a bit, I found the following command was good to create a VM:\\
%%(background-color : #d3ee03 )VBoxManage createvm --name Ubuntu2 --ostype Linux --register %%
%%small 
{{{
metskem@gneisenau ~ $ VBoxManage createvm --name Ubuntu2 --ostype Linux --register 
Virtual machine 'Ubuntu2' is created and registered.
UUID: 9e527adc-ddc4-41b9-8b9e-9e730f8b49a1
Settings file: '/home/metskem/VirtualBox VMs/Ubuntu2/Ubuntu2.vbox'
}}} %%

Let's see what the default attributes are after we have only created a VM, this is done with the {{showvminfo}} cmd: \\

%%(background-color : #d3ee03 )VBoxManage showvminfo Ubuntu2 %%

%%small 
{{{
metskem@gneisenau ~ $ VBoxManage showvminfo Ubuntu2
Name:            Ubuntu2
Guest OS:        Other Linux
UUID:            949c6764-b229-462b-9175-57ac6e9976b8
Config file:     /home/metskem/VirtualBox VMs/Ubuntu2/Ubuntu2.vbox
Snapshot folder: /home/metskem/VirtualBox VMs/Ubuntu2/Snapshots
Log folder:      /home/metskem/VirtualBox VMs/Ubuntu2/Logs
Hardware UUID:   949c6764-b229-462b-9175-57ac6e9976b8
Memory size:     128MB
Page Fusion:     off
VRAM size:       8MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
Synthetic Cpu:   off
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          off
PAE:             off
Time offset:     0 ms
RTC:             local time
Hardw. virt.ext: on
Hardw. virt.ext exclusive: on
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
State:           powered off (since 2011-12-31T12:12:45.649000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address: 
Teleporter Password: 
NIC 1:           MAC: 080027707CC7, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: Am79C973, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
Audio:           disabled
Clipboard Mode:  Bidirectional
VRDE:            disabled
USB:             disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Shared folders:  <none>

VRDE Connection:    not active
Clients so far:     0

Guest:

Configured memory balloon size:      0 MB
OS type:                             Linux
Additions run level:                 0

Guest Facilities:

No active facilities.
}}}
%%

Before you start creating things, you have to think about ''"how do I ever clean up the mess I created? "'', so the question here is, how do I delete the VM again? 
Well that can be done with the {{unregister}} subcommand:\\

%%(background-color : #d3ee03 )VBoxManage unregistervm Ubuntu2 --delete %%
%%small
{{{
%%(background-color : #d3ee03 )
}}}
%%

I use the --delete option to really get rid of everything including harddisks, saved states and log files, simply I don't want to find anything of it anymore. (I reran the {{createvm}} subcommand again after deleting is.)


Now we are happy with most of the default, but a few changes would be nice, so we go to the subcommand {{modifyvm}} :\\
%%(background-color : #d3ee03 ) VBoxManage modifyvm --name Ubuntu2  %%

%%small
!! Backup up

!! Resizing HD

!! Misc..


!! Summary of commands