[pve-devel] [PATCH] snapshot_rollback : forcemachine config from snapshot config

Alexandre Derumier aderumier at odiso.com
Fri Aug 29 09:59:44 CEST 2014


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index e00a063..ad2aacc 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4810,7 +4810,7 @@ sub snapshot_rollback {
 
 	    # Note: old code did not store 'machine', so we try to be smart
 	    # and guess the snapshot was generated with kvm 1.4 (pc-i440fx-1.4).
-	    $forcemachine = $conf->{machine} || 'pc-i440fx-1.4';
+	    $forcemachine = $snap->{machine} || 'pc-i440fx-1.4';
 	    # we remove the 'machine' configuration if not explicitly specified
 	    # in the original config.
 	    delete $conf->{machine} if $snap->{vmstate} && !$has_machine_config;
-- 
1.7.10.4




More information about the pve-devel mailing list