From nobody Thu May 15 12:44:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1522748010128980.1144546594011; Tue, 3 Apr 2018 02:33:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9A34A28200; Tue, 3 Apr 2018 09:33:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B81B7C8D0; Tue, 3 Apr 2018 09:33:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2EDD84CAA4; Tue, 3 Apr 2018 09:33:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w339XJbL022595 for ; Tue, 3 Apr 2018 05:33:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id A1960611B1; Tue, 3 Apr 2018 09:33:19 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9787617A9C for ; Tue, 3 Apr 2018 09:33:14 +0000 (UTC) Received: from donkey.codingfarm.de (donkey.codingfarm.de [5.9.138.198]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 413734DB12 for ; Tue, 3 Apr 2018 09:33:08 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by donkey.codingfarm.de (Postfix) with ESMTPSA id B72928455B; Tue, 3 Apr 2018 11:33:06 +0200 (CEST) Received: by eunomia.codingfarm.de (Postfix, from userid 501) id F1C44D383BAD; Tue, 3 Apr 2018 11:33:05 +0200 (CEST) From: =?UTF-8?q?Rainer=20M=C3=BCller?= To: libvir-list@redhat.com Date: Tue, 3 Apr 2018 11:32:39 +0200 Message-Id: <20180403093240.66645-2-raimue@codingfarm.de> In-Reply-To: <20180403093240.66645-1-raimue@codingfarm.de> References: <20180403093240.66645-1-raimue@codingfarm.de> MIME-Version: 1.0 X-Greylist: Sender passed SPF test, ACL 227 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 03 Apr 2018 09:33:08 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 03 Apr 2018 09:33:08 +0000 (UTC) for IP:'5.9.138.198' DOMAIN:'donkey.codingfarm.de' HELO:'donkey.codingfarm.de' FROM:'raimue@codingfarm.de' RCPT:'' X-RedHat-Spam-Score: -0.011 (SPF_PASS, T_RP_MATCHES_RCVD) 5.9.138.198 donkey.codingfarm.de 5.9.138.198 donkey.codingfarm.de X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Rainer=20M=C3=BCller?= Subject: [libvirt] [PATCH 1/2] vmware: Fix initialization of VMware Fusion X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 03 Apr 2018 09:33:29 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 The vmware driver wants to execute vmware-vmx from the same directory in which vmrun was found. However, on VMware Fusion 10 vmrun at /Applications/VMware Fusion.app/Contents/Public/vmrun is a symlink pointing to ../Library/vmrun. vmware-vmx cannot be found, as it is not in PATH, but only in this Library directory. Therefore, follow the vmrun symlink and use the resulting path. Then the assumption that vmware-vmx is right next to it will still work. Signed-off-by: Rainer M=C3=BCller --- src/vmware/vmware_driver.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index 8b487c4a7..60e1c1abc 100644 --- a/src/vmware/vmware_driver.c +++ b/src/vmware/vmware_driver.c @@ -127,6 +127,7 @@ vmwareConnectOpen(virConnectPtr conn, struct vmware_driver *driver; size_t i; char *tmp; + char *vmrun =3D NULL; =20 virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); =20 @@ -164,7 +165,12 @@ vmwareConnectOpen(virConnectPtr conn, * for auto detection of the backend */ for (i =3D 0; i < ARRAY_CARDINALITY(vmrun_candidates); i++) { - driver->vmrun =3D virFindFileInPath(vmrun_candidates[i]); + vmrun =3D virFindFileInPath(vmrun_candidates[i]); + if (virFileResolveLink(vmrun, &driver->vmrun) < 0) { + virReportSystemError(errno, _("unable to resolve symlink '%s'"= ), vmrun); + goto cleanup; + } + VIR_FREE(vmrun); /* If we found one, we can stop looking */ if (driver->vmrun) break; @@ -215,6 +221,7 @@ vmwareConnectOpen(virConnectPtr conn, =20 cleanup: vmwareFreeDriver(driver); + VIR_FREE(vmrun); return VIR_DRV_OPEN_ERROR; }; =20 --=20 2.16.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list