mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-06 09:36:10 +00: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:
parent
6c33c345ef
commit
7946e0fa42
@ -4741,6 +4741,8 @@ my $snapshot_commit = sub {
|
|||||||
die "missing snapshot lock\n"
|
die "missing snapshot lock\n"
|
||||||
if !($conf->{lock} && $conf->{lock} eq 'snapshot');
|
if !($conf->{lock} && $conf->{lock} eq 'snapshot');
|
||||||
|
|
||||||
|
my $has_machine_config = defined($conf->{machine});
|
||||||
|
|
||||||
my $snap = $conf->{snapshots}->{$snapname};
|
my $snap = $conf->{snapshots}->{$snapname};
|
||||||
|
|
||||||
die "snapshot '$snapname' does not exist\n" if !defined($snap);
|
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);
|
my $newconf = &$snapshot_apply_config($conf, $snap);
|
||||||
|
|
||||||
|
delete $newconf->{machine} if !$has_machine_config;
|
||||||
|
|
||||||
$newconf->{parent} = $snapname;
|
$newconf->{parent} = $snapname;
|
||||||
|
|
||||||
update_config_nolock($vmid, $newconf, 1);
|
update_config_nolock($vmid, $newconf, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user