JorgeB Posted April 28, 2017 Share Posted April 28, 2017 (edited) 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, 2017 by johnnie.black Quote Link to comment
bonienl Posted April 28, 2017 Share Posted April 28, 2017 Can you show where exactly "discard='unmap'" is added in the XML file? Quote Link to comment
JorgeB Posted April 28, 2017 Author Share Posted April 28, 2017 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> 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.