Tag Archive: virtualbox

Prompted by an article in the latest totalXAKER magazine, I decided to give VirtualBSD a try 😉

VirtualBSD is a FreeBSD 8.1 desktop installation, packaged as VMware appliance. Go check their website out.

Now, being more familiar with VirtualBox than VMware, I decided to take the bit more complicated installation decribed here. I’m delighted to report that everything works as a charm out of the box.

My VirtualBox installation is the Oracle proprietary one (not virtualbox-ose) at version 3.2.12 straight out of their ubuntu ppa. Host system is as always my Linux Mint 9 (which is based on Ubuntu 10.4).

Here are some additional changes/remarks to the VirtualBSD walkthrough for VirtualBox:

  • I personally didn’t like the way the .vmdk is split in the VirtualBSD folder. No problem there, just register the main .vmdk in Virtual Media Manager beforehand, and clone it using “VBoxManage clonehd” to a new file. Then discard the whole folder and just use the new file instead. The UUID of the virtual hard disk changes with this process, but it’s no problem because internally, VirtualBSD doesn’t hardcode UUIDs in it’s /etc/fstab like some linux distros do.
  • I also changed the Network parameters in VirtualBox to “Bridged adapter” instead of “NAT”. VirtualBSD’s networking was smart enough to configure its IP via DHCP. Great!
  • What the vmware2vbox script does is first uninstall any VMware specific software, then install virtualbox-ose Guest Additions. Now, since I’m not using virtualbox-ose, that is not optimal, but everything seems to be in order (with maybe USB missing, but untested). Removing that and installing the right GuestAdditions is still a work in progress which I reserve for when I’m more acquainted with FreeBSD internals (lazy).

So, that’s all for this installment and I hope I have a great time exploring FreeBSD via VirtualBSD and get some more of you to check it out. Great little appliance there 😉


VirtualBSD running in VirtualBox


So, here’s a recipe for destruction:

  • Open your Windows VM you have for uni classes to write up a nice little recursive version of a simple algorithm.
  • Put some printf statements there for debugging too. Should look something like this:
int eukleid(int x, int y)
    printf("%10d %10d", x, y);
    if(y=0) return x;
    else return eukleid(y, x%y);
  • Fail to notice that y=0 instead of y==0 sends your program to endless recursion
  • After 10 minutes of crashing in Windows, decide that, what the hell, I’ll try it in my linux machine.
  • Compile program
  • Instead of running in a shell, double click the executable in nautilus by negligence.
  • Watch your /home partition run out of space in seconds!!!!

Now, what happened is that stdout and stderr of programs started outside a terminal get logged in .xsession-errors. The recursion shouldn’t have gone forever, but, by some strange bad luck, it filled up what was left of my 5GB headspace I had in /home

Not finding the culprit at first glance, I decided to close all programs and restart to single-user to look into it. Unfortunately, closing the VM meant virtualbox trying to update the VM’s xml file. THAT didn’t go well.

So, I was left with an unusable VM which took me a couple of hours to restore to some working condition.

Hey, it could have been worse! All the other programs (firefox, thunderbird to name a couple) handled the problem nicely. And thank Cthulu I had a separate partition for /home. Can’t imagine the mayhem if the root partition had zeroed out.

But everything is swell! I now know a couple tricks more than yesterday and opportunities like this don’t come everyday 😉 Such is the mantra of a troubleshooter soul like me! =)