mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
* 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
This commit is contained in:
parent
755c30c7a2
commit
2e38d8cd31
@ -108,7 +108,7 @@ rec {
|
||||
|
||||
virtualisation.qemu.options =
|
||||
lib.flip lib.concatMapStrings interfacesNumbered
|
||||
({ first, second }: qemuNICFlags second first );
|
||||
({ first, second }: qemuNICFlags second first m.second);
|
||||
};
|
||||
}
|
||||
)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user