Home > software > VirtualBox: Debian guest on Mac OSX host with Guest Additions

VirtualBox: Debian guest on Mac OSX host with Guest Additions

Well, well…

I recently decided to play a bit with VirtualBox on Mac OSX 10.6.8 (Snow Leopard).

But from time-to-time I  just want to quickly compile some (open) source code which is easily/readily available on Linux before trying it on OSX.

First I got VirtualBox for OSX and installed the .dmg package without problems.

Then I decided to have a look into Debian 6.0 (squeeze). I just took the “Small CDs” for amd64 with its 180MB.

I created a standard new Linux Debian 64 VirtualBox machine with standard configurations. Then I loaded the Debian .iso image into the virtual drive (click on the CD/DVD icon under Storage > IDE controller) and started the machine. Once again I followed the standard installation. The machine was connected to the internet and it actually downloaded some 1062 packages… Took some 40min to pull them down. At the end it asked to reboot and Debian was finally running.

The final touch is to install/setup the Guest Additions so that the Debian guest can reach the Mac OSX host directories. For that I went on the VirtualBox menu: Devices > Install Guest Additions. It mounts for you a virtual CD/DVD on Debian /media/cdrom.

Next I opened on Debian: Accessories > Root Terminal (You will need the root password).

Then I simply issued: # sh /media/cdrom/VBoxLinuxAdditions.run

The installation script removed the existing and added another kernel module into the Debian guest.

Next I just had to add a shared folder into the virtual machine (Devices > Shared folders…), pointing to a directory on the Mac OSX host. I also marked it as “Auto-mount” and “Make Permanent“. Then I rebooted the Debian virtual machine.

By then I could see a directory mounted in /media/sf_[name_of_shared] but I had no access to it. The final step is to add your [your_user_name] into the vboxsf group.

The fix is to launch again the Root Terminal (root again) and issue: # adduser [your_user_name] vboxsf

A final reboot on the guest and now you should be able to reach your shared folder….

PS.:  Don’t type “#”, it means the command prompt or shell on the terminal….

Enjoy 😉

Categories: software Tags: , ,
  1. Matteo
    December 13, 2012 at 9:21 am

    why amd64?

    • December 13, 2012 at 10:40 am

      Because I wanted a 64bit version. The amd64 relates to x84_64 architecture, whereas i386 corresponds to 32bit or x86. Either would work, even if you machine is 32bits. However, I guess it makes sense to create a virtualbox machine with the same architecture of the Debian image you want to install.

  1. No trackbacks yet.

Leave a comment