[pve-devel] r5291 - qemu-server/trunk

svn-commits at proxmox.com svn-commits at proxmox.com
Thu Oct 28 12:15:15 CEST 2010


Author: dietmar
Date: 2010-10-28 10:15:15 +0000 (Thu, 28 Oct 2010)
New Revision: 5291

Modified:
   qemu-server/trunk/ChangeLog
   qemu-server/trunk/Makefile
   qemu-server/trunk/QemuServer.pm
   qemu-server/trunk/bridge-vlan
   qemu-server/trunk/changelog.Debian
Log:


Modified: qemu-server/trunk/ChangeLog
===================================================================
--- qemu-server/trunk/ChangeLog	2010-10-27 09:35:45 UTC (rev 5290)
+++ qemu-server/trunk/ChangeLog	2010-10-28 10:15:15 UTC (rev 5291)
@@ -1,3 +1,9 @@
+2010-10-28  Proxmox Support Team  <support at proxmox.com>
+
+	* QemuServer.pm (config_to_command): generate unique interface
+	names (the new -netdev syntax does not allow vlans, so we need to
+	create a tap for each network device).
+
 2010-10-27  Proxmox Support Team  <support at proxmox.com>
 
 	* QemuServer.pm (config_to_command): use new -netdev syntax for

Modified: qemu-server/trunk/Makefile
===================================================================
--- qemu-server/trunk/Makefile	2010-10-27 09:35:45 UTC (rev 5290)
+++ qemu-server/trunk/Makefile	2010-10-28 10:15:15 UTC (rev 5291)
@@ -2,7 +2,7 @@
 
 VERSION=1.1
 PACKAGE=qemu-server
-PKGREL=23
+PKGREL=24
 
 DESTDIR=
 PREFIX=/usr

Modified: qemu-server/trunk/QemuServer.pm
===================================================================
--- qemu-server/trunk/QemuServer.pm	2010-10-27 09:35:45 UTC (rev 5290)
+++ qemu-server/trunk/QemuServer.pm	2010-10-28 10:15:15 UTC (rev 5291)
@@ -1413,6 +1413,7 @@
 		push @$cmd, '-net', "tap,vlan=$i,ifname=$ifname,script=/var/lib/qemu-server/bridge-vlan";
 	    }
 
+	    my $j = 0;
 	    foreach my $nic (@{$vlan->{nics}}) {
 		my $device = $nic->{model};
 		my $vhostparam = '';
@@ -1424,9 +1425,10 @@
 		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";
-		    push @$cmd, '-device', "$device,mac=$nic->{macaddr},netdev=$ifname";
+		    push @$cmd, '-netdev', "type=tap,id=${k}d$j,ifname=${ifname}d$j,script=/var/lib/qemu-server/bridge-vlan$vhostparam";
+		    push @$cmd, '-device', "$device,mac=$nic->{macaddr},netdev=${k}d$j";
 		}
+		$j = $j + 1;
 	    }
 
 	}

Modified: qemu-server/trunk/bridge-vlan
===================================================================
--- qemu-server/trunk/bridge-vlan	2010-10-27 09:35:45 UTC (rev 5290)
+++ qemu-server/trunk/bridge-vlan	2010-10-28 10:15:15 UTC (rev 5291)
@@ -7,7 +7,7 @@
 die "no interface specified\n" if !$iface;
 
 die "got strange interface name '$iface'\n" 
-    if $iface !~ m/^vmtab(\d+)i(\d+)$/;
+    if $iface !~ m/^vmtab(\d+)i(\d+)(d\d+)?$/;
 
 my $vmid = $1;
 my $vlan = $2;

Modified: qemu-server/trunk/changelog.Debian
===================================================================
--- qemu-server/trunk/changelog.Debian	2010-10-27 09:35:45 UTC (rev 5290)
+++ qemu-server/trunk/changelog.Debian	2010-10-28 10:15:15 UTC (rev 5291)
@@ -1,3 +1,9 @@
+qemu-server (1.1-24) unstable; urgency=low
+
+  * fix new -netdev syntax when used with multiple network devices.
+
+ -- Proxmox Support Team <support at proxmox.com>  Thu, 28 Oct 2010 12:14:22 +0200
+
 qemu-server (1.1-23) unstable; urgency=low
 
   * use new -netdev syntax for network devices. This enables tcp offload




More information about the pve-devel mailing list