Date: Thu, 27 Nov 2014 17:49:05 +0000 From: Bruce Simpson <bms@fastmail.net> To: swills@FreeBSD.org Cc: ports@FreeBSD.org Subject: sysutils/open-vm-tools: fixing runProgramInGuest Message-ID: <1417110545.276810.196129877.20DE2766@webmail.messagingengine.com>
next in thread | raw e-mail | index | archive | help
Scott, I noticed today that vmrun's runProgramInGuest didn't seem to work on FreeBSD, and have a (hackish) fix. Background: I'm trying to automate some nasty operations I need to run across our test topology at work. I have dozens of multi-gigabyte FreeBSD VMs with ZFS, and these need to be shrunk to fit onto BD-R media for publication. Without ZFS BP-rewrite, recreating the pool on a new device is the only way to do this. VMware's "shrink disk" feature only really understands a subset of Windows and Linux filesystems. Issue: The PAM configuration installed with the port refers to non-existent PAM modules. If I try to use vmrun with a (known passwordless) account, I get the following log message: %%% Nov 27 16:49:11 ilnp-builder vmsvc[1127]: in openpam_load_module(): no pam_unix2.so found %%% Workaround: Remove the missing PAM modules from the vmtoolsd PAM configuration entirely, e.g. %%% sed -i.orig -e '/pam_unix2/d;/pam_unix_auth/d;/pam_unix_acct/d' /usr/local/etc/pam.d/vmtoolsd %%% I can confirm that this allows the following vmrun commands to work: copyFileFromHostToGuest, runProgramInGuest, runScriptInGuest. Other details: Whilst mostly documented, this functionality isn't great (and is fairly Windows centric). E.g. the runScriptInGuest command takes the actual content of a script to be executed, error messages are logged to stdout, and need to be parsed for guest command return codes. I'd be happy to share the scripts once I've got the ZFS pool rebuild automated. thanks, -- BMS (sent via webmail)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1417110545.276810.196129877.20DE2766>