3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/lib/qemu-flags.nix
Eelco Dolstra 77a4004df1 * The installer test lost the QEMU flags to set up the NIC to talk to
the web server somewhere, so put them back in
  (http://hydra.nixos.org/build/424923).

svn path=/nixos/trunk/; revision=22003
2010-05-27 12:20:37 +00:00

16 lines
540 B
Nix

# QEMU flags shared between various Nix expressions.
{
qemuNICFlags = nic: net:
"-net nic,vlan=${toString nic},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
# 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} ";
}