Re: [PATCH] esx: Support vSphere 5.x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/10/21 Patrice LACHANCE <patlachance@xxxxxxxxx>:
> Hello

Sorry for the late response.

> Based on http://www.redhat.com/archives/libvir-list/2010-July/msg00480.html,
> I created this quick patch to accept connection to vSphere 5.x

The patch looks good in general.

> Notes:
> - I had to remove the warnings for version > 4.1 & 5 because they were
> generating errors when running scripts encapsulating virsh commands with
> opennebula. A better option might be to relie on an environment variable
> (for example DONT_BLAME_LIBVIRT!) to toggle warnings on/off

The warnings are there for a reason. If you need to suppress them then
you can already do that via the logging configuration

LIBVIRT_LOG_OUTPUTS=4:stderr virsh

This will only output errors, but suppresses warnings. Actually you
should not see this warnings with all currently available vSphere
versions. Those warnings are meant for future vSphere versions.

> - Ran only a few tests but it works as expected.

You added virtual hardware 8 version to
esxVI_ProductVersionToDefaultVirtualHWVersion but missed to add it to
virVMXParseConfig. This breaks virsh dumpxml for vSphere 5.0. I've
fixed that.

diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index be91c13..9ba06e5 100644 (file)
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -1278,9 +1279,10 @@ virVMXParseConfig(virVMXContext *ctx,
virCapsPtr caps, const char *vmx)
         goto cleanup;
     }

-    if (virtualHW_version != 4 && virtualHW_version != 7) {
+    if (virtualHW_version != 4 && virtualHW_version != 7 &&
+        virtualHW_version != 8) {
         VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
-                  _("Expecting VMX entry 'virtualHW.version' to be 4 or 7 "
+                  _("Expecting VMX entry 'virtualHW.version' to be 4, 7 or 8 "
                     "but found %lld"),
                   virtualHW_version);
         goto cleanup;

Actually we're currently in feature freeze for libvirt 0.9.7, but as
this is a pure addition patch, that will not break existing code I
pushed it now. Also because I don't want to delay this for another
release cycle.

ACK, thanks.

-- 
Matthias Bolte
http://photron.blogspot.com

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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]