From owner-freebsd-ports@FreeBSD.ORG Thu Nov 27 17:49:06 2014 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE09E4C5 for ; Thu, 27 Nov 2014 17:49:06 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADD4F7F1 for ; Thu, 27 Nov 2014 17:49:06 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 7B55B20561 for ; Thu, 27 Nov 2014 12:49:05 -0500 (EST) Received: from web6 ([10.202.2.216]) by compute2.internal (MEProxy); Thu, 27 Nov 2014 12:49:05 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= message-id:x-sasl-enc:from:to:cc:mime-version :content-transfer-encoding:content-type:subject:date; s=mesmtp; bh=x0QqnSmdgrcyrdqGGTVP7fekvPw=; b=BohIoovV0hf7qcxq9QkzqmRa0fJ1 sRN6LrkYzK8NkU/lBxK5oz83/LZmEI8bwCXQRynZ7veT624Ga8o65wxLk2iQbXML E0g3TVcrSwMk1HpKM+qhHXW/5U/7RiuFl1ICV3X6JViSXw8YtZ+9jGUul00zTnp7 VTNQCMQ4t2lvKAA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:x-sasl-enc:from:to:cc :mime-version:content-transfer-encoding:content-type:subject :date; s=smtpout; bh=x0QqnSmdgrcyrdqGGTVP7fekvPw=; b=hEehXxvlTBl 9jD/09RzPF8jcwC7CGNfrD+mnyg1vmP8SXKb5/9jlud2l8eczjmR/2WatVOOCim1 vdNn/d2P/ZoBE88UA7yUmRfIPucz7glfponlpgKfiw1WjEdyfYCs6zuCZZ4ALZJ2 Sy5jNSjZ9Q9y3fVIxrrXEovOF7764cR8= Received: by web6.nyi.internal (Postfix, from userid 99) id 4B58350F64; Thu, 27 Nov 2014 12:49:05 -0500 (EST) Message-Id: <1417110545.276810.196129877.20DE2766@webmail.messagingengine.com> X-Sasl-Enc: iaOMuBA6cyFxmf5TkXFov3H+voAWC+yNkVaxFTaaJ091 1417110545 From: Bruce Simpson To: swills@FreeBSD.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-53201334 Subject: sysutils/open-vm-tools: fixing runProgramInGuest Date: Thu, 27 Nov 2014 17:49:05 +0000 Cc: ports@FreeBSD.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2014 17:49:07 -0000 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)