mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-24 02:04:10 +03:00
Don't apply snapshot config in snapshot_commit
We hold a lock from snapshot_prepare until snapshot_commit, so there is no need to copy back the snapshot config to the actual config. This allows to drop a workaround for not copying the 'machine' type config option.
This commit is contained in:
parent
2b5c0c43d4
commit
ff9922861a
@ -5996,8 +5996,6 @@ sub snapshot_commit {
|
||||
die "missing snapshot lock\n"
|
||||
if !($conf->{lock} && $conf->{lock} eq 'snapshot');
|
||||
|
||||
my $has_machine_config = defined($conf->{machine});
|
||||
|
||||
my $snap = $conf->{snapshots}->{$snapname};
|
||||
|
||||
die "snapshot '$snapname' does not exist\n" if !defined($snap);
|
||||
@ -6008,13 +6006,9 @@ sub snapshot_commit {
|
||||
delete $snap->{snapstate};
|
||||
delete $conf->{lock};
|
||||
|
||||
my $newconf = &$snapshot_apply_config($conf, $snap);
|
||||
$conf->{parent} = $snapname;
|
||||
|
||||
delete $newconf->{machine} if !$has_machine_config;
|
||||
|
||||
$newconf->{parent} = $snapname;
|
||||
|
||||
write_config($vmid, $newconf);
|
||||
write_config($vmid, $conf);
|
||||
};
|
||||
|
||||
lock_config($vmid, $updatefn);
|
||||
|
Loading…
x
Reference in New Issue
Block a user