Nice :-)
-----Original Message----- From: [email protected] on behalf of Eelco Dolstra Sent: Tue 12/7/2010 1:44 AM To: [email protected] Subject: [Nix-commits] SVN commit: nix - r25020 - nixos/trunk/lib Author: eelco Date: Tue Dec 7 00:44:29 2010 New Revision: 25020 URL: https://svn.nixos.org/websvn/nix/?rev=25020&sc=1 Log: * ZOMG, fixed a giant bug in the networking of distributed VM tests. It turns out that all network interfaces in all VMs had the same Ethernet address (52:54:00:12:34:56) because we didn't specify any with the macaddr=... option. This can obviously lead to great confusion. For instance, when a router forwards a packet, it can actually end up sending the packet to itself because the target machine has the same Ethernet address (causing a loop until the TTL expires), while the target *also* receives the packet. It's amazing anything worked at all, really. So now we just set the Ethernet addresses to 52:54:00:12:<virtual network number>:<machine number>. Modified: nixos/trunk/lib/build-vms.nix nixos/trunk/lib/qemu-flags.nix Modified: nixos/trunk/lib/build-vms.nix ============================================================================== --- nixos/trunk/lib/build-vms.nix Mon Dec 6 22:02:37 2010 (r25019) +++ nixos/trunk/lib/build-vms.nix Tue Dec 7 00:44:29 2010 (r25020) @@ -108,7 +108,7 @@ virtualisation.qemu.options = lib.flip lib.concatMapStrings interfacesNumbered - ({ first, second }: qemuNICFlags second first ); + ({ first, second }: qemuNICFlags second first m.second); }; } ) Modified: nixos/trunk/lib/qemu-flags.nix ============================================================================== --- nixos/trunk/lib/qemu-flags.nix Mon Dec 6 22:02:37 2010 (r25019) +++ nixos/trunk/lib/qemu-flags.nix Tue Dec 7 00:44:29 2010 (r25020) @@ -2,8 +2,8 @@ { - qemuNICFlags = nic: net: - "-net nic,vlan=${toString nic},model=virtio " + + qemuNICFlags = nic: net: machine: + "-net nic,vlan=${toString nic},macaddr=52:54:00:12:${toString net}:${toString machine},model=virtio " + # Use 232.0.1.<vlan> as the multicast address to connect VMs on # the same vlan, but allow it to be overriden using the # $QEMU_MCAST_ADDR_<vlan> environment variable. The test driver _______________________________________________ nix-commits mailing list [email protected] http://mail.cs.uu.nl/mailman/listinfo/nix-commits
_______________________________________________ nix-dev mailing list [email protected] https://mail.cs.uu.nl/mailman/listinfo/nix-dev
