Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 106170 - Vmware ebuild improvement
Summary: Vmware ebuild improvement
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo VMWare Bug Squashers [disabled]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-16 02:49 UTC by Nicola
Modified: 2006-09-28 08:37 UTC (History)
0 users

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 Nicola 2005-09-16 02:49:38 UTC
Hi,

I have some minor trouble if I run vmware as non root user and I try to enable
promiscous mode inside virtual machine:

there is a permission problem, the user who run vmware must have read-write
access on the following device

/dev/vmmon
/dev/vmnet* 

a classical solution is to manually set permission for this device, you must
remeber to change permission every time you reconfigure (typically every time
you upgrade your kernel) or upgrade vmware. 

A better solution is to do this automagically, I use a pure udev enviroment, I
create a group vmware and add the user that I daily use in this group, then I
create the following udev rule:

cat /etc/udev/rules.d/60-vmware.rules
KERNEL=="vmmon*",       GROUP="vmware" MODE=660

and modify vmware init script as following:

/etc/vmware/init.d/vmware:

.......
.......
if [ ! -e "$vDevice" ]; then
      mknod -m 660 "$vDevice" c 119 "$vHubNr"
      chown root:vmware /dev/vmnet*
fi
.......
.......

here is the results:

ls -la /dev/vm*
crw-rw----  1 root vmware  10, 165 Sep 13 22:07 /dev/vmmon
crw-rw----  1 root vmware 119,   0 Sep 13 22:07 /dev/vmnet0
crw-rw----  1 root vmware 119,   1 Sep 13 22:07 /dev/vmnet1
crw-rw----  1 root vmware 119,   8 Sep 13 22:07 /dev/vmnet8

id nicola
uid=1000(nicola) gid=100(users)
groups=100(users),5(tty),7(lp),10(wheel),11(floppy),18(audio),19(cdrom),20(dialout),27(video),35(games),85(usb),407(vmware)



I would like to see this little improvment as default in the following vmware
ebuild,

thanks
Nicola
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2005-09-16 12:06:22 UTC
Added to CVS... thanks
Comment 2 Nicola 2006-01-13 00:58:53 UTC
the init script for the version 5.5.1.1975 is broken:

ls -la /dev/vm*
crw-rw----  1 root vmware  10, 165 13 gen 09:24 /dev/vmmon
crw-------  1 root root   119,   0 10 gen 08:35 /dev/vmnet0
crw-------  1 root root   119,   1 10 gen 08:35 /dev/vmnet1
crw-------  1 root root   119,   2 10 gen 08:35 /dev/vmnet2
crw-------  1 root root   119,   8 10 gen 08:35 /dev/vmnet8

please readd right permission and owner for vmnet device,

thanks
Nicola

Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2006-01-13 06:18:06 UTC
Got a patch?

The information in this bug report is no longer valid for the newer version of VMware.
Comment 4 Nicola 2006-01-13 09:05:50 UTC
vmnet kernel module seems broken with udev or I was not able to solve this with an udev rule

a simple workaround is to modify the /etc/vmware/init.d/vmware script and modify the following section (line 637) from:

if [ "$vmdb_answer_NETWORKING" = 'yes' ]; then
         vmware_exec 'Virtual ethernet' vmware_start_vmnet
         exitcode=$(($exitcode + $?))

         "$vmdb_answer_LIBDIR"/net-services.sh start
         exitcode=$(($exitcode + $?))
      fi
to:

if [ "$vmdb_answer_NETWORKING" = 'yes' ]; then
         vmware_exec 'Virtual ethernet' vmware_start_vmnet
         exitcode=$(($exitcode + $?))

         chown root:vmware /dev/vmnet*
         chmod 660 /dev/vmnet*

         "$vmdb_answer_LIBDIR"/net-services.sh start
         exitcode=$(($exitcode + $?))
      fi

regards
Nicola
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2006-09-28 08:37:14 UTC
This is actually done via a udev rule, now.