[PATCH v3] esx: Add the actual product version to the error message.

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

 



Really this should be a warning, not an error, but at least let's
print out the product version so we have a hope of diagnosing the
problem.

error: internal error: v2v-vcenter is neither an ESX 3.5, 4.x nor 5.x host (product version = 0x40007)

In this instance the error was that you have to use 'vpx://'
instead of 'esx://'.
---
 src/esx/esx_driver.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index f0a5278..00bb960 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -703,8 +703,9 @@ esxConnectToHost(esxPrivate *priv,
             priv->host->productVersion != esxVI_ProductVersion_ESX51 &&
             priv->host->productVersion != esxVI_ProductVersion_ESX5x) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("%s is neither an ESX 3.5, 4.x nor 5.x host"),
-                           conn->uri->server);
+                           _("%s is neither an ESX 3.5, 4.x nor 5.x host "
+                             "(product version = 0x%x)"),
+                           conn->uri->server, priv->host->productVersion);
             goto cleanup;
         }
     } else { /* GSX */
@@ -822,8 +823,9 @@ esxConnectToVCenter(esxPrivate *priv,
         priv->vCenter->productVersion != esxVI_ProductVersion_VPX51 &&
         priv->vCenter->productVersion != esxVI_ProductVersion_VPX5x) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("%s is neither a vCenter 2.5, 4.x nor 5.x server"),
-                       hostname);
+                       _("%s is neither a vCenter 2.5, 4.x nor 5.x server "
+                         "(product version = 0x%x)"),
+                       hostname, priv->vCenter->productVersion);
         goto cleanup;
     }
 
-- 
2.0.4

--
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]