|
/Admin/virtualization/virtualBox:
Linux Guests in VirtualBox
I recently had the idea that I might like to have a totally separate environment for Linux software development and other kinds of risky, desktop-breaking behavior, and I also wanted to see what ArchLinux[2] looked like. So I installed both ArchLinux and another instance of Debian, both as VirtualBox virtual machines on my Debian Linux host.
The Debian install from a net-install CD was an absolute slam dunk, dead easy. The ArchLinux install was a bit problematic as the installer crapped-out several times, forcing multiple restarts, and the 2nd last time my laptop (sitting on a dock where the CD drive is located) over-heated and shutdown on me in mid-install (yet another restart....)
Then I discovered a very interesting and useful feature of VirtualBox: one can mount the ISO image (a file) of the installation CD, and install from that! Ie. no need to burn the CD, no need for a CD-drive to boot from for the installation. You can download the ISO installer for your desired operating system, and boot right off this downloaded file on your hard drive to install it into a VirtualBox virtual machine. Great for a small laptop without a CD drive! Great for quickly trying out an interesting OS!
So I got ArchLinux installed as well. So far so good. Though on a tangential note, ArchLinux is even more of a manual, command-line kind of distribution then Debian. ArchLinux is definitely simpler then Debian in some technical ways, but not in ways that would make it easier to learn the ropes for newcomers to Linux. Beginners should start with a different distribution!
ArchLinux Guest Additions:
Next issue: getting guest additions working. Debian has a package called virtualbox-guest-additions which I installed on my Debian host OS. And was presented with absolutely zero documentation, no "auto-run" behavior as with a newly-mounted CD on a Windows OS. Nothing changed, even after I mounted the CD ISO installed by the virtualbox-guest-additions package on my ArchLinux guest OS. Finally I stumbled across a site[1] with some good advice. So (on ArchLinux) I mounted the ISO as a virtual CD drive, and ran the installer on the CD manually:
mount /media/cd
cd /media/cd
./VBoxLinuxAdditions-x86.run
Note that to get this to work I had to mount the ISO with the "exec" option, otherwise I got an error message that resembled (from memory) this:
/bin/sh: bad interpreter: permission denied
This script then went through what looked like quite a long process of building and installing several modules into the ArchLinux kernel. After this process and a reboot, mouse integration sort of works, until something locks up and the virtual machine X-server refuses to answer to the mouse for a while. Switching back and forth between workspaces seems to restore function(?) Full screen also works. Final verdict on this TBD....
Folder sharing between host and guest OSes also works, thanks to a helpful forum post[3]. In the running ArchLinux virtual machine window I clicked on "Devices" --> "Shared Folders..." and added a Unix path to the Host directory I wanted to share with Guest, as well as a name. The name is what you need on the Guest side. (A reboot may be necessary....) In the guest, the share can then be mounted with
mount -t vboxsf shareName /path/to/mount/point
My /etc/fstab entry looks like this:
virtualBoxShare /media/shared vboxsf defaults 0 1
where virtualBoxShare is the afore-mentioned share name.
Debian Guest Additions:
Debian has a number of other guest addition-related modules that look like they should be installed on a Debian guest:
virtualbox-ose-guest-modules-2.6-686
virtualbox-ose-guest-source
virtualbox-ose-guest-utils
virtualbox-ose-guest-x11
I first tried virtualbox-ose-guest-modules-2.6-686. After installation and a reboot, no change. So I removed it and tried the other three (they are interdependent and get installed together). Again, a period of module building. A reboot. And now mouse integration and folder sharing work in my Debian guest (exactly like the preceding experience with ArchLinux) but full screen mode has not yet presented itself. I expect it will with future releases.
ArchLinux Guest Additions Revisited:
And after my Debian experience, when I go back to ArchLinux I am seeing that the ArchLinux repositories also have native guest addition modules. I guess I will probably try those out when my current ArchLinux guest additions break, probably on the next kernel upgrade.
[1] http://www.mydigitallife.info/2009/11/25/how-to-install-virtualbox-guest-additions-in-linux-ubuntu-debian-fedora-opensuse-red-hat-and-more/
[2] http://www.archlinux.org/
[3] http://vmetc.com/2008/08/06/virtualbox-shared-folders-protocol-error-in-ubuntu-guest/
posted at: 07:32 | path: /Admin/virtualization/virtualBox | permanent link to this entry