Bug 48608 - [PATCH] vmnet problem with emulators/vmware2 port
Summary: [PATCH] vmnet problem with emulators/vmware2 port
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Blapp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-23 22:40 UTC by per
Modified: 2003-04-13 10:56 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (2.32 KB, patch)
2003-02-23 22:40 UTC, per
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description per 2003-02-23 22:40:03 UTC
	The /usr/local/etc/rc.d/vmware.sh script aborts with:

        /usr/local/etc/rc.d/vmware.sh: cannot create /compat/linux/dev/vmnet1: Device not configured

	Subsequent attempt to start the vmware emulator fails with:

	Could not open /dev/vmnet1: No such device or address
	Failed to configure ethernet0

Fix: When originally looking into this problem, before the port
	updates on Feb 11-12, I arrived at the same "fix" that is in one
	of those updates: Make /compat/linux/dev/vmnet1 a symlink to
	/dev/vmnet1 - but didn't think this was the "right" fix to make,
	see below. The symlinking that is done in the Makefile in the
	current port still doesn't fix the problem on my FreeBSD
	5.0-RELEASE, installed off the CDs - it has OSVERSION 500043,
	while the symlink only happens for OSVERSION >= 500100.

	However... There are really two different problems here:

        1) The minor number for vmnet1 has changed 0x00010001 ->
	   0x00800001 - this happened before OSVERSION 500023.

	2) With devfs, it is necessary to open /dev/vmnet1 for the
           cloning.

	Now, I expect that it will be unusual to run FreeBSD 5.0 or
	later without devfs, but I assume it should be possible, so it
	doesn't seem appropriate to link the fix for 2) to a specific
	OSVERSION. Also it would be "nice" to not have to re-install the
	port on changing to/from usage of devfs, which suggests that 2)
	is best handled in the rc script. And of course, having the port
	first create /compat/linux/dev/vmnet1 with an incorrect minor
	number and then remove it again might be seen as "inelegant".:-)

	So, with the patch below /compat/linux/dev/vmnet1 will be
	created with the proper minor number, and if opening it in the
	rc script fails (which it will with devfs if the cloning hasn't
	been done already), the script will open /dev/vmnet1. (The
	previous code in the rc script will also work if the minor
	number is right, but will create a regular file in /dev when not
	using devfs - with the wrong minor number, the script aborts on
	the open of /compat/linux/dev/vmnet1.)

	If this patch isn't accepted, I'd suggest that at least the
	symlinking in the Makefile be done also for OSVERSION well
	before 500100 (unclear which though), and that the rc script
	changes are reverted since there is no need for the "double
	open" when /compat/linux/dev/vmnet1 is a symlink.

	By the way, I assume the PORTVERSION should be / should have
	been updated...

How-To-Repeat: 	Install current vmware2-2.0.4.1142 on FreeBSD 5.0 installed
	before branching for RELENG_5_0_0. Try to start and run it.
Comment 1 Norikatsu Shigemura freebsd_committer freebsd_triage 2003-04-11 17:59:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->emulators

Over to volunteer.
Comment 2 Norikatsu Shigemura freebsd_committer freebsd_triage 2003-04-11 18:59:55 UTC
Responsible Changed
From-To: emulators->freebsd-emulation

Over to volunteer.
Comment 3 Martin Blapp freebsd_committer freebsd_triage 2003-04-12 20:36:14 UTC
Responsible Changed
From-To: freebsd-emulation->mbr@freebsd.org

I'll care about this.
Comment 4 Martin Blapp freebsd_committer freebsd_triage 2003-04-13 10:56:02 UTC
State Changed
From-To: open->closed

Committed to vmware3 and vmware2 ports. Thanks !