mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2024-12-23 17:34:19 +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.",
|
||||
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",
|
||||
|
@ -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 $@;
|
||||
|
Loading…
Reference in New Issue
Block a user