Merge pull request #15163 from swordqiu/hotfix/qj-ssd-flag-for-scsi-hd-only

fix: ssd(rotation_rate=1) option only applicable to scsi-hd device
This commit is contained in:
Zexi Li
2022-10-13 09:46:22 +08:00
committed by GitHub
+3 -1
View File
@@ -296,7 +296,9 @@ func getDiskDeviceOption(optDrv QemuOptions, disk *desc.SGuestDisk) string {
}
opt += fmt.Sprintf(",id=drive_%d", diskIndex)
if isSsd {
opt += ",rotation_rate=1"
if diskDriver == DISK_DRIVER_SCSI {
opt += ",rotation_rate=1"
}
}
return optDrv.Device(opt)
}