summary refs log tree commit diff
path: root/lib/qemu-flags.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2011-01-12 18:47:23 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2011-01-12 18:47:23 +0000
commitb3dbcbe249480f59fde6c118fa161eb6af53664d (patch)
tree0de3c6951da62182f7ebc4e50cc05b569bddf16b /lib/qemu-flags.nix
parentfd4885528445b94aea7dd15a09bee85c2bc1defe (diff)
downloadnixpkgs-b3dbcbe249480f59fde6c118fa161eb6af53664d.tar
nixpkgs-b3dbcbe249480f59fde6c118fa161eb6af53664d.tar.gz
nixpkgs-b3dbcbe249480f59fde6c118fa161eb6af53664d.tar.bz2
nixpkgs-b3dbcbe249480f59fde6c118fa161eb6af53664d.tar.lz
nixpkgs-b3dbcbe249480f59fde6c118fa161eb6af53664d.tar.xz
nixpkgs-b3dbcbe249480f59fde6c118fa161eb6af53664d.tar.zst
nixpkgs-b3dbcbe249480f59fde6c118fa161eb6af53664d.zip
* Use vde_switch instead of QEMU's multicast feature to tie QEMU VMs
  together into virtual networks.  This has several advantages:

  - It's more secure because the QEMU instances use Unix domain
    sockets to talk to the switch.

  - It doesn't depend on the host's network interfaces.  (Local
    multicast fails if there is no default gateway, so for instance it
    fails if a laptop is not connected to any network.)

  - VDE devices can be connected together to form arbitrary network
    topologies.

  - VDE has a "wirefilter" tool to emulate delays and packet loss,
    which are useful for network testing.

svn path=/nixos/trunk/; revision=25526
Diffstat (limited to 'lib/qemu-flags.nix')
-rw-r--r--lib/qemu-flags.nix10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/qemu-flags.nix b/lib/qemu-flags.nix
index 7831c8f149a..5d8e898c534 100644
--- a/lib/qemu-flags.nix
+++ b/lib/qemu-flags.nix
@@ -4,12 +4,6 @@
 
   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
-    # 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} ";
-    
+    "-net vde,vlan=${toString nic},sock=$QEMU_VDE_SOCKET_${toString net} ";
+
 }