Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 542896 - app-emulation/vmware-workstation USE="-vmci -vsock" should alter the startup scripts (systemd/init.d) for modprobing the kernel vmw_ modules
Summary: app-emulation/vmware-workstation USE="-vmci -vsock" should alter the startup ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo VMWare Bug Squashers [disabled]
URL:
Whiteboard:
Keywords:
: 548056 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-03-11 10:57 UTC by Mike Auty (RETIRED)
Modified: 2016-03-20 18:34 UTC (History)
2 users (show)

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


Attachments
Modprobe.d file for vmware vmci and vsock modules to be aliased to the in-kernel versions (vmware.conf,57 bytes, patch)
2015-05-13 15:52 UTC, Mike Auty (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Auty (RETIRED) gentoo-dev 2015-03-11 10:57:42 UTC
Just a note that based on the USE flags for vmci and vsock, the systemd units to modprobe the modules should be altered to use the kernel module names (vmw_vmci and vmw_vsock_vmci_transport).  At the moment using systemd start vmware.target will not allow a virtual machine to boot because the correct modules are not loaded.
Comment 1 Mike Gilbert gentoo-dev 2015-03-11 16:47:40 UTC
Adding modprobe calls to the systemd units is bad practice.

Ideally, the modules would be autoloaded when something needs to use them.

If the modules cannot be made to load on-demand, one alternative would be to install a modules-load.d file in the vmware-modules ebuild.
Comment 2 Mike Auty (RETIRED) gentoo-dev 2015-03-11 18:37:09 UTC
I agree, but I'm not recommending adding them, I'm recommending changing the existing modprobe calls in the units installed by vmware itself, to the kernel modules when our USE flags tell us that's what the user's chosen.  All this bug is calling for is an appropriate sed script to be run during install...
Comment 3 Mike Gilbert gentoo-dev 2015-03-11 19:26:27 UTC
Ok, sorry if I misinterpreted.
Comment 4 Billy DeVincentis 2015-03-25 18:39:36 UTC
I agree,
Here is the sed line


sed -i 's/vmci/vmw_vmci/g' /usr/lib64/systemd/system/vmware-vmci.service

How can we insert that into an ebuild, I have tried unsuccessfully.
Comment 5 Billy DeVincentis 2015-03-25 18:42:01 UTC
Here is an existing sed line in the same ebuild

if use server; then
		# install the init.d script
		local initscript="${T}/vmware-workstation-server.rc"
		sed -e "s:@@ETCDIR@@:/etc/vmware:g" \
			-e "s:@@PREFIX@@:${VM_INSTALL_DIR}:g" \
			-e "s:@@BINDIR@@:${VM_INSTALL_DIR}/bin:g" \
			-e "s:@@LIBDIR@@:${VM_INSTALL_DIR}/lib/vmware:g" \
			"${FILESDIR}/vmware-server-${major_minor}.rc" > ${initscript}
		newinitd "${initscript}" vmware-workstation-server
	fi

I tried using it as an example but it wouldn't work right.
Comment 6 Mike Auty (RETIRED) gentoo-dev 2015-05-13 15:49:36 UTC
*** Bug 548056 has been marked as a duplicate of this bug. ***
Comment 7 Mike Auty (RETIRED) gentoo-dev 2015-05-13 15:50:27 UTC
From the duplicated bug this also affects the init.d scripts.
Comment 8 Mike Auty (RETIRED) gentoo-dev 2015-05-13 15:52:59 UTC
Created attachment 403204 [details, diff]
Modprobe.d file for vmware vmci and vsock modules to be aliased to the in-kernel versions

One method that will solve both (and can be deployed locally as a workaround until this is integrated) is to define aliases in /etc/modprobe.d as in this attachment.

To apply. drop the file in /etc/modprobe.d, run depmod -a, and then whenever an attempt is made to modprobe vmci, it'll actually attempt to modprobe vmw_vmci.

Note, this file should only be present when the kernel internal modules are used, not when the vmware custom modules are used.
Comment 9 Andreas K. Hüttel archtester gentoo-dev 2016-03-20 18:34:02 UTC
(In reply to Mike Auty from comment #8)
> Created attachment 403204 [details, diff] [details, diff]
> Modprobe.d file for vmware vmci and vsock modules to be aliased to the
> in-kernel versions
> 
> One method that will solve both (and can be deployed locally as a workaround
> until this is integrated) is to define aliases in /etc/modprobe.d as in this
> attachment.
> 
> To apply. drop the file in /etc/modprobe.d, run depmod -a, and then whenever
> an attempt is made to modprobe vmci, it'll actually attempt to modprobe
> vmw_vmci.
> 
> Note, this file should only be present when the kernel internal modules are
> used, not when the vmware custom modules are used.

This is in vmware-modules-308.1.0 now autogenerated depending on use-flag settings. 

The init scripts may still need some polishing...