Dennis Jacobfeuerborn
2014-Nov-01 04:30 UTC
[libvirt-users] fstrim support in libvirt/qemu guests
Hi, I'm trying to find out how to enable fstrim support for libvirt/qemu guests. Specifically I'm trying to enable this on a CentOS 7 host (qemu 1.5). I searched the web but only found very vague information and no clear documentation on the requirements or how to modify the guest xml to enable discard/fstrim support. Can someone point me in the right direction? Regards, Dennis
Michal Privoznik
2014-Nov-03 13:24 UTC
Re: [libvirt-users] fstrim support in libvirt/qemu guests
On 01.11.2014 05:30, Dennis Jacobfeuerborn wrote:> Hi, > I'm trying to find out how to enable fstrim support for libvirt/qemu > guests. Specifically I'm trying to enable this on a CentOS 7 host (qemu > 1.5). I searched the web but only found very vague information and no > clear documentation on the requirements or how to modify the guest xml > to enable discard/fstrim support. > > Can someone point me in the right direction?One thing that you'll need is the guest agent: http://wiki.libvirt.org/page/Qemu_guest_agent Then you can just use: # virsh domfstrim $dom Michal
Andrey Korolyov
2014-Nov-03 13:43 UTC
Re: [libvirt-users] fstrim support in libvirt/qemu guests
On Mon, Nov 3, 2014 at 4:24 PM, Michal Privoznik <mprivozn@redhat.com> wrote:> On 01.11.2014 05:30, Dennis Jacobfeuerborn wrote: >> >> Hi, >> I'm trying to find out how to enable fstrim support for libvirt/qemu >> guests. Specifically I'm trying to enable this on a CentOS 7 host (qemu >> 1.5). I searched the web but only found very vague information and no >> clear documentation on the requirements or how to modify the guest xml >> to enable discard/fstrim support. >> >> Can someone point me in the right direction? > > > One thing that you'll need is the guest agent: > > http://wiki.libvirt.org/page/Qemu_guest_agent > > Then you can just use: > > # virsh domfstrim $dom > > Michal... and probably discard-aware block driver (although I cannot name anything except virtio-blk which is not supporting trim or will not support in the near future). Not sure to which part, guest-host interaction or driver abilities, the initial question belongs.