[pve-devel] [PATCH qemu-server] Fix #1242 : clone_disk : call qga fstrim after clone

Alwin Antreich a.antreich at proxmox.com
Tue May 29 09:19:39 CEST 2018

On Mon, May 28, 2018 at 08:49:29PM +0200, Alexandre DERUMIER wrote:
> >>If I understood it right, then the fstrim is called on every migrate with a 
> >>running guest agent. While, I guess the command is called also if you don't 
> >>have discard in the vm config activated and might only produce a error 
> >>message. 
> It don't produce an error, but indeed, it does nothing in this case.
> I can add a check for discard option, to avoid the extra qga call.
If there is a config option (see below) then no extra care would be
needed here.

> >>IMHO, it might be good to have a config option that sets if a VM should do a
> >>fstrim (eg. qga-fstrim: 0/1) on migration. This way users, are actively setting
> >>it and are knowing that this also has its drawbacks on their systems.
> maybe can we add it in datacenter.cfg ? or storage.cfg option ?
I would think, the best is to have it in the vmid.conf itself, as maybe there
is one VM where I want to have flat images (eg. DB server) and not for the

Maybe in a fashion like, qga: fstrim=1,guest-exec=..., I guess this
makes extending the guest-agent commands more straight forward too.

More information about the pve-devel mailing list