5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-10 01:18:01 +03:00

Currently,if we don't have a "machine" option in running config, and we take a vmstate snapshot

the machine option is write in the snapshot (ok), but also in the running config (bad)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
Dietmar Maurer 2014-08-29 11:27:27 +02:00
parent 6c33c345ef
commit 7946e0fa42

View File

@ -4741,6 +4741,8 @@ my $snapshot_commit = sub {
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);
@ -4753,6 +4755,8 @@ my $snapshot_commit = sub {
my $newconf = &$snapshot_apply_config($conf, $snap);
delete $newconf->{machine} if !$has_machine_config;
$newconf->{parent} = $snapname;
update_config_nolock($vmid, $newconf, 1);