April 28, 20179 yr Using virtio-scsi together with discard='unmap' allows the vdisk to keep its "sparseness", i.e., Windows 8/10 detects the storage as thin provisioned and space is recovered immediately when a file is deleted on the vidisk, allowing the vdisk to remain as small as possible and for those sectors to be trimmed by fstrim when using the vdisk on an SSD. After changing to that controller it's also possible to run defrag to recover all unused space. It's now possible to add the virtio-scsi controller and change the bus by editing the XML but changes will be lost in any futures edits with the VM editor. Edited April 28, 20179 yr by johnnie.black
April 28, 20179 yr Author 21 minutes ago, bonienl said: Can you show where exactly "discard='unmap'" is added in the XML file? <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='writeback' discard='unmap'/> <source file='/mnt/disks/840EVO/VMs2/Win10/vdisk1.img'/> <target dev='hdc' bus='scsi'/> <boot order='1'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> And you need to add the controller: <controller type='scsi' index='0' model='virtio-scsi'> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </controller>
Archived
This topic is now archived and is closed to further replies.