[pve-devel] r5290 - qemu-server/trunk
svn-commits at proxmox.com
svn-commits at proxmox.com
Wed Oct 27 11:35:45 CEST 2010
Author: dietmar
Date: 2010-10-27 09:35:45 +0000 (Wed, 27 Oct 2010)
New Revision: 5290
Modified:
qemu-server/trunk/QemuServer.pm
Log:
Modified: qemu-server/trunk/QemuServer.pm
===================================================================
--- qemu-server/trunk/QemuServer.pm 2010-10-27 09:25:29 UTC (rev 5289)
+++ qemu-server/trunk/QemuServer.pm 2010-10-27 09:35:45 UTC (rev 5290)
@@ -228,8 +228,8 @@
my $tmp = `kvm -help 2>/dev/null`;
- if ($tmp =~ m/^QEMU PC emulator version (\d+\.\d+\.\d+) /) {
- $kvm_user_version = $1;
+ if ($tmp =~ m/^QEMU( PC)? emulator version (\d+\.\d+\.\d+) /) {
+ $kvm_user_version = $2;
}
return $kvm_user_version;
@@ -1309,6 +1309,8 @@
my $vernum = 0; # unknown
if ($kvmver =~ m/^(\d+)\.(\d+)\.(\d+)$/) {
$vernum = $1*1000000+$2*1000+$3;
+ } else {
+ die "unable to parse kvm version '$kvmver'\n";
}
if ($vernum < 11000) { # 0.9.X and 0.10.X
@@ -1407,7 +1409,7 @@
my $ifname = "vmtab${vmid}i$i";
- if ($vernum <= 13000) {
+ if ($vernum < 13000) {
push @$cmd, '-net', "tap,vlan=$i,ifname=$ifname,script=/var/lib/qemu-server/bridge-vlan";
}
@@ -1419,7 +1421,7 @@
$device = 'virtio-net-pci';
$vhostparam = ',vhost=on' if $kernel_has_vhost_net;
};
- if ($vernum <= 13000) {
+ if ($vernum < 13000) {
push @$cmd, '-net', "nic,vlan=$i,model=$nic->{model},macaddr=$nic->{macaddr}";
} else {
push @$cmd, '-netdev', "type=tap,id=$ifname,ifname=$ifname,script=/var/lib/qemu-server/bridge-vlan$vhostparam";
More information about the pve-devel
mailing list