* 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.
|
# !!! merge with qemu-vm.nix.
|
||||||
$startCommand =
|
$startCommand =
|
||||||
"qemu-system-x86_64 -m 384 " .
|
"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 "
|
$startCommand .= "-drive file=" . Cwd::abs_path($args->{hda}) . ",if=virtio,boot=on,werror=report "
|
||||||
if defined $args->{hda};
|
if defined $args->{hda};
|
||||||
$startCommand .= "-cdrom $args->{cdrom} "
|
$startCommand .= "-cdrom $args->{cdrom} "
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
"ohci1394" "sbp2"
|
"ohci1394" "sbp2"
|
||||||
|
|
||||||
# Virtio (QEMU, KVM etc.) support.
|
# 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
|
# Add vfat to enable people to copy the contents of the CD to a
|
||||||
# bootable USB stick.
|
# bootable USB stick.
|
||||||
|
@ -41,7 +41,7 @@ let
|
|||||||
boot.loader.grub.version = 2;
|
boot.loader.grub.version = 2;
|
||||||
boot.loader.grub.device = "/dev/vda";
|
boot.loader.grub.device = "/dev/vda";
|
||||||
boot.loader.grub.extraConfig = "serial; terminal_output.serial";
|
boot.loader.grub.extraConfig = "serial; terminal_output.serial";
|
||||||
boot.initrd.kernelModules = [ "ext3" ];
|
boot.initrd.kernelModules = [ "ext3" "virtio_console" ];
|
||||||
|
|
||||||
fileSystems = [ ${fileSystems} ];
|
fileSystems = [ ${fileSystems} ];
|
||||||
swapDevices = [ { label = "swap"; } ];
|
swapDevices = [ { label = "swap"; } ];
|
||||||
@ -114,10 +114,7 @@ let
|
|||||||
$machine->waitForJob("tty1");
|
$machine->waitForJob("tty1");
|
||||||
$machine->waitForJob("rogue");
|
$machine->waitForJob("rogue");
|
||||||
$machine->waitForJob("nixos-manual");
|
$machine->waitForJob("nixos-manual");
|
||||||
|
$machine->waitForJob("dhclient");
|
||||||
# Make sure that we don't try to download anything.
|
|
||||||
$machine->stopJob("dhclient");
|
|
||||||
$machine->mustSucceed("rm /etc/resolv.conf");
|
|
||||||
|
|
||||||
${optionalString testChannel ''
|
${optionalString testChannel ''
|
||||||
# Allow the machine to talk to the fake nixos.org.
|
# 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
|
# And just to be sure, check that the machine still boots after
|
||||||
# "nixos-rebuild switch".
|
# "nixos-rebuild switch".
|
||||||
my $machine = createMachine({ hda => "harddisk" });
|
my $machine = createMachine({ hda => "harddisk" });
|
||||||
$machine->mustSucceed("echo hello");
|
$machine->waitForJob("network-interfaces");
|
||||||
$machine->shutdown;
|
$machine->shutdown;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -308,10 +305,6 @@ in {
|
|||||||
my $machine = createMachine({ cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '-m 1024' });
|
my $machine = createMachine({ cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '-m 1024' });
|
||||||
$machine->start;
|
$machine->start;
|
||||||
|
|
||||||
# Make sure that we don't try to download anything.
|
|
||||||
$machine->stopJob("dhclient");
|
|
||||||
$machine->mustSucceed("rm /etc/resolv.conf");
|
|
||||||
|
|
||||||
# Enable sshd service.
|
# Enable sshd service.
|
||||||
$machine->mustSucceed(
|
$machine->mustSucceed(
|
||||||
"sed -i 's,^}\$,jobs.sshd.startOn = pkgs.lib.mkOverride 0 \"startup\"; },' /etc/nixos/configuration.nix"
|
"sed -i 's,^}\$,jobs.sshd.startOn = pkgs.lib.mkOverride 0 \"startup\"; },' /etc/nixos/configuration.nix"
|
||||||
|
Loading…
Reference in New Issue
Block a user