I've been tinkering ( there's that word again ) with VMware, seeking to enable my Mac ( which is running VMware Fusion 10 ) to access VMs hosted on VMware Workstation 14.
This allows me to use Fusion to start/stop VMs that are actually hosted on an Ubuntu box ( Beast ).
In the past, I'd been tunnelling the VMware UI back from Beast to the Mac, using X11 over SSH: -
ssh -Y hayd@beast
and then: -
vmrun start /home/hayd/vmware/ICPProxy/ICPProxy.vmx
vmrun start /home/hayd/vmware/ICPWorker/ICPWorker.vmx
vmrun start /home/hayd/vmware/ICPBoot/ICPBoot.vmx
vmrun list
vmrun start /home/hayd/vmware/ICPWorker/ICPWorker.vmx
vmrun start /home/hayd/vmware/ICPBoot/ICPBoot.vmx
vmrun list
which means that, whilst I can start/stop the VMs from the Mac, the actual VM consoles are being "transmitted" back to the Mac via an open SSH tunnel.
That's absolutely fine ….
… until I close the lid on the Mac, at which point the tunnel drops and all of the VMs die :-(
This is a better way ….
To achieve this, I had to ensure that Sharing was enabled within VMware Workstation itself, via Edit -> Preferences : -
Note that the default port is 443 and the default location for shared VMs is /var/lib/vmware/Shared VMs
Also, note that, as I'm running the vmware binary as a non-root user, I can't change the port.
Which is OK.
Having validated that the configuration was A-OK, I also needed to actually move my VMs from the default location of ~/vmware to the new location of /var/lib/vmware/Shared VMs
Initially, I tried doing this via a combination of mv and chmod, but to no avail.
I then realised that Workstation actually facilitates this: -
Which did the job nicely.
This is where the VMs now live ( on Beast ) : -
ls -al /var/lib/vmware/Shared\ VMs
total 28
drwxrwxrwt 7 root root 4096 Mar 1 11:46 .
drwxr-xr-x 3 root root 4096 Jan 18 09:08 ..
drwxr--r-- 3 hayd hayd 4096 Mar 1 11:46 IBM BPM v8.6
drwxrwxrwx 2 hayd hayd 4096 Mar 1 11:43 ICPBoot
drwxrwxrwx 2 hayd hayd 4096 Mar 1 11:43 ICPProxy
drwxrwxrwx 2 hayd hayd 4096 Mar 1 11:44 ICPWorker
drwxr-xr-x 2 root root 4096 Mar 1 11:31 Microsoft Windows Server 2016 (64-bit)
drwxrwxrwt 7 root root 4096 Mar 1 11:46 .
drwxr-xr-x 3 root root 4096 Jan 18 09:08 ..
drwxr--r-- 3 hayd hayd 4096 Mar 1 11:46 IBM BPM v8.6
drwxrwxrwx 2 hayd hayd 4096 Mar 1 11:43 ICPBoot
drwxrwxrwx 2 hayd hayd 4096 Mar 1 11:43 ICPProxy
drwxrwxrwx 2 hayd hayd 4096 Mar 1 11:44 ICPWorker
drwxr-xr-x 2 root root 4096 Mar 1 11:31 Microsoft Windows Server 2016 (64-bit)
Having done all of that, I then used the Connect to Server wizard in Fusion: -
to connect to Beast: -
which then showed me my VMs: -
which then allowed me to power on the VM: -
For the record, on Ubuntu, VMware runs as a set of services: -
service --status-all|grep vmware
[ - ] vmware
[ - ] vmware-USBArbitrator
[ + ] vmware-workstation-server
service vmware status
● vmware.service - LSB: This service starts and stops VMware services
Loaded: loaded (/etc/init.d/vmware; bad; vendor preset: enabled)
Active: active (running) since Thu 2018-03-01 07:45:00 GMT; 4h 20min ago
Docs: man:systemd-sysv-generator(8)
Process: 1891 ExecStart=/etc/init.d/vmware start (code=exited, status=0/SUCCESS)
Tasks: 10
Memory: 25.2M
CPU: 569ms
CGroup: /system.slice/vmware.service
├─2122 /usr/lib/vmware/bin/vmware-vmblock-fuse -o subtype=vmware-vmblock,default_permissions,allow_other /var/run/vmblock-fuse
├─2303 /usr/bin/vmnet-bridge -s 6 -d /var/run/vmnet-bridge-0.pid -n 0 -ienp3s0
├─2384 /usr/bin/vmnet-netifup -s 6 -d /var/run/vmnet-netifup-vmnet1.pid /dev/vmnet1 vmnet1
├─2419 /usr/bin/vmnet-dhcpd -s 6 -cf /etc/vmware/vmnet1/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet1/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1
├─2476 /usr/bin/vmnet-natd -s 6 -m /etc/vmware/vmnet8/nat.mac -c /etc/vmware/vmnet8/nat/nat.conf
├─2603 /usr/bin/vmnet-netifup -s 6 -d /var/run/vmnet-netifup-vmnet8.pid /dev/vmnet8 vmnet8
├─2619 /usr/bin/vmnet-dhcpd -s 6 -cf /etc/vmware/vmnet8/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet8/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid vmnet8
└─2668 /usr/sbin/vmware-authdlauncher
Mar 01 11:58:54 beast vmauthd[10174]: lib/ssl: protocol list tls1.2 (openssl flags 0x17000000)
Mar 01 11:58:54 beast vmauthd[10174]: lib/ssl: cipher list !aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES
Mar 01 11:58:54 beast vmauthd[10174]: Connect from remote socket (192.168.1.11:60576).
Mar 01 11:58:54 beast vmauthd[10174]: Connect from 192.168.1.11
Mar 01 11:58:54 beast vmauthd[10174]: local verification as root
Mar 01 11:58:54 beast vmauthd[10174]: login from 192.168.1.11 as 52686c92-dee3-432f-7c40-974c6ea87f3c
Mar 01 11:58:54 beast vmauthd[10174]: received CONNECT_ARGV command: /var/lib/vmware/Shared%20VMs/ICPProxy/ICPProxy.vmx mks
Mar 01 11:58:54 beast vmauthd[10174]: Acquired lock for /var/run/vmware/authd_6d49ec1496256a353d69467da74760b8
Mar 01 11:58:54 beast vmauthd[10174]: /var/lib/vmware/Shared VMs/ICPProxy/ICPProxy.vmx: Connected to mks-fd, remote end sent pid: 10148
Mar 01 11:58:54 beast vmauthd[10174]: released lock for /var/run/vmware/authd_6d49ec1496256a353d69467da74760b8
service vmware-workstation-server status
● vmware-workstation-server.service - LSB: This services starts and stops the Workstation as a Server daemon.
Loaded: loaded (/etc/init.d/vmware-workstation-server; bad; vendor preset: enabled)
Active: active (running) since Thu 2018-03-01 11:18:34 GMT; 48min ago
Docs: man:systemd-sysv-generator(8)
Process: 7767 ExecStop=/etc/init.d/vmware-workstation-server stop (code=exited, status=0/SUCCESS)
Process: 7820 ExecStart=/etc/init.d/vmware-workstation-server start (code=exited, status=0/SUCCESS)
Tasks: 63
Memory: 22.0G
CPU: 6min 4.288s
CGroup: /system.slice/vmware-workstation-server.service
├─ 7855 /usr/lib/vmware/bin/vmware-hostd -a /etc/vmware/hostd/config.xml
├─10089 /usr/lib/vmware/bin/vmware-vmx -s sched.group= -# product=1;name=VMware Workstation;version=14.1.1;buildnumber=7528167;licensename=VMware Workstation;licenseversion=14.0; -@ transport
└─10148 /usr/lib/vmware/bin/vmware-vmx -s sched.group= -# product=1;name=VMware Workstation;version=14.1.1;buildnumber=7528167;licensename=VMware Workstation;licenseversion=14.0; -@ transport
Mar 01 11:33:31 beast /usr/lib/vmware/bin/vmware-hostd[7855]: Accepted password for user hayd from 127.0.0.1
Mar 01 11:33:37 beast /usr/lib/vmware/bin/vmware-hostd[7855]: Accepted password for user hayd from 127.0.0.1
Mar 01 11:34:23 beast /usr/lib/vmware/bin/vmware-hostd[7855]: Accepted password for user hayd from 127.0.0.1
Mar 01 11:34:41 beast /usr/lib/vmware/bin/vmware-hostd[7855]: Accepted password for user hayd from 192.168.1.11
Mar 01 11:35:44 beast /usr/lib/vmware/bin/vmware-hostd[7855]: Accepted password for user hayd from 192.168.1.11
Mar 01 11:36:35 beast /usr/lib/vmware/bin/vmware-hostd[7855]: Accepted password for user hayd from 192.168.1.11
Mar 01 11:38:45 beast /usr/lib/vmware/bin/vmware-hostd[7855]: Accepted password for user hayd from 192.168.1.11
Mar 01 11:42:08 beast /usr/lib/vmware/bin/vmware-hostd[7855]: Accepted password for user hayd from 127.0.0.1
Mar 01 11:50:15 beast /usr/lib/vmware/bin/vmware-hostd[7855]: Accepted password for user hayd from 127.0.0.1
Mar 01 11:56:51 beast /usr/lib/vmware/bin/vmware-hostd[7855]: Accepted password for user hayd from 192.168.1.11
and there's a corresponding log for the VMware Host Daemon: -
ls -altrc /var/log/vmware/hostd.log
lrwxrwxrwx 1 root root 29 Mar 1 11:18 /var/log/vmware/hostd.log -> /var/log/vmware//hostd-44.log
No comments:
Post a Comment