diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-12-07 00:44:29 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-12-07 00:44:29 +0000 |
commit | 2e38d8cd317b0d88d569b197648cb5cb65292328 (patch) | |
tree | bd5baeded06e52807786c78898d9d4039ba04628 /lib/qemu-flags.nix | |
parent | 755c30c7a2dcd30bffab17478cc06e4c9088d62d (diff) | |
download | nixpkgs-2e38d8cd317b0d88d569b197648cb5cb65292328.tar nixpkgs-2e38d8cd317b0d88d569b197648cb5cb65292328.tar.gz nixpkgs-2e38d8cd317b0d88d569b197648cb5cb65292328.tar.bz2 nixpkgs-2e38d8cd317b0d88d569b197648cb5cb65292328.tar.lz nixpkgs-2e38d8cd317b0d88d569b197648cb5cb65292328.tar.xz nixpkgs-2e38d8cd317b0d88d569b197648cb5cb65292328.tar.zst nixpkgs-2e38d8cd317b0d88d569b197648cb5cb65292328.zip |
* 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>. svn path=/nixos/trunk/; revision=25020
Diffstat (limited to 'lib/qemu-flags.nix')
-rw-r--r-- | lib/qemu-flags.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/qemu-flags.nix b/lib/qemu-flags.nix index 05edc1d2cc6..7831c8f149a 100644 --- a/lib/qemu-flags.nix +++ b/lib/qemu-flags.nix @@ -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 |