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:
parent
1183c8f1a0
commit
93e21fd230
@ -160,7 +160,13 @@ my $agent_fmt = {
|
|||||||
description => "Run fstrim after moving a disk or migrating the VM.",
|
description => "Run fstrim after moving a disk or migrating the VM.",
|
||||||
type => 'boolean',
|
type => 'boolean',
|
||||||
optional => 1,
|
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 => {
|
type => {
|
||||||
description => "Select the agent type",
|
description => "Select the agent type",
|
||||||
|
@ -862,6 +862,12 @@ sub qga_fs_freeze {
|
|||||||
return;
|
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");
|
$self->loginfo("issuing guest-agent 'fs-freeze' command");
|
||||||
eval { mon_cmd($vmid, "guest-fsfreeze-freeze") };
|
eval { mon_cmd($vmid, "guest-fsfreeze-freeze") };
|
||||||
$self->logerr($@) if $@;
|
$self->logerr($@) if $@;
|
||||||
|
Loading…
Reference in New Issue
Block a user