[pve-devel] r5645 - in qemu-server/pve2: . PVE
svn-commits at proxmox.com
svn-commits at proxmox.com
Fri Mar 4 08:19:15 CET 2011
Author: dietmar
Date: 2011-03-04 08:19:15 +0100 (Fri, 04 Mar 2011)
New Revision: 5645
Modified:
qemu-server/pve2/ChangeLog
qemu-server/pve2/PVE/QemuServer.pm
Log:
* PVE/QemuServer.pm (config_to_command): require kvm 0.14.0
(config_to_command): use new "-device pci-assign,..." syntax
Modified: qemu-server/pve2/ChangeLog
===================================================================
--- qemu-server/pve2/ChangeLog 2011-03-04 07:07:21 UTC (rev 5644)
+++ qemu-server/pve2/ChangeLog 2011-03-04 07:19:15 UTC (rev 5645)
@@ -1,3 +1,8 @@
+2011-03-04 Proxmox Support Team <support at proxmox.com>
+
+ * PVE/QemuServer.pm (config_to_command): require kvm 0.14.0
+ (config_to_command): use new "-device pci-assign,..." syntax
+
2011-03-02 Proxmox Support Team <support at proxmox.com>
* PVE/QemuServer.pm (parse_net): new 'rate' option.
Modified: qemu-server/pve2/PVE/QemuServer.pm
===================================================================
--- qemu-server/pve2/PVE/QemuServer.pm 2011-03-04 07:07:21 UTC (rev 5644)
+++ qemu-server/pve2/PVE/QemuServer.pm 2011-03-04 07:19:15 UTC (rev 5645)
@@ -1701,7 +1701,13 @@
my $cmd = [];
my $kvmver = kvm_user_version();
+ my $vernum = 0; # unknown
+ if ($kvmver =~ m/^(\d+)\.(\d+)\.(\d+)$/) {
+ $vernum = $1*1000000+$2*1000+$3;
+ }
+ die "detected old qemu-kvm binary ($kvmver)\n" if $vernum < 14000;
+
my $have_ovz = -f '/proc/vz/vestat';
push @$cmd, '/usr/bin/kvm';
@@ -1730,7 +1736,7 @@
if (my $pcidl = $conf->{hostpci}) {
my @dl = split (/,/, $pcidl);
foreach my $dev (@dl) {
- push @$cmd, '-pcidevice', "host=$dev" if $dev;
+ push @$cmd, '-device', "pci-assign,host=$dev" if $dev;
}
}
# host usb devices
@@ -1775,29 +1781,15 @@
my $boot_opt;
- my $vernum = 0; # unknown
- if ($kvmver =~ m/^(\d+)\.(\d+)\.(\d+)$/) {
- $vernum = $1*1000000+$2*1000+$3;
- }
+ push @$cmd, '-smp', "sockets=$sockets,cores=$cores";
- if ($vernum < 11000) { # 0.9.X and 0.10.X
-
- push @$cmd, '-smp', $sockets*$cores;
-
- $boot_opt = $conf->{boot};
- } else {
-
- push @$cmd, '-smp', "sockets=$sockets,cores=$cores";
-
- $boot_opt = "menu=on";
- if ($conf->{boot}) {
- $boot_opt .= ",order=$conf->{boot}";
- }
-
- push @$cmd, '-nodefaults' if $vernum >= 12003;
-
+ $boot_opt = "menu=on";
+ if ($conf->{boot}) {
+ $boot_opt .= ",order=$conf->{boot}";
}
+ push @$cmd, '-nodefaults';
+
push @$cmd, '-boot', $boot_opt if $boot_opt;
push @$cmd, '-no-acpi' if defined ($conf->{acpi}) && $conf->{acpi} == 0;
More information about the pve-devel
mailing list