From 9da31b155e2de13fd2e918c8d085f32afefc5ad2 Mon Sep 17 00:00:00 2001 From: Qiu Jian Date: Wed, 12 Oct 2022 14:21:00 +0800 Subject: [PATCH] fix: ssd(rotation_rate=1) option only applicable to scsi-hd device --- pkg/hostman/guestman/qemu-kvmhelper.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/hostman/guestman/qemu-kvmhelper.go b/pkg/hostman/guestman/qemu-kvmhelper.go index 03d8ee57b8..2fd3d262b3 100644 --- a/pkg/hostman/guestman/qemu-kvmhelper.go +++ b/pkg/hostman/guestman/qemu-kvmhelper.go @@ -270,7 +270,9 @@ func (s *SKVMGuestInstance) getVdiskDesc(disk api.GuestdiskJsonDesc, isArm bool) } cmd += fmt.Sprintf(",id=drive_%d", diskIndex) if isSsd { - cmd += ",rotation_rate=1" + if diskDriver == DISK_DRIVER_SCSI { + cmd += ",rotation_rate=1" + } } return cmd }