17 4 / 2012
Virtualization pt 1: Debian
I finally gave in and made a Debian virtual machine (using VMWare Fusion). Yes, I know, I should use VirtualBox, but I’ve never had good experiences with free software interaction with the OS X windowing system. Qt does an acceptable Cocoa interface, but Tcl/Tk and X window software are both unbearably slow. So when MacUpdate’s latest package included VMWare, I decided to spring for it. (Ironically, the day after I spent money on proprietary software, I went to hear Richard Stallman speak…)
I downloaded Debian CD1 with Transmission in about 30 minutes. It took me an embarrassingly long time to figure out how to get my virtual machine to mount the iso. I probably did the VMWare setup incorrectly. It’s possible if I had specified the ISO during the setup process, it would have mounted it automatically, but I got the impression that the ISO would be the location of the VM. Anyway, I did custom virtual machine for Debian 6 and had to click on the optical drive icon and select the ISO to mount it.
I did command line install and kept most of Debian’s defaults for the installation, which went smoothly. But when I logged in, I discovered that the account I had created for myself did not have admin powers, sudo wasn’t installed, nor was synaptic package manager. Um.
Fortunately I had a Debian guru next to me. Had to set up apt-get to use FTP package retrieval (it asked for the CD back). Got sudo, got sudo powers, got synaptic, etc etc. We were both a little shocked at how bare bones CD1 truly was. I should count myself lucky that it had Iceweasel…
Anyway, the final “fun” step was installing VMWare Tools to the VM, necessary to allow resizing and native display of the VM window in my OS. On Linux, it’s installed with a Perl script. So I installed Perl, told VMWare to install the tools. Fortunately it automatically mounted the “CD” for me.
First failure in the perl script was that /usr/bin/gcc wasn’t a valid path to gcc. After determining that was a symlink, I offered it /usr/bin/gcc-4.4, which it also declined. Google suggested that it needed gcc-4.3 and linux-headers, so I installed the latter (which apparently depends on gcc-4.3). The Perl script took /usr/bin/gcc-4.3. Next, it said that it couldn’t find the kernel headers in "". Shocking.
I offered it multiple paths to the kernel headers, Googled more, and eventually decided that the Perl script should know where they were but the script might need to restart or the system might need to reboot. I rebooted the VM (it’s nice how fast everything is with my SSD).
Of course that unmounted the CD and deleted the unzipped VMWare Tools installer from /tmp. This time I wasn’t taking any chances; I copied the tgz to the VM before unzipping it. On second try, the Perl script completed (albeit confirming approximately 500 trivial steps along the way) and the tools built without error. I can now do fullscreen and simulated windowing! Yay!
So, to get VMWare Tools to work on a Debian VM:
- Have root powers
- Install Perl
- Install linux-headers
- Reboot
- Mount/unzip/run the Perl script
Expect future fun posts about Windows. Maybe.