]> xenbits.xensource.com Git - libvirt.git/commitdiff
esx: use newer virtualHW version for 5.1+ hosts
authorDawid Zamirski <dzamirski@datto.com>
Mon, 23 May 2016 21:22:55 +0000 (17:22 -0400)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Thu, 26 May 2016 09:47:38 +0000 (11:47 +0200)
This is because there's a known issue where ESX will refuse to attach
drives bigger than 4TB when virtualHW < 9. Therefore, to avoid that
use the higher virtualHW for hosts that support it.

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2054952

src/esx/esx_vi.c

index f7eeeb5c539914f1a0ba8d974b49e56ecf01e5fd..652019644f0885a4274091986641618ff0840921 100644 (file)
@@ -4712,6 +4712,7 @@ esxVI_ProductVersionToDefaultVirtualHWVersion(esxVI_ProductLine productLine,
 {
     /* product version == 1000000 * major + 1000 * minor + micro */
     int major = productVersion / 1000000;
+    int minor = productVersion / 1000 - major * 1000;
 
     /*
      * virtualHW.version compatibility matrix:
@@ -4723,6 +4724,7 @@ esxVI_ProductVersionToDefaultVirtualHWVersion(esxVI_ProductLine productLine,
      *   ESX 5.0    + + +        5.0
      *   ESX 5.1    + + + +      5.1
      *   ESX 5.5    + + + + +    5.5
+     *   ESX 6.0    + + + + +    6.0
      *   GSX 2.0    + +          2.5
      */
     switch (productLine) {
@@ -4738,6 +4740,14 @@ esxVI_ProductVersionToDefaultVirtualHWVersion(esxVI_ProductLine productLine,
             return 7;
 
           case 5:
+            if (minor < 5)
+                return 9;
+
+            return 10;
+
+          case 6:
+            return 10;
+
           default:
             return 8;
         }
@@ -4751,6 +4761,14 @@ esxVI_ProductVersionToDefaultVirtualHWVersion(esxVI_ProductLine productLine,
             return 7;
 
           case 5:
+            if (minor < 5)
+                return 9;
+
+            return 10;
+
+          case 6:
+            return 10;
+
           default:
             return 8;
         }