44a8 VirtualBox - Telecomix Crypto Munitions Bureau


From Telecomix Crypto Munitions Bureau

Jump to: navigation, search

VirtualBox is a tool brought to us by the nice company Sun. It is open source and works on UltraSPARC and x86 machines, I think.


[edit] Get up and running

Simple stuff..

[edit] Emulation or virtualization?

There is no idea to bother about emulating machines, as that will be slower than virtualization. However, only newer processors can handle virtualization. To check if your processor has support for hardware virtualization you can have a look inside /proc/cpuinfo :)

The CPU flags you need are either vmx or svm. vmx is for intel processors, svm is for AMD processors.

If your processor does not have these features, VirtualBox will have to emulate those parts of the operating system that runs in ring 0 (ie. the operating systems kernel.) Ordinary programs will run as ordinary within ring3 on the host.. if i have understood it correct.

For example, if cat /proc/cpuinfo says something like this:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz
stepping        : 10
cpu MHz         : 2675.580
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 3
cpu cores       : 4
apicid          : 3
initial apicid  : 3
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx
fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx smx
est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm
bogomips        : 5351.23
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

It means that you have support for hardware virtualization. Notice that the vmx flag is set :D

[edit] Using virtualbox

Users that you wants to be able to use virtualbox should be added to the group vboxusers. adduser lennart vboxusers will add lennart to that group.

Using virtualbox is simplest with a GUI. If you are using SSH to access your server, make sure the -X flag is set. Just type virtualbox and you are up and running. Everything after this is very much self-explaining.

[edit] Manuals and tutorials

[edit] Debian / Ubuntu

Use this debian software repository generator to see what to add to your /etc/apt/sources.list file.

For example, using the above generator, we see that the VirtualBox repository is

deb http://download.virtualbox.org/virtualbox/debian lenny non-free

To use the repository, you should add the repositories GPG key to verify that the files you download in fact comes from the trusted (?) programmers and not from some evil hacker. Type: " wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | apt-key add -". If that does not work because you get an error message, please read the error message and copy the GPG key signature. Then type something like "gpg --recv-key (signature-be-here) && gpg --export-key (signature-be-here) | apt-key add -". Then apt-get update, and install. Done.

Personal tools