2010-05-27 14:20:37 +02:00
|
|
|
# QEMU flags shared between various Nix expressions.
|
|
|
|
|
|
|
|
{
|
|
|
|
|
2010-12-07 01:44:29 +01:00
|
|
|
qemuNICFlags = nic: net: machine:
|
|
|
|
"-net nic,vlan=${toString nic},macaddr=52:54:00:12:${toString net}:${toString machine},model=virtio " +
|
2010-05-27 14:20:37 +02:00
|
|
|
# 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
|
|
|
|
# sets this variable to prevent collisions between parallel
|
|
|
|
# builds.
|
|
|
|
"-net socket,vlan=${toString nic},mcast=" +
|
|
|
|
"\${QEMU_MCAST_ADDR_${toString net}:-232.0.1.${toString net}:1234} ";
|
|
|
|
|
|
|
|
}
|