SurlyJake Blog

Install Open-VM-tools on Debian 6 Squeeze

| Comments

Installing Open Virtual Machine Tools is a nice alternative to managing and installing the vmware tools package that comes with Vmware’s hypervisor products.  It allows you to use APT to manage all the dependencies and updates. Module assistant will recompile the kernel modules for you automatically when you update kernels too.

I have verified that this configuration works under ESXi 4.1.0, 260247 and a new Squeeze install. All of the essential functions like being able to see guest OS information on the Vsphere summary page and performing “Shut Down Guest” and “Restart Guest” all work as expected. If your experiences vary, please leave a comment

This should all be performed by the root user (otherwise prepend ‘sudo’ to the commands if you must use sudo). _ The first thing you need to do is add the ‘contrib’ archive to your apt sources config:

nano /etc/apt/sources.list

Add the ‘contrib’ to the end of these source lines. I use the debian.uchicago.edu repository, so mine look like this on a new install:

deb http://debian.uchicago.edu/debian/ squeeze main contrib
deb-src http://debian.uchicago.edu/debian/ squeeze main contrib

After you save changes to the file, simply update your package list and perform the install:

apt-get update
apt-get install open-vm-tools open-vm-source

You might see an error that looks like this:

Loading open-vm-tools modules: vmhgfsFATAL: Module vmhgfs not found.
 vmmemctlFATAL: Module vmmemctl not found.
 vmsyncFATAL: Module vmsync not found.

Don’t worry, this is because we have not installed the kernel modules for some of the more advanced VMware functions like the vmhgfs file system, Memory Balloon (vmmemctl) Driver, and vmsync, which helps freeze the VM while taking snapshots. To install these kernel modules, we’re going to use module-assistant. It will compile the modules for your kernel:

module-assistant auto-install open-vm -i

The ‘-i’ puts module assistant into non-interactive mode. It wont ask you to confirm any additional package installs necesarry to set up the build environment. If you’re running a server without a Graphical environment, you’re finished. If you want features such as automatically adjusting the VM’s monitor resolution or allowing your mouse to seamlessly move between your host system and the VM, you need to install one more package:

apt-get install open-vm-toolbox

Now you won’t need to use CTRL+ALT to switch back and forth.

Comments