[pve-devel] [PATCH 3/4] add machine parameter to qemu command

Stefan Priebe s.priebe at profihost.ag
Sun May 26 22:55:05 CEST 2013


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

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index f1c07fc..81aeb0c 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',
@@ -2248,6 +2254,8 @@ sub config_to_command {
 
     push @$cmd, '-id', $vmid;
 
+    push @$cmd, '-machine', $conf->{machine} if $conf->{machine};
+
     my $use_virtio = 0;
 
     my $qmpsocket = qmp_socket($vmid);
-- 
1.7.10.4




More information about the pve-devel mailing list