From 3bafc5106eb3034354ff80dbaadd0829dfa4c8fb Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 5 Jun 2013 09:18:23 +0200 Subject: [PATCH] add new 'machine' configuration --- PVE/QemuServer.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 375f94db..4a6ff93b 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -421,6 +421,13 @@ EODESCR type => 'string', format => 'pve-volume-id', description => "Reference to a volume which stores the VM state. This is used internally for snapshots.", }, + machine => { + description => "Specific the Qemu machine type.", + type => 'string', + pattern => '(pc|pc(-i440fx)?-\d+\.\d+|q35|pc-q35-\d+\.\d+)', + maxLength => 40, + optional => 1, + }, }; # what about other qemu settings ? @@ -2377,6 +2384,10 @@ sub config_to_command { die "No accelerator found!\n" if !$cpuinfo->{hvm}; } + if ($conf->{machine}) { + push @$machineFlags, "type=$conf->{machine}"; + } + if ($conf->{startdate}) { push @$rtcFlags, "base=$conf->{startdate}"; } elsif ($useLocaltime) { -- 2.39.5