mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-11-02 17:56:07 +00:00
Add qga freeze in vzdump in snapshot mode
it will freeze the filesystem to provide consistents. Signed-off-by: Wolfgang Link <wolfgang@linksystems.org>
This commit is contained in:
parent
67fb9de608
commit
ab6a9a0cd4
@ -286,8 +286,8 @@ sub archive {
|
||||
my $resume_on_backup;
|
||||
|
||||
my $skiplock = 1;
|
||||
|
||||
if (!PVE::QemuServer::check_running($vmid)) {
|
||||
my $vm_is_running = PVE::QemuServer::check_running($vmid);
|
||||
if (!$vm_is_running) {
|
||||
eval {
|
||||
$self->loginfo("starting kvm to execute backup task");
|
||||
PVE::QemuServer::vm_start($self->{storecfg}, $vmid, undef,
|
||||
@ -380,8 +380,22 @@ sub archive {
|
||||
|
||||
$qmpclient->queue_cmd($vmid, $add_fd_cb, 'getfd',
|
||||
fd => $outfileno, fdname => "backup");
|
||||
|
||||
if ($self->{vmlist}->{$vmid}->{agent} && $vm_is_running){
|
||||
eval {PVE::QemuServer::vm_mon_cmd($vmid,"guest-fsfreeze-freeze");};
|
||||
if (my $err = $@) {
|
||||
$self->logerr($err);
|
||||
}
|
||||
}
|
||||
|
||||
$qmpclient->queue_execute();
|
||||
|
||||
if ($self->{vmlist}->{$vmid}->{agent} && $vm_is_running ){
|
||||
eval {PVE::QemuServer::vm_mon_cmd($vmid,"guest-fsfreeze-thaw");};
|
||||
if (my $err = $@) {
|
||||
$self->logerr($err);
|
||||
}
|
||||
}
|
||||
die $qmpclient->{errors}->{$vmid} if $qmpclient->{errors}->{$vmid};
|
||||
|
||||
if ($cpid) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user