Enable Vmware Workstation Server

The server function of Vmware Workstation (build 10.0.1.1379776) cannot start with systemd-booting, while it works well with OpenRC-booting. This note describes the approach to work around the described problem briefly.

The init script /etc/init.d/vmware-workstation-server initiates two processes:

/opt/vmware/sbin/vmware-authdlauncher and /opt/vmware/bin/vmware-hostd

However, the directory /usr/lib/systemd/system only contains vmware-authentication.service.

In addition, the ExecStart of this file has to be corrected and the modified file is listed as follows,

file: /usr/lib/systemd/system/vmware-authentication.service

[Unit]
Description=VMware Authentication Daemon
After=vmware.target
PartOf=vmware-workstation-server.target
[Service]
Type=simple
RemainAfterExit=yes
# ExecStart=/usr/sbin/vmware-authdlauncher ## wrong path
ExecStart=/opt/vmware/sbin/vmware-authdlauncher

In order to start the server of Vmware Workstation, two files , vmware-workstation-server.target and vmware-hostd.service, are added in the directory /usr/lib/systemd/system. These two files are listed as follows:

file: /usr/lib/systemd/system/vmware-workstation-server.target

[Unit]
Description=VMware Workstation server Service(s)
Requires=vmware.target
After=vmware.target
Wants=vmware-authentication.service
Wants=vmware-hostd.service
[Install]
WantedBy=multi-user.target

file: /usr/lib/systemd/system/vmware-hostd.service

[Unit]
Description=VMware Workstation Server
After=vmware-authdlauncher.service
PartOf=vmware-workstation-server.target
[Service]
Type=simple
RemainAfterExit=yes
PIDFile=/var/run/vmware/vmware-hostd.PID
ExecStart=/opt/vmware/bin/vmware-hostd -a -d /etc/vmware/hostd/config.xml

Some problems need to be considered furthermore. In the script /etc/init.d/vmware-workstation-server, a shutdown procedure is included to shutdown VMs in the AutoStart Sequence, as follows

Procedure: Shutdown VMs in the AutoStart Sequence
local HOHO_ADMIN="$(/opt/vmware/bin/vmware-wssc-adminTool "/etc/vmware/hostd/authorization.xml" 2>/dev/null)"
if [ "x" != "x${HOHO_ADMIN}" ]; then
    /opt/vmware/bin/vmware-vim-cmd -U "${HOHO_ADMIN}" hostsvc/autostartmanager/autostop
fi

But the command vmware-vim-cmd is not found in Vmware Workstation 10, this note does not include the shutdown procedure.