From 3fd2dd5484be738998220558da240a47baf41d64 Mon Sep 17 00:00:00 2001 From: Maxim Nestratov Date: Thu, 4 Jun 2015 00:10:00 +0300 Subject: [PATCH] parallels: report SATA bus type for container block devices disks 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 --- 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 1bc9c8bd18..e6d3fd9253 100644 --- a/src/parallels/parallels_sdk.c +++ b/src/parallels/parallels_sdk.c @@ -500,8 +500,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); -- GitLab