5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2024-12-24 21:34:43 +03:00

vzdump: Add VM QGA option to skip fs-freeze/-thaw on backup

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
This commit is contained in:
Christoph Heiss 2023-02-23 15:18:03 +01:00 committed by Thomas Lamprecht
parent 1183c8f1a0
commit 93e21fd230
2 changed files with 13 additions and 1 deletions

View File

@ -160,7 +160,13 @@ my $agent_fmt = {
description => "Run fstrim after moving a disk or migrating the VM.",
type => 'boolean',
optional => 1,
default => 0
default => 0,
},
'freeze-fs-on-backup' => {
description => "Freeze/thaw guest filesystems on backup for consistency.",
type => 'boolean',
optional => 1,
default => 1,
},
type => {
description => "Select the agent type",

View File

@ -862,6 +862,12 @@ sub qga_fs_freeze {
return;
}
my $freeze = PVE::QemuServer::get_qga_key($self->{vmlist}->{$vmid}, 'freeze-fs-on-backup') // 1;
if (!$freeze) {
$self->loginfo("skipping guest-agent 'fs-freeze', disabled in VM options");
return;
}
$self->loginfo("issuing guest-agent 'fs-freeze' command");
eval { mon_cmd($vmid, "guest-fsfreeze-freeze") };
$self->logerr($@) if $@;