[PATCH] esx: Allow 'pvscsi' as SCSI controller model

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

 



---
 docs/drvesx.html.in                       |   13 ++++++++++++-
 docs/schemas/domain.rng                   |    1 +
 src/conf/domain_conf.c                    |    3 ++-
 src/conf/domain_conf.h                    |    1 +
 src/esx/esx_vmx.c                         |   12 +++++++-----
 tests/vmx2xmldata/vmx2xml-scsi-driver.vmx |    5 +++++
 tests/vmx2xmldata/vmx2xml-scsi-driver.xml |    6 ++++++
 tests/xml2vmxdata/xml2vmx-scsi-driver.vmx |    5 +++++
 tests/xml2vmxdata/xml2vmx-scsi-driver.xml |    5 +++++
 9 files changed, 44 insertions(+), 7 deletions(-)

diff --git a/docs/drvesx.html.in b/docs/drvesx.html.in
index bc7e1a0..f4e7530 100644
--- a/docs/drvesx.html.in
+++ b/docs/drvesx.html.in
@@ -302,7 +302,13 @@ ethernet0.checkMACAddress = "false"
         </dd>
         <dt><code>lsisas1068</code></dt>
         <dd>
-            LSI Logic SAS 1068 controller.
+            LSI Logic SAS 1068 controller. <span class="since">Since 0.8.0</span>
+        </dd>
+        <dt><code>pvscsi</code></dt>
+        <dd>
+            Special VMware Paravirtual SCSI controller, requires VMware tools inside
+            the guest. See <a href="http://kb.vmware.com/kb/1010398";>VMware KB1010398</a>
+            for details. <span class="since">Since 0.8.3</span>
         </dd>
     </dl>
     <p>
@@ -642,5 +648,10 @@ Enter administrator password for example-vcenter.com:
                 VMware VMX config parameters
             </a>
         </li>
+        <li>
+            <a href="http://www.vmware.com/pdf/vsp_4_pvscsi_perf.pdf";>
+                VMware ESX 4.0 PVSCSI Storage Performance
+            </a>
+        </li>
     </ul>
 </body></html>
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index fd57917..b171d01 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -676,6 +676,7 @@
             <value>buslogic</value>
             <value>lsilogic</value>
             <value>lsisas1068</value>
+            <value>pvscsi</value>
           </choice>
         </attribute>
       </optional>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 378c06e..3cd43c4 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -142,7 +142,8 @@ VIR_ENUM_IMPL(virDomainController, VIR_DOMAIN_CONTROLLER_TYPE_LAST,
 VIR_ENUM_IMPL(virDomainControllerModel, VIR_DOMAIN_CONTROLLER_MODEL_LAST,
               "buslogic",
               "lsilogic",
-              "lsisas1068")
+              "lsisas1068",
+              "pvscsi")
 
 VIR_ENUM_IMPL(virDomainFS, VIR_DOMAIN_FS_TYPE_LAST,
               "mount",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 01da17e..3451302 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -199,6 +199,7 @@ enum virDomainControllerModel {
     VIR_DOMAIN_CONTROLLER_MODEL_BUSLOGIC,
     VIR_DOMAIN_CONTROLLER_MODEL_LSILOGIC,
     VIR_DOMAIN_CONTROLLER_MODEL_LSISAS1068,
+    VIR_DOMAIN_CONTROLLER_MODEL_PVSCSI,
 
     VIR_DOMAIN_CONTROLLER_MODEL_LAST
 };
diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c
index e10e745..46875f3 100644
--- a/src/esx/esx_vmx.c
+++ b/src/esx/esx_vmx.c
@@ -740,11 +740,12 @@ esxVMX_GatherSCSIControllers(virDomainDefPtr def, int virtualDev[4],
         if (controller->model != -1 &&
             controller->model != VIR_DOMAIN_CONTROLLER_MODEL_BUSLOGIC &&
             controller->model != VIR_DOMAIN_CONTROLLER_MODEL_LSILOGIC &&
-            controller->model != VIR_DOMAIN_CONTROLLER_MODEL_LSISAS1068) {
+            controller->model != VIR_DOMAIN_CONTROLLER_MODEL_LSISAS1068 &&
+            controller->model != VIR_DOMAIN_CONTROLLER_MODEL_PVSCSI) {
             ESX_ERROR(VIR_ERR_INTERNAL_ERROR,
                       _("Expecting domain XML attribute 'model' of entry "
                         "'controller' to be 'buslogic' or 'lsilogic' or "
-                        "'lsisas1068' but found '%s'"),
+                        "'lsisas1068' or 'pvscsi' but found '%s'"),
                       virDomainControllerModelTypeToString(controller->model));
             return -1;
         }
@@ -1483,11 +1484,12 @@ esxVMX_ParseSCSIController(virConfPtr conf, int controller, bool *present,
         if (*virtualDev == -1 ||
             (*virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_BUSLOGIC &&
              *virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_LSILOGIC &&
-             *virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_LSISAS1068)) {
+             *virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_LSISAS1068 &&
+             *virtualDev != VIR_DOMAIN_CONTROLLER_MODEL_PVSCSI)) {
             ESX_ERROR(VIR_ERR_INTERNAL_ERROR,
                       _("Expecting VMX entry '%s' to be 'buslogic' or 'lsilogic' "
-                        "or 'lsisas1068' but found '%s'"), virtualDev_name,
-                        virtualDev_string);
+                        "or 'lsisas1068' or 'pvscsi' but found '%s'"),
+                       virtualDev_name, virtualDev_string);
             goto failure;
         }
     }
diff --git a/tests/vmx2xmldata/vmx2xml-scsi-driver.vmx b/tests/vmx2xmldata/vmx2xml-scsi-driver.vmx
index cb055f6..64d7c99 100644
--- a/tests/vmx2xmldata/vmx2xml-scsi-driver.vmx
+++ b/tests/vmx2xmldata/vmx2xml-scsi-driver.vmx
@@ -6,6 +6,8 @@ scsi1.present = "true"
 scsi1.virtualDev = "lsilogic"
 scsi2.present = "true"
 scsi2.virtualDev = "lsisas1068"
+scsi3.present = "true"
+scsi3.virtualDev = "pvscsi"
 scsi0:0.present = "true"
 scsi0:0.deviceType = "scsi-hardDisk"
 scsi0:0.fileName = "harddisk1.vmdk"
@@ -15,3 +17,6 @@ scsi1:0.fileName = "harddisk2.vmdk"
 scsi2:0.present = "true"
 scsi2:0.deviceType = "scsi-hardDisk"
 scsi2:0.fileName = "harddisk3.vmdk"
+scsi3:0.present = "true"
+scsi3:0.deviceType = "scsi-hardDisk"
+scsi3:0.fileName = "harddisk4.vmdk"
diff --git a/tests/vmx2xmldata/vmx2xml-scsi-driver.xml b/tests/vmx2xmldata/vmx2xml-scsi-driver.xml
index d39415d..f5739d9 100644
--- a/tests/vmx2xmldata/vmx2xml-scsi-driver.xml
+++ b/tests/vmx2xmldata/vmx2xml-scsi-driver.xml
@@ -26,8 +26,14 @@
       <target dev='sdae' bus='scsi'/>
       <address type='drive' controller='2' bus='0' unit='0'/>
     </disk>
+    <disk type='file' device='disk'>
+      <source file='[datastore] directory/harddisk4.vmdk'/>
+      <target dev='sdat' bus='scsi'/>
+      <address type='drive' controller='3' bus='0' unit='0'/>
+    </disk>
     <controller type='scsi' index='0' model='buslogic'/>
     <controller type='scsi' index='1' model='lsilogic'/>
     <controller type='scsi' index='2' model='lsisas1068'/>
+    <controller type='scsi' index='3' model='pvscsi'/>
   </devices>
 </domain>
diff --git a/tests/xml2vmxdata/xml2vmx-scsi-driver.vmx b/tests/xml2vmxdata/xml2vmx-scsi-driver.vmx
index 7cceca0..a92d7fc 100644
--- a/tests/xml2vmxdata/xml2vmx-scsi-driver.vmx
+++ b/tests/xml2vmxdata/xml2vmx-scsi-driver.vmx
@@ -11,6 +11,8 @@ scsi1.present = "true"
 scsi1.virtualDev = "lsilogic"
 scsi2.present = "true"
 scsi2.virtualDev = "lsisas1068"
+scsi3.present = "true"
+scsi3.virtualDev = "pvscsi"
 scsi0:0.present = "true"
 scsi0:0.deviceType = "scsi-hardDisk"
 scsi0:0.fileName = "/vmfs/volumes/datastore/directory/harddisk1.vmdk"
@@ -20,3 +22,6 @@ scsi1:0.fileName = "/vmfs/volumes/datastore/directory/harddisk2.vmdk"
 scsi2:0.present = "true"
 scsi2:0.deviceType = "scsi-hardDisk"
 scsi2:0.fileName = "/vmfs/volumes/datastore/directory/harddisk3.vmdk"
+scsi3:0.present = "true"
+scsi3:0.deviceType = "scsi-hardDisk"
+scsi3:0.fileName = "/vmfs/volumes/datastore/directory/harddisk4.vmdk"
diff --git a/tests/xml2vmxdata/xml2vmx-scsi-driver.xml b/tests/xml2vmxdata/xml2vmx-scsi-driver.xml
index 797a26e..ae3a43c 100644
--- a/tests/xml2vmxdata/xml2vmx-scsi-driver.xml
+++ b/tests/xml2vmxdata/xml2vmx-scsi-driver.xml
@@ -21,5 +21,10 @@
       <source file='[datastore] directory/harddisk3.vmdk'/>
       <target dev='sdae' bus='scsi'/>
     </disk>
+    <disk type='file' device='disk'>
+      <driver name='pvscsi'/>
+      <source file='[datastore] directory/harddisk4.vmdk'/>
+      <target dev='sdat' bus='scsi'/>
+    </disk>
   </devices>
 </domain>
-- 
1.7.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]