forked from mirrors/nixpkgs
* Add virtio_console to the CD because the backdoor requires it.
* The booted CD no longer requires "-net user". svn path=/nixos/trunk/; revision=26427
This commit is contained in:
parent
6c55079ab0
commit
c430bf5cc3
|
@ -28,7 +28,7 @@ sub new {
|
|||
# !!! merge with qemu-vm.nix.
|
||||
$startCommand =
|
||||
"qemu-system-x86_64 -m 384 " .
|
||||
"-net nic,model=virtio -net user,\$QEMU_NET_OPTS \$QEMU_OPTS ";
|
||||
"-net nic,model=virtio \$QEMU_OPTS ";
|
||||
$startCommand .= "-drive file=" . Cwd::abs_path($args->{hda}) . ",if=virtio,boot=on,werror=report "
|
||||
if defined $args->{hda};
|
||||
$startCommand .= "-cdrom $args->{cdrom} "
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
"ohci1394" "sbp2"
|
||||
|
||||
# Virtio (QEMU, KVM etc.) support.
|
||||
"virtio_net" "virtio_pci" "virtio_blk" "virtio_balloon"
|
||||
"virtio_net" "virtio_pci" "virtio_blk" "virtio_balloon" "virtio_console"
|
||||
|
||||
# Add vfat to enable people to copy the contents of the CD to a
|
||||
# bootable USB stick.
|
||||
|
|
|
@ -41,7 +41,7 @@ let
|
|||
boot.loader.grub.version = 2;
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
boot.loader.grub.extraConfig = "serial; terminal_output.serial";
|
||||
boot.initrd.kernelModules = [ "ext3" ];
|
||||
boot.initrd.kernelModules = [ "ext3" "virtio_console" ];
|
||||
|
||||
fileSystems = [ ${fileSystems} ];
|
||||
swapDevices = [ { label = "swap"; } ];
|
||||
|
@ -114,10 +114,7 @@ let
|
|||
$machine->waitForJob("tty1");
|
||||
$machine->waitForJob("rogue");
|
||||
$machine->waitForJob("nixos-manual");
|
||||
|
||||
# Make sure that we don't try to download anything.
|
||||
$machine->stopJob("dhclient");
|
||||
$machine->mustSucceed("rm /etc/resolv.conf");
|
||||
$machine->waitForJob("dhclient");
|
||||
|
||||
${optionalString testChannel ''
|
||||
# Allow the machine to talk to the fake nixos.org.
|
||||
|
@ -183,7 +180,7 @@ let
|
|||
# And just to be sure, check that the machine still boots after
|
||||
# "nixos-rebuild switch".
|
||||
my $machine = createMachine({ hda => "harddisk" });
|
||||
$machine->mustSucceed("echo hello");
|
||||
$machine->waitForJob("network-interfaces");
|
||||
$machine->shutdown;
|
||||
'';
|
||||
|
||||
|
@ -308,10 +305,6 @@ in {
|
|||
my $machine = createMachine({ cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '-m 1024' });
|
||||
$machine->start;
|
||||
|
||||
# Make sure that we don't try to download anything.
|
||||
$machine->stopJob("dhclient");
|
||||
$machine->mustSucceed("rm /etc/resolv.conf");
|
||||
|
||||
# Enable sshd service.
|
||||
$machine->mustSucceed(
|
||||
"sed -i 's,^}\$,jobs.sshd.startOn = pkgs.lib.mkOverride 0 \"startup\"; },' /etc/nixos/configuration.nix"
|
||||
|
|
Loading…
Reference in a new issue