[pve-devel] [PATCH] Make Qemu Guest Agent a property_string

Stoiko Ivanov s.ivanov at proxmox.com
Thu Jul 5 19:42:32 CEST 2018


Fix #1242.

As suggested in the ticket this changes make the trimming after a move_disk,
clone or migrate depending on the new fstrim_cloned_disks property.

The patchset is based on Alexandre's Patch sent on 28.05.2018 (Thanks!).

One minor fixup is included (the vmid was missing in the invocation of
qm agent $vmid fstrim after migration).

While creating the patches I got quite inconsistent behaviour w.r.t the
effectiveness of the fstrim (I used lvmthin as storage) - sometimes (quite
often) the fstrim didn't free any space or just 1-2% (remaining on 98%-100%
usage with the image being only 45% full). Maybe it's more related to lvmthin
(and the VM and it's virtualized blockdevices not noticing that they got blown
up) and works fine with ceph?

Also I'm not sure whether the trimming is useful in the clone case,
since the new VM is not started the fstrim is run against the original VM, which
at least in my tests does not bloat?

Would be grateful for some tests in other environments.

Since the GUI part is my first try in javascript I would be grateful for
pointers where/what to improve (it's based on the way we do the hotplug
settings).



Stoiko Ivanov (3):
  Add missing $vmid to fstrim on migrate
  Make agent a property string, add fstrim_cloned_disks
  use fstrim_cloned_disks property

 PVE/API2/Qemu.pm   |  7 +++----
 PVE/QemuConfig.pm  |  2 +-
 PVE/QemuMigrate.pm |  4 ++--
 PVE/QemuServer.pm  | 38 +++++++++++++++++++++++++++++++++-----
 4 files changed, 39 insertions(+), 12 deletions(-)

Stoiko Ivanov (1):
  ui/qemu: Extend Qemu Guest agent

 www/manager6/Makefile                     |  1 +
 www/manager6/Utils.js                     | 10 +++++
 www/manager6/form/AgentFeatureSelector.js | 65 +++++++++++++++++++++++++++++++
 www/manager6/qemu/Options.js              | 10 ++---
 4 files changed, 80 insertions(+), 6 deletions(-)
 create mode 100644 www/manager6/form/AgentFeatureSelector.js

-- 
2.11.0





More information about the pve-devel mailing list