* 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
This commit is contained in:
parent
894435ce5e
commit
77a4004df1
15
lib/qemu-flags.nix
Normal file
15
lib/qemu-flags.nix
Normal file
@ -0,0 +1,15 @@
|
||||
# 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} ";
|
||||
|
||||
}
|
@ -34,6 +34,7 @@ sub new {
|
||||
if defined $args->{hda};
|
||||
$startCommand .= "-cdrom $args->{cdrom} "
|
||||
if defined $args->{cdrom};
|
||||
$startCommand .= $args->{qemuFlags} || "";
|
||||
}
|
||||
|
||||
my $name = $args->{name};
|
||||
|
@ -1,6 +1,7 @@
|
||||
{ pkgs, nixpkgs, system, ... }:
|
||||
|
||||
with pkgs.lib;
|
||||
with import ../lib/qemu-flags.nix;
|
||||
|
||||
let
|
||||
|
||||
@ -104,7 +105,7 @@ let
|
||||
''
|
||||
createDisk("harddisk", 4 * 1024);
|
||||
|
||||
my $machine = Machine->new({ hda => "harddisk", cdrom => glob("${iso}/iso/*.iso") });
|
||||
my $machine = Machine->new({ hda => "harddisk", cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '${qemuNICFlags 1 1}' });
|
||||
$machine->start;
|
||||
|
||||
${optionalString testChannel ''
|
||||
|
Loading…
Reference in New Issue
Block a user