Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 411901

Summary: app-emulation/vmware-workstation-8* - Add systemd service(s)
Product: Gentoo Linux Reporter: William Swartzendruber <wswartzendruber>
Component: New packagesAssignee: Gentoo VMWare Bug Squashers [disabled] <vmware+disabled>
Status: RESOLVED FIXED    
Severity: enhancement CC: harrisl, poncho, systemd, vmware+disabled
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/akhuettel/systemd-vmware
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 448882    
Attachments: Working vmware.service Unit
systemd services

Description William Swartzendruber 2012-04-14 01:11:23 UTC
Created attachment 308841 [details]
Working vmware.service Unit

I have attached a vmware.service unit that I created using /etc/init.d/vmware.  I am currently using it without issue.
Comment 1 William Swartzendruber 2012-09-09 03:55:17 UTC
I'm curious about what the status on this is.  Summer has already come and gone.
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2013-06-21 20:22:22 UTC
@systemd: please have a look, does the file make sense?
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-06-21 21:16:29 UTC
Some sense, yes. It's against all systemd policies but I guess vmware doesn't really care and I don't really understand what is happening there. One thing I can say is that thing thing becomes totally stateless and horribly fragile.
Comment 4 Mike Gilbert gentoo-dev 2013-06-21 22:20:54 UTC
It seems like it might be better to break this into 3 unit files.
Comment 5 poncho 2013-06-22 08:15:35 UTC
Created attachment 351626 [details]
systemd services

I use these services downloaded from
http://communities.vmware.com/docs/DOC-20855
apparently also available on github https://github.com/kriation/systemd-vmware
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2013-07-20 15:06:47 UTC
*** Bug 477000 has been marked as a duplicate of this bug. ***
Comment 7 Andreas K. Hüttel archtester gentoo-dev 2013-07-20 15:08:18 UTC
TODO: compare the attached files from bug 477000 with the files from https://github.com/kriation/systemd-vmware
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2013-07-21 14:27:04 UTC
(In reply to Andreas K. Hüttel from comment #7)
> TODO: compare the attached files from bug 477000 with the files from
> https://github.com/kriation/systemd-vmware

The files are mostly identical with path fixes. 

Need license declaration, see https://github.com/kriation/systemd-vmware/issues/1
Comment 9 Harris Landgarten 2013-07-21 16:45:06 UTC
I would also be good if we could include a vmware.scope unit file for starting vmware workstation more in the way systemd manages virtual machines. I have been experimenting with starting vmware with:

sudo systemd-run --scope --unit=vmware --slice=machine /opt/vmware/bin/vmware
Running as unit vmware.scope.


I end up after starting a vm with:

├─1191 /sbin/v86d
├─machine.slice
│ └─vmware.scope
│   ├─10130 /opt/vmware/bin/vmware
│   ├─10262 /opt/vmware/lib/vmware/bin/vmware-tray poweredOn
│   ├─10283 /opt/vmware/lib/vmware/bin/vmware-unity-helper --daemon
│   ├─10326 dbus-launch --autolaunch=d95f715e390a4d5b5874f8840006d101 --binary-syntax --close-stderr
│   ├─10327 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
│   └─10448 /opt/vmware/lib/vmware/bin/vmware-vmx -s vmx.stdio.keep=TRUE -# product=1;name=VMware Workstation;version=9.0.2;buildnumber=1031769;licensename=VMware Workstation;licenseversion=9.0; -@ duplex=3;msgs
├─user.slice
│ └─user-1000.slice
│   └─session-1.scope


The vm seems to be running faster but I have no tests to verify.

Anyway the only downside seems to be that vmware is running with root privileges which I assume can be fixed.

The scope unit file documentation is hard to come by be I assume a vmware.scope unit file could be written at specifies slice and permissions.

Anyone know how to do this?
Comment 10 Andreas K. Hüttel archtester gentoo-dev 2013-07-24 21:48:08 UTC
(In reply to Harris Landgarten from comment #9)
> I would also be good if we could include a vmware.scope unit file for
> starting vmware workstation more in the way systemd manages virtual
> machines. I have been experimenting with starting vmware with:
> 
> sudo systemd-run --scope --unit=vmware --slice=machine /opt/vmware/bin/vmware
> Running as unit vmware.scope.
> 
> 
> Anyone know how to do this?

No, but let's do this one step at a time.


+  24 Jul 2013; Andreas K. Huettel <dilfridge@gentoo.org>
+  +vmware-workstation-9.0.2.1031769-r1.ebuild:
+  Add experimental systemd unit files, bug 411901