Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54269 - vmware /dev nodes not restored on pure udev systems
Summary: vmware /dev nodes not restored on pure udev systems
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Chris Gianelloni (RETIRED)
URL:
Whiteboard:
Keywords:
: 64057 68735 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-17 22:30 UTC by AJ Armstrong
Modified: 2004-11-18 10:09 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description AJ Armstrong 2004-06-17 22:30:06 UTC
The /opt/vmware/bin/vmware-config.pl script creates several nodes in /dev that are required for the vmware services to start.  Because vmware does not appear to be sysfs-aware, these nodes disappear on reboot for systems using udev (if they are not enabling the "backup my /dev to a tarball" hack).

An initial mod to the /etc/init.d/vmware script to resolve this is presented:

***************
*** 62,72 ****
--- 62,85 ----
  start() {
        test -x /etc/vmware/init.d/vmware || \
                eend 1 "vmware init script not found. Aborting" || return 1
+ 
+       if [ -e /dev/.udev ]
+       then
+               ebegin "udev Detected.  Restoring VMWare Device Nodes"
+                         tar -C / -xzf /tmp/vmnodes.tar.gz  > /dev/null
+               eend 0  
+       fi
        /etc/vmware/init.d/vmware start | vmware-prettify start
        return $?
  }
  
  stop() {
        /etc/vmware/init.d/vmware stop | vmware-prettify stop
+       if [ -e /dev/.udev ]
+       then
+               ebegin "udev Detected.  Storing VMWare Device Nodes"
+                       tar -czf /tmp/vmnodes.tar.gz /dev/vm* /dev/parport* > /dev/null
+               eend 0  
+       fi
        return $?
  }


This is very basic, and could be improved on.  For one thing, you might need to create the initial tarball to get it to work ( tar -czf /tmp/vmnodes.tar.gz /dev/vm* /dev/parport* )

A related bug may be #45696 (see comment #3)
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2004-06-18 09:09:56 UTC
Which VMware version?
Comment 2 AJ Armstrong 2004-06-18 17:16:28 UTC
Oh, sorry.  

app-emulation/vmware-workstation-4.5.2.8848

The relevant emerge info is:

Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.7-rc3-mm2)
=================================================================
System uname: 2.6.7-rc3-mm2 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://mirrors.tds.net/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X Xaw3d aalib alsa apm arts avi berkdb bluetooth bonobo cdr crypt cups directfb dvd emacs emacs-w3 encode esd ethereal evo fbcon foomaticdb gdbm gif gpm gtk gtk2 gtkhtml guile imlib ipv6 java jpeg leim libg++ libwww mad mikmod mmx motif mozilla mpeg ncurses nls odbc oggvorbis opengl oss pam pcmcia pdflib perl png python qt quicktime radeon readline ruby sdl slang spell ssl svga tcpd tetex truetype usb x86 xml2 xmms xv zlib"

Comment 3 Georgi Georgiev 2004-07-14 19:59:10 UTC
I think the proper solution to this problem at the moment, is to use RC_DEVICE_TARBALL="yes"
Comment 4 SpanKY gentoo-dev 2004-07-14 20:06:51 UTC
the 'proper' fix would be to have the vmware drivers support sysfs

the 'workaround' is to use the tarball
Comment 5 Georgi Georgiev 2004-07-14 20:53:42 UTC
I very much agree with SpanKY, sorry.

Maybe you guys could look at bug #57110 that I just submitted. Not entirely related, but it addresses the only one reason why I didn't like the tarball.
Comment 6 Chris Gianelloni (RETIRED) gentoo-dev 2004-07-16 13:21:56 UTC
I see no reason to duplicate the functionality of the device tarball that we are already providing.  It would be especially redundant for anyone running udev and using the system's device tarball.

This is definitely an upstream thing.  VMware needs to become sysfs-aware, rather than for us to hack around the problem.
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2004-09-14 15:22:33 UTC
*** Bug 64057 has been marked as a duplicate of this bug. ***
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2004-10-24 14:18:00 UTC
*** Bug 68735 has been marked as a duplicate of this bug. ***
Comment 9 Chris Gianelloni (RETIRED) gentoo-dev 2004-11-03 18:18:15 UTC
Try version 4.5.2.8848-r2 and see if this fixes your problem.
Comment 10 Georgi Georgiev 2004-11-04 01:53:03 UTC
Yay, I got a byte of vmnet devices in /dev now!

There is this little message that is appearing now though:

===
VMware Workstation Error:
VMware Workstation must be set-UID root, "/opt/vmware/lib/bin/vmware-vmx" is not.  Are you running /opt/vmware/lib/bin/vmware-vmx from its distribution directory?  That copy of the program is not set-UID root.
===

Obviously related to these lines in the new ebuild:

   # I am commenting this because I do not beleive that it is necessary.
   #chmod u+s ${D}/opt/vmware/bin/vmware || die
   #chmod u+s ${D}/opt/vmware/bin/vmware-ping || die
   #chmod u+s ${D}/opt/vmware/lib/bin/vmware-vmx || die
Comment 11 Chris Gianelloni (RETIRED) gentoo-dev 2004-11-04 13:37:45 UTC
Wait 30 minutes, then emerge sync and try again, I've uncommented those lines in the -r2 ebuild now.
Comment 12 Seemant Kulleen (RETIRED) gentoo-dev 2004-11-18 10:09:50 UTC
*** Bug 68735 has been marked as a duplicate of this bug. ***