Virtio-SCSI and DISCARD with KVM

Hey all,
at first thanks for providing such a nice environment to manage vservers! :slight_smile:

I have one question regarding a KVM instance:
I would like to use the virtio scsi driver instead of ide/virtio and also setup discard=‘unmap’ on the virtual disk, but I dont see how this can be done inside CloudMin.

Is this possible?

I plan to deploy sparse disk images and want to use fstrim inside the guest to keep those images sparse.

Thanks in advance!

Best regards,
Simon

EDIT:
I found a way to do it through manual config hacking:
Open up /etc/webmin/servers/xxx.serv
Set if for disk to none and add an id and discard=unmap:
kvm_drives=media=disk,discard=unmap,index=0,file=/kvm/disk.img,if=none,cache=none,id=drive0

Add required scsi device through the kvm args
kvm_args=-device virtio-scsi-pci,id=scsi0 -device scsi-hd,bus=scsi0.0,drive=drive0

Restart through cloudmin panel