[libvirt] [PATCH 3/4] parallels: report SATA bus type for container block devices disks

Maxim Nestratov mnestratov at parallels.com
Wed Jun 3 21:10:24 UTC 2015


As we can add disks based on block devices to containers and bus type
doesn't have any meaning here, let us report always SATA for them.

Signed-off-by: Maxim Nestratov <mnestratov at parallels.com>
---
 src/parallels/parallels_sdk.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c
index e4d69f4..432cfe2 100644
--- a/src/parallels/parallels_sdk.c
+++ b/src/parallels/parallels_sdk.c
@@ -496,8 +496,13 @@ prlsdkGetDiskInfo(PRL_HANDLE prldisk,
     if (virDomainDiskSetSource(disk, buf) < 0)
         goto cleanup;
 
-    pret = PrlVmDev_GetIfaceType(prldisk, &ifType);
-    prlsdkCheckRetGoto(pret, cleanup);
+    /* Let physical devices added to CT look like SATA disks */
+    if (isCt)
+        ifType = PMS_SATA_DEVICE;
+    else {
+        pret = PrlVmDev_GetIfaceType(prldisk, &ifType);
+        prlsdkCheckRetGoto(pret, cleanup);
+    }
 
     pret = PrlVmDev_GetStackIndex(prldisk, &pos);
     prlsdkCheckRetGoto(pret, cleanup);
-- 
2.1.0




More information about the libvir-list mailing list