nixos-test-driver: allow configuration of net frontend and backend
When IPXE tests were added, an option was added for configuring only the frontend, and the backend configuration was dropped entirely. This caused most installer tests to fail.
This commit is contained in:
committed by
Nikolay Amiantov
parent
b93b7d292a
commit
d2144755a4
@@ -31,12 +31,17 @@ sub new {
|
||||
|
||||
if (!$startCommand) {
|
||||
# !!! merge with qemu-vm.nix.
|
||||
my $netArgs = "";
|
||||
$netArgs .= ",romfile=$args->{netRomFile}"
|
||||
if defined $args->{netRomFile};
|
||||
my $netBackend = "-netdev user,id=net0";
|
||||
my $netFrontend = "-device virtio-net-pci,netdev=net0";
|
||||
|
||||
$netBackend .= "," . $args->{netBackendArgs}
|
||||
if defined $args->{netBackendArgs};
|
||||
|
||||
$netFrontend .= "," . $args->{netFrontendArgs}
|
||||
if defined $args->{netFrontendArgs};
|
||||
|
||||
$startCommand =
|
||||
"qemu-kvm -m 384 " .
|
||||
"-device virtio-net-pci,netdev=net0${netArgs} \$QEMU_OPTS ";
|
||||
"qemu-kvm -m 384 $netBackend $netFrontend \$QEMU_OPTS ";
|
||||
|
||||
if (defined $args->{hda}) {
|
||||
if ($args->{hdaInterface} eq "scsi") {
|
||||
|
||||
Reference in New Issue
Block a user