Workstation support on Linux using systemd

Workstation support on Linux using systemd

A few months ago, I decided to switch Linux distributions from Ubuntu to ArchLinux and have been very pleased with the experience so far. Recently, the folks at Arch decided to switch from using initscripts and sysvinit during the boot process to systemd. Systemd provides an incredibly powerful interface to service management, and I can see why the switch was made. It looks like other distributions may be switching in the near future as well.

While in the process of switching, I realized that I was going to have trouble with the vmware service script. My options were to run my rig in a hybrid mode, or convert the script to support systemd. I chose the latter, and the attached tarball is the result. I've tested the services on two ArchLinux instances, and they work without issue. I realize that a chunk of error checking that was in the original service script doesn't exist, but I intend to add it, as well as an overall script to kick off the sub-scripts. For now, the attached tarball includes the following service files:

  • vmware-vmmon.service (Virtual machine monitor)
  • vmware-vmci.service (Virtual machine communication interface)
  • vmware-vmsock.service (VMCI Socket Family)
  • vmware-vmnet.service (Virtual ethernet)
  • vmware-vmblock.service (Blocking file system)
  • vmware-authentication.service (Authentication Daemon)
  • vmware-usb.service (USB Arbitration Service)

The order in which they are started is above, with vmmon starting first, and ending with the USB Arbitration service. Any of these can be enabled/disabled based on your requirement by commenting out the appropriate service in vmware.target. The only requirement to run workstation is vmmon. All other 'services' are optional.

As I mentioned above, the items left to integrate into these scripts are:

  • Error condition checking when loading modules
  • Checking for Shared Memory
  • Implementing a single service that kicks off each of the sub-services.

If you have any questions, feel free to drop me a note via twitter @kriation, or an e-mail. In case anyone is interested in adding improvements, or taking care of any of the TODOs, I created a repository in Github

-- Armen

Attachments
Comments

This has helped me tremendously, thank you. Any chance you're looking at a way to get Shared VM's working with systemd?

Hi Turnip - Glad it was helpful! Shared VMs are dealt with by the vmware-workstation-server script which I have yet to convert to a systemd script. It's a bit more involved to convert as there's a bit more logic in the script than the others.

In the interim, would you be able to use the initscript provided by vmware? In my environment, it's located in the /etc/init.d directory, and it's called vmware-workstation-server. If you kick off that script (./vmware-workstation-server start), it should enable you to use shared VMs. If by chance, you don't have it, let me know, and I can send it to you.

I completely forgot about the fact that the initscript is in the filesystem and that I could just run that, thanks, everything's working now, you're a life saver.

You're welcome!

I'll update this document when I convert the workstation-server script.

Version history
Revision #:
1 of 1
Last update:
‎11-07-2012 07:13 AM
Updated by: