[pve-devel] [PATCH 2/3] allow to set machine via vm conf

Stefan Priebe s.priebe at profihost.ag
Mon May 27 22:52:16 CEST 2013


Signed-off-by: Stefan Priebe <s.priebe at profihost.ag>
---
 PVE/QemuServer.pm |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index f4697d7..2dba4ec 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -236,6 +236,12 @@ my $confdesc = {
 	enum => [qw(lsi virtio-scsi-pci megasas)],
 	default => 'lsi',
     },
+    machine => {
+	optional => 1,
+	type => 'string',
+	description => "qemu machine version",
+	enum => [qw(pc q35 pc-q35-1.6 pc-q35-1.5 pc-q35-1.4 pc-i440fx-1.6 pc-i440fx-1.5 pc-i440fx-1.4)],
+    },
     description => {
 	optional => 1,
 	type => 'string',
@@ -2384,6 +2390,7 @@ sub config_to_command {
 
     push @$rtcFlags, 'driftfix=slew' if $tdf;
 
+    push @$machineFlags, $conf->{machine} if $conf->{machine};
     if ($nokvm) {
 	push @$machineFlags, 'accel=tcg';
     } else {
-- 
1.7.10.4




More information about the pve-devel mailing list