PHPVirtualBox is a web-based program that allows you to control a remote Virtualbox GUI. PHPVirtualBox is ideal for systems that don’t have remote GUI access. Access is done via a browser. Remote virtual machines can be started and stopped, shutdown, and rebooted. In addition, snapshots can be taken, deleted and restored remotely via the browser. goes over the installation of PHPVirtualbox in this short article.

Things To Fix After Each Kernel Update

Every now and then, your running Linux distro will receive a kernel update. It’s a normal part of running a Linux distro, or any OS for that matter. Mac OS and Windows perform updates as well. Unfortunately in Linux, there are certain things that break after each kernel update. It’s annoying as all get out, but its a small price to pay for running a secure desktop. In this article, I will list 3 things that need fixing, and their solutions, after each kernel update.

Fix Virtualbox

sudo /etc/init.d/vboxdrv setup

Fix Alsa

sudo apt-get install module-assistant
sudo m-a update
sudo m-a prepare
sudo m-a a-i alsa

Fix Webcam

sudo rmmod uvcvideo
sudo modprobe uvcvideo

I rather not to do this after each upgrade, but it’s a fact of life in the Linux world. It’s a good thing, it doesn’t happen very often. Perhaps, in the future, when Linux becomes perfect, or near perfect, this unnecessary exercise can all be avoided all together.

USB Devices Unavailable in Virtualbox

If your USB device is not available in a virtual machine within Virtualbox, the most likely culprit is that you have a permission problem. You can easily fix this by adding your username to the ‘vboxusers’ group. You can do this by launching System > Administration > User and Groups. Click Manage Groups. Find the ‘vboxusers’ group. Make sure to check the checkbox to add your username to the ‘vboxusers’ group.

If you prefer the Terminal, you can run the command:

sudo usermod -a -G vboxusers username

You will need to restart your computer and rerun Virtualbox. Launch your virtual machine again. Your USB device should now be available for usage. Cool beans.

Boot Virtualbox From ISO

There are many advantages to having Virtualbox. One such advantage is having the ability to try out any Linux distro that you want, without deleting or touching one file or program on your Desktop computer. You can keep your desktop environment intact, and at the same time, play with a brand new Linux distro.

Trying out a new distro usually requires downloading the ISO from a project’s website, whether it’s from Ubuntu, Fedora, Linux Mint or openSuse. This whole process can get tedious after a while, not to mention all the wasted CDs and DVDs, each time a new distro comes out.

There is a way where you can avoid burning CDs and DVDs, and still be able to install a new Linux distro in a Virtualbox. So, instead of booting a distro from a CD or DVD drive, you will have to tell Virtualbox to boot from a virtual disk file or ISO.

Let’s say, you created a brand new virtual machine. You go through the process of assigning the appropriate resources, e.g. CPU, RAM, diskspace, etc. Once you are done, you will be asked to start the virtual machine.

The virtual machine, by default, looks for a bootable CD or DVD. Since you don’t have one CD or DVD on hand, it will complain that there is no bootable partition. You can now tell Virtualbox to use a virtual file instead of a CD or DVD.

You can do this by going to Devices > CD/DVD Devices > Choose a virtual CD/DVD disk file. Point it to your downloaded ISO file. Mine resides in my Downloads folder in my home directory. Here’s a snaphot of how to assign the CD/DVD drive to a virtual file.

Once you have the ISO selected, you will need to restart the virtual machine, to get it to boot from the ISO. The virtual machine should now boot with the latest distro you just downloaded. You can now proceed with the install of your latest Linux distro.

Multi Boot vs Virtual Machine

When I bought a 1TB hard drive last year, I had a decision to make. How would I slice up the new 1TB drive? I was running multiple operating systems on my computer desktop. I was using Linux 95% of the time and the other 5% on Windows, if at all.

So, I partitioned my drive and gave Windows 160GB. The rest went to Ubuntu. Knowing what I know now, I wouldn’t do it the way I did it. I would format all 1TB for the Linux partition. What about Windows? From hindsight, I could easily install Windows as a virtual machine instead of having a multi boot setup.

There are several advantages to using virtual machines over multi boot.

  1. You can easily launch a virtual machine without rebooting your computer.
  2. You can have both Linux and Windows running at the same time.
  3. You can clone as many instances of Windows.
  4. You can easily delete a virtual machine and free up the partition.

These are good enough reasons for me to prefer virtual machines over a multi boot setup. Knowing what I know, I would rather install Windows in a virtual machine using Virtualbox. So, if you’re at the same juncture of trying to make a decision whether to partition your drive. Don’t. Use virtual machines instead.

Increase Disk Space Of A Virtual Machine

One of the cooler technologies to arrive on the desktop the past  ten years is virtualization. With virtualization software, desktops are able to run multiple virtual environments on a host computer. You can easily run Windows on top of Linux and vice versa. Two of the most popular virtualization software that come to mind are VMWare and Virtualbox. I use the latter because it’s open-source.

My host system is Ubuntu 11.04 and I run several Linux distributions on it, as well as a single instance of Windows XP. Unfortunately, I’ve only allocated a 10GB for my Windows XP virtual machine, which is the default size when you create a new virtual machine or VM. After several weeks of normal use, I found out that I needed more disk space.

Increasing the disk space on the VM is not quite the easy as I thought it would be. In fact, the process was more elaborate than first conceived. I’m not going to write every detail of what I did, but I will explain the high level process. Hopefully, you’re able to get the idea. The process was trial and error, but the result was successful. I was able to get results twice now, on two different systems.


5 Step Process

  1. Clone the Windows XP virtual machine to a USB hard drive.
  2. Create a new virtual machine with a bigger disk space.
  3. Use GParted to create a new partition. NTFS in this case.
  4. Restore the Clonezilla image to the new virtual machine.
  5. Run GParted again to allocate the increased disk space.

Step 1.

Clonezilla a free software disaster recovery and disk cloning utility that you can readily download online. Choose the latest stable version from the website. Make a bootable CD from the ISO that’s provided on the download. Boot Clonezilla on your old virtual machine. You may need to disable the hard drive from your boot up options to make the virtual machine boot from Clonezilla. Make sure you are able to add the USB drive to the virtual machine. Follow the instructions how to clone your old partition to the USB drive.

Step 2.

Create a new virtual machine with a bigger disk space. I used 50GB this time around. I assume you are familiar with Virtualbox how to create a new virtual machine. Don’t load any OS just yet. Just leave it blank.

Step 3.

Boot the GParted on the new virtual machine. Just follow all the instructions on how to create a new partition. Allocate all 50GB to the new partition using the NTFS file system. NTFS is the native file systems for Windows.

Step 4.

Boot Clonezilla on the new virtual machine. Restore your Clonezilla image that you stored on your USB drive. Just follow the instructions how to restore a Clonezilla image.

Step 5.

Run GParted again. The current OS (in this case, Windows XP) is still using the older and smaller partition. It doesn’t recognize the new and unallocated partition on the drive. So, run GParted again and increase the size of your current partition. Use all of the unallocated disk space on the partition. Reboot. Windows XP ran a Chkdsk on bootup, and then rebooted. I checked the disk space and sure enough, it says 50GB.


There you have it. How to increase drive space of your existing virtual machine.

Fix Virtualbox After Kernel Upgrade

Ubuntu 11.04 recently upgraded to Linux kernel 2.6.38-11. Unfortunately, every new Linux kernel introduced on your system will break your Virtualbox setup. This article will show you how to fix Virtualbox with a new kernel. The error will appear if you try to launch a Virtual Machine. You will most likely get the following errors:

As detailed in the error box, you will need to run vboxdrv setup to fix the problem. All you need to do is open up the Terminal and type this command:

$ sudo /etc/init.d/vboxdrv setup

As displayed in the Terminal, the vboxdrv setup will stop the current Virtualbox kernel module, uninstall it, register a new kernel module, and finally start it. This completes the Virtualbox upgrade that’s necessary after each Linux kernel upgrade.

So, in the future, if your Ubuntu distro upgrades to a newer Linux kernel, you know exactly what to do to make your Virtualbox work with the latest kernel.

Re-Install Virtualbox VMs

I recently had to re-install my Ubuntu desktop due to issues with pulling back from using Gnome 3. I was getting dependencies errors was when I tried to run “apt-get” from the Terminal. I tried fixing it for half an hour, but I decided to go for a clean install instead to avoid wasting anymore time. Anyways, I have 5 virtual machines that I wanted to save and re-install on a new clean install of Ubuntu. Here are the steps that I took to backup and re-install Virtualbox VMs on a new clean machine.

  1. Back up the “Virtualbox VMs” folder to a USB drive.
  2. Re-install Ubuntu on the same machine or on another.
  3. After the clean install, copy back “Virtualbox VMs” folder to user home.
  4. Then, install Virtualbox.
  5. Start Virtualbox.
  6. Add VMs by invoking Machine > Add.
  7. Point it to corresponding .vdi file.
  8. Repeat until all VMs are re-installed.
  9. Run the VM to validate if successful.
Pretty simple.

Update Virtualbox on Ubuntu

This article documents how to install or update to the latest version of Virtualbox in any Ubuntu release. In my case, I’m still using Ubuntu 10.04 LTS. The current Virtualbox at the time of this writing is version 4.1.2. With my Ubuntu 10.04 Lucid Lucy install, my default Virtualbox version with the repository was 3.1.8 — which is pretty old. In Ubuntu 11.04, the default Virtualbox version is 4.0.6, which is rather new, but certainly not the latest.

The following instructions will walk you through how to install or update to the latest version of Virtualbox in any Ubuntu release.

  1. Make sure Virtualbox is powered off (if installed).
  2. From the Terminal, remove the old Virtualbox (if installed)
  3. sudo apt-get remove virtualbox-ose
    sudo apt-get remove virtualbox-4.0
  4. Download Virtualbox. Choose your Linux distro and CPU type.
  5. Open the deb file with GDebi Installer and install
  6. Once installed, start Virtualbox.

That’s it.