Changeset
src/vmware/vmware_conf.c   |  7 ++++++-
src/vmware/vmware_driver.c | 11 ++++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
Git apply log
Switched to a new branch '20180414092543.12954-1-raimue@codingfarm.de'
Applying: vmware: Fix initialization of VMware Fusion
Using index info to reconstruct a base tree...
M	src/vmware/vmware_driver.c
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: vmware: Failures in cache info init are non-fatal
Using index info to reconstruct a base tree...
M	src/vmware/vmware_conf.c
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
To https://github.com/patchew-project/libvirt
 + 0af0ff0...ae1a49a patchew/20180414092543.12954-1-raimue@codingfarm.de -> patchew/20180414092543.12954-1-raimue@codingfarm.de (forced update)
Test passed: syntax-check

loading

[libvirt] [PATCH v2 0/2] Fix vmware driver for VMware Fusion 10
Posted by Rainer Müller, 13 weeks ago
These changes were required to get VMware Fusion working at all.
I tested with VMware Fusion 10.1.1 on macOS 10.12 Sierra.

I am not sure whether calling virCapabilitiesInitCaches() makes sense at
all on macOS. This function looks highly specific to Linux as it relies
on /sys/devices/system, so it should probably be wrapped with an
appropriate #ifdef. I do not feel proficient enough with the libvirt
internals to make this change, though.

v1 was here:
https://www.redhat.com/archives/libvir-list/2018-April/msg00087.html

diff to v1:
- Fix a possible segfault when vmrun is not found in PATH.

Rainer Müller (2):
  vmware: Fix initialization of VMware Fusion
  vmware: Failures in cache info init are non-fatal

 src/vmware/vmware_conf.c   |  7 ++++++-
 src/vmware/vmware_driver.c | 11 ++++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

-- 
2.17.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 0/2] Fix vmware driver for VMware Fusion 10
Posted by John Ferlan, 12 weeks ago

On 04/14/2018 05:25 AM, Rainer Müller wrote:
> These changes were required to get VMware Fusion working at all.
> I tested with VMware Fusion 10.1.1 on macOS 10.12 Sierra.
> 
> I am not sure whether calling virCapabilitiesInitCaches() makes sense at
> all on macOS. This function looks highly specific to Linux as it relies
> on /sys/devices/system, so it should probably be wrapped with an
> appropriate #ifdef. I do not feel proficient enough with the libvirt
> internals to make this change, though.
> 
> v1 was here:
> https://www.redhat.com/archives/libvir-list/2018-April/msg00087.html
> 
> diff to v1:
> - Fix a possible segfault when vmrun is not found in PATH.
> 
> Rainer Müller (2):
>   vmware: Fix initialization of VMware Fusion
>   vmware: Failures in cache info init are non-fatal
> 
>  src/vmware/vmware_conf.c   |  7 ++++++-
>  src/vmware/vmware_driver.c | 11 ++++++++++-
>  2 files changed, 16 insertions(+), 2 deletions(-)
> 

Reviewed-by: John Ferlan <jferlan@redhat.com>
(series)

and pushed.

Thanks,

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH v2 1/2] vmware: Fix initialization of VMware Fusion
Posted by Rainer Müller, 13 weeks ago
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üller <raimue@codingfarm.de>
---
 src/vmware/vmware_driver.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index c8a3151fa..b4b809f1a 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 = NULL;
 
     virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
 
@@ -149,7 +150,14 @@ vmwareConnectOpen(virConnectPtr conn,
      * for auto detection of the backend
      */
     for (i = 0; i < ARRAY_CARDINALITY(vmrun_candidates); i++) {
-        driver->vmrun = virFindFileInPath(vmrun_candidates[i]);
+        vmrun = virFindFileInPath(vmrun_candidates[i]);
+        if (vmrun == NULL)
+            continue;
+        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;
@@ -200,6 +208,7 @@ vmwareConnectOpen(virConnectPtr conn,
 
  cleanup:
     vmwareFreeDriver(driver);
+    VIR_FREE(vmrun);
     return VIR_DRV_OPEN_ERROR;
 };
 
-- 
2.17.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH v2 2/2] vmware: Failures in cache info init are non-fatal
Posted by Rainer Müller, 13 weeks ago
This is also not fatal on other drivers.

Signed-off-by: Rainer Müller <raimue@codingfarm.de>
---
 src/vmware/vmware_conf.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c
index 891d9a47f..b9f18e6ac 100644
--- a/src/vmware/vmware_conf.c
+++ b/src/vmware/vmware_conf.c
@@ -33,6 +33,11 @@
 #include "vmx.h"
 #include "vmware_conf.h"
 #include "virstring.h"
+#include "virlog.h"
+
+#define VIR_FROM_THIS VIR_FROM_VMWARE
+
+VIR_LOG_INIT("vmware.vmware_conf");
 
 VIR_ENUM_IMPL(vmwareDriver, VMWARE_DRIVER_LAST,
               "player",
@@ -69,7 +74,7 @@ vmwareCapsInit(void)
         goto error;
 
     if (virCapabilitiesInitCaches(caps) < 0)
-        goto error;
+        VIR_WARN("Failed to get host CPU cache info");
 
     /* i686 guests are always supported */
     if ((guest = virCapabilitiesAddGuest(caps,
-- 
2.17.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list