VMware

Notes.

VMware with devfs/udev

vmware-configure.pl creates several entries in /dev. They disappear on shutdown because /dev is a virtual file system on Debian (udev nowadays, but probably also applies to devfs). This will put VMware in an unconfigured state and it rejects to start.

Hence, a script is needed which creates the entries in /dev before the VMware daemons and kernel modules can be loaded.

This is the script:

#!/bin/sh
#
# $Id: vmware-createdevs,v 1.2 2008/03/18 21:31:59 flip Exp $
#
# creates vmware devices in /dev because they disappear in udev/devfs
# on shutdown
#
# Philippe Kehl <phkehl at gmx dot net>
#
# save as "/etc/init.d/vmware-createdevs"
# and install with "update-rc.d  vmware-createdevs start 99 S ."
#
#

case "$1" in

    start)
	echo -n "${0##*/}: "
        # check for vmware
	if [ ! -d /etc/vmware ]; then
	    echo "VMware not installed."
	    exit
	fi
        # remove not_configured flag from vmware
	if [ -f /etc/vmware/not_configured ]; then
	    echo -n "vmware "
	    rm -f /etc/vmware/not_configured
	fi
        # create devices
	for minor in `seq 0 9`; do
	    [ -c /dev/vmnet$minor ] && continue
	    echo -n "vmnet$minor "
	    mknod /dev/vmnet$minor c 119 $minor
	done
	if [ ! -c /dev/vmmon ]; then
	    echo -n "vmmon "
	    mknod /dev/vmmon c 10 165
	fi
	echo "done."
	;;


    stop)
	echo "${0##*/}: nothing to do."
	;;

    *)
	echo "Usage: ${0##*/} start"
	;;

esac

# eof

To test: in /etc/udev/links.conf (found here).

M vmnet0 c 119 0
M vmnet1 c 119 1
...
M vmnet9 c 119 9
M vmmon  c 10 165 

Hacks