Friday, May 29, 2009

VMware: create the vmnet* special files

How to create the /dev/vmnet* special files ?

Here is howto do it manually:

mknod -m 600 /dev/vmnet0 c 119 0
mknod -m 600 /dev/vmnet1 c 119 1
mknod -m 600 /dev/vmnet2 c 119 2
mknod -m 600 /dev/vmnet3 c 119 3
mknod -m 600 /dev/vmnet4 c 119 4
mknod -m 600 /dev/vmnet5 c 119 5
mknod -m 600 /dev/vmnet6 c 119 6
mknod -m 600 /dev/vmnet7 c 119 7
mknod -m 600 /dev/vmnet8 c 119 8
mknod -m 600 /dev/vmnet9 c 119 9


Howto do it automatically:

remove the file /etc/vmware/not_configured

edit the file /etc/init.d/vmware


in the function vmware_start_vmnet, add the following:

for i in `seq 0 9`; do
if [ ! -c /dev/vmnet$i ];then
mknod -m 660 /dev/vmnet$i c 119 $i > /dev/null 2>&1
fi
done

if [ ! -e /dev/vmmon ];then
mknod /dev/vmmon c 10 165 > /dev/null 2>&1
fi


Howto create the interface for network interface:

/usr/bin/vmnet-netifup -d /var/run/vmnet-netifup-vmnet2.pid /dev/vmnet2 vmnet2

ifconfig vmnet2 up

No comments: