[pve-devel] [PATCH] fix: start kvm with os type other

Wolfgang Link w.link at proxmox.com
Thu Aug 27 08:01:16 CEST 2015


this check is necessary, because we do not set ostype in qemu config when type is other
---
 PVE/QemuServer.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 7115007..53fbcc9 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2877,9 +2877,11 @@ sub config_to_command {
 
     push @$cpuFlags , '+lahf_lm' if $cpu eq 'kvm64';
 
-    push @$cpuFlags , '+x2apic' if !$nokvm && $conf->{ostype} ne 'solaris';
+    if ($conf->{ostype}) {
+	push @$cpuFlags , '+x2apic' if !$nokvm && $conf->{ostype} ne 'solaris';
 
-    push @$cpuFlags , '-x2apic' if $conf->{ostype} eq 'solaris';
+	push @$cpuFlags , '-x2apic' if $conf->{ostype} eq 'solaris';
+    }
 
     push @$cpuFlags, '+sep' if $cpu eq 'kvm64' || $cpu eq 'kvm32';
 
-- 
2.1.4





More information about the pve-devel mailing list