Portable virtual boxes

I’ve been looking for an alternative to VMWare and came across Sun’s VirtualBox. I also found the portable version, which is very cool if you want to setup a bunch of  virtual machines and share it with your colleagues. I installed CentOS5, which is a free linux distribution very similar to RedHat. To get access to the “Guest Additions” coming with VirtualBox, you need a little note how to setup the kernel headers.

Furthermore, if you want to make a copy of a virtual machine drive you created with virtualbox, you can use CloneVDI. Also very nice is the not-so-obvious-possibility to map network ports from the virtual machine to your local computer using the VBoxManage tool. For instance I rerouted the VM’s ports 22 (SSH), 80 (WWW) and 443 (SSL) to my local computer’s ports 2222, 2280 and 22443:

VBoxManage setextradata "CentOS5" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest_ssh/Protocol" TCP
VBoxManage setextradata "CentOS5" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest_ssh/GuestPort" 22
VBoxManage setextradata "CentOS5" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest_ssh/HostPort" 2222

VBoxManage setextradata "CentOS5" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest_www/Protocol" TCP
VBoxManage setextradata "CentOS5" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest_www/GuestPort" 80
VBoxManage setextradata "CentOS5" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest_www/HostPort" 2280

VBoxManage setextradata "CentOS5" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest_ssl/Protocol" TCP
VBoxManage setextradata "CentOS5" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest_ssl/GuestPort" 443
VBoxManage setextradata "CentOS5" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest_ssl/HostPort" 22443

If you’re walking your first steps in CentOS – like I did, you might find it helpful that the basic configuration screen which appears right after the installation can be re-run using just the setup command. And if you are coming from Debian (apt-get ..) or SuSE (yast2) be aware that the installer for repository packets in RedHat and CentOS ist called yum.