--- src/vz/vz_sdk.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 750133d..9bdf7aa9a 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -2023,8 +2023,9 @@ prlsdkCheckUnsupportedParams(PRL_HANDLE sdkdom, virDomainDefPtr def) } if (!IS_CT(def)) { - if (def->os.nBootDevs != 1 || - def->os.bootDevs[0] != VIR_DOMAIN_BOOT_DISK || + if (def->os.nBootDevs == 0 || + (def->os.bootDevs[0] != VIR_DOMAIN_BOOT_DISK && + def->os.bootDevs[0] != VIR_DOMAIN_BOOT_CDROM) || def->os.init != NULL || def->os.initargv != NULL) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -3179,11 +3180,12 @@ static int prlsdkAddDisk(PRL_HANDLE sdkdom, if (disk->src->type == VIR_STORAGE_TYPE_FILE) { if (disk->device == VIR_DOMAIN_DISK_DEVICE_DISK && - virDomainDiskGetFormat(disk) != VIR_STORAGE_FILE_PLOOP) { + (virDomainDiskGetFormat(disk) != VIR_STORAGE_FILE_PLOOP && + virDomainDiskGetFormat(disk) != VIR_STORAGE_FILE_NONE)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Invalid format of " - "disk %s, vz driver supports only " - "images in ploop format."), disk->src->path); + "disk %s, it should be either not set or " + "ploop format."), disk->src->path); goto cleanup; } @@ -3205,11 +3207,13 @@ static int prlsdkAddDisk(PRL_HANDLE sdkdom, pret = PrlVmDev_SetEmulatedType(sdkdisk, emutype); prlsdkCheckRetGoto(pret, cleanup); - pret = PrlVmDev_SetSysName(sdkdisk, disk->src->path); - prlsdkCheckRetGoto(pret, cleanup); + if (disk->src->path != NULL) { + pret = PrlVmDev_SetSysName(sdkdisk, disk->src->path); + prlsdkCheckRetGoto(pret, cleanup); - pret = PrlVmDev_SetFriendlyName(sdkdisk, disk->src->path); - prlsdkCheckRetGoto(pret, cleanup); + pret = PrlVmDev_SetFriendlyName(sdkdisk, disk->src->path); + prlsdkCheckRetGoto(pret, cleanup); + } drive = &disk->info.addr.drive; if (drive->controller > 0) { -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list