VMware need to re-run every reboot on linux

I found using VMware server or workstation on udev based linux kernel (2.6.x) hosts, that I had to re-run the script after every reboot – which is quite annoying when you want the guest OS to run as the service starts.

The issue is that due to udev being a dynamic system, nodes are wiped and re-created in /dev each boot. So the simple solution is to get the VMware init script to check for and re-create the nodes as required:

Add the following just under the start) line in /etc/init.d/vmware

   # Start insert
   if [ ! -e "/dev/vmmon" ]; then
      mknod /dev/vmmon c 10 165
      chmod 600 /dev/vmmon
   for a in `seq 0 9`; do
      if [ ! -e "/dev/vmnet$a" ]; then
         mknod /dev/vmnet$a c 119 $a
         chmod 600 /dev/vmnet$a
   # End insert
   if [ -e "$vmware_etc_dir"/not_configured ]; then

Which recreates the nodes that are required – just need VMware to pick that up for future versions. Remember, you’ll still need to re-run after a kernel upgrade.