fix: ssd(rotation_rate=1) option only applicable to scsi-hd device

This commit is contained in:
Qiu Jian
2022-10-12 14:21:00 +08:00
parent 9f65fd6abb
commit 7a15734768
+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)
}