Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos 17.09.3023 installation via qemu fails to boot installer (Ubuntu 16.04.03 LTS) #36134

Open
TonyTheLion opened this issue Feb 28, 2018 · 4 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@TonyTheLion
Copy link

Issue description

Running the following:

qemu-system-x86_64 -enable-kvm -m 4G -cdrom ../install/nixos/nixos-17.09.3023.c882c4dd55e-x86_64.iso -initrd ../install/nixos/iso/boot/initrd -kernel ../install/nixos/iso/boot/bzImage -append "console=ttyS0" -boot order=d ./hydra.qcow2 -nographic

results in the following output:

[    0.000000] Linux version 4.9.81 (nixbld@localhost) (gcc version 7.3.0 (GCC) ) #1-NixOS SMP Tue Feb 13 11:36:03 UTC 2018
[    0.000000] Command line: console=ttyS0
[    0.000000] x86/fpu: Legacy x87 FPU detected.
[    0.000000] x86/fpu: Using 'eager' FPU context switches.
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000bffdffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000bffe0000-0x00000000bfffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000013fffffff] usable
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] SMBIOS 2.8 present.
[    0.000000] Hypervisor detected: KVM
[    0.000000] e820: last_pfn = 0x140000 max_arch_pfn = 0x400000000
[    0.000000] x86/PAT: PAT not supported by CPU.
[    0.000000] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[    0.000000] e820: last_pfn = 0xbffe0 max_arch_pfn = 0x400000000
[    0.000000] found SMP MP-table at [mem 0x000f6640-0x000f664f] mapped at [ffff953d400f6640]
[    0.000000] Scanning 1 areas for low memory corruption
[    0.000000] RAMDISK: [mem 0x7f8bd000-0x7fffffff]
[    0.000000] ACPI: Early table checksum verification disabled
[    0.000000] ACPI: RSDP 0x00000000000F6440 000014 (v00 BOCHS )
[    0.000000] ACPI: RSDT 0x00000000BFFE16EE 000034 (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001)
[    0.000000] ACPI: FACP 0x00000000BFFE0C14 000074 (v01 BOCHS  BXPCFACP 00000001 BXPC 00000001)
[    0.000000] ACPI: DSDT 0x00000000BFFE0040 000BD4 (v01 BOCHS  BXPCDSDT 00000001 BXPC 00000001)
[    0.000000] ACPI: FACS 0x00000000BFFE0000 000040
[    0.000000] ACPI: SSDT 0x00000000BFFE0C88 0009B6 (v01 BOCHS  BXPCSSDT 00000001 BXPC 00000001)
[    0.000000] ACPI: APIC 0x00000000BFFE163E 000078 (v01 BOCHS  BXPCAPIC 00000001 BXPC 00000001)
[    0.000000] ACPI: HPET 0x00000000BFFE16B6 000038 (v01 BOCHS  BXPCHPET 00000001 BXPC 00000001)
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at [mem 0x0000000000000000-0x000000013fffffff]
[    0.000000] NODE_DATA(0) allocated [mem 0x13fff9000-0x13fffcfff]
[    0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00
[    0.000000] kvm-clock: cpu 0, msr 1:3fff3001, primary cpu clock
[    0.000000] kvm-clock: using sched offset of 1456040603 cycles
[    0.000000] clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.000000]   DMA32    [mem 0x0000000001000000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000013fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000001000-0x000000000009efff]
[    0.000000]   node   0: [mem 0x0000000000100000-0x00000000bffdffff]
[    0.000000]   node   0: [mem 0x0000000100000000-0x000000013fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000013fffffff]
[    0.000000] ACPI: PM-Timer IO Port: 0x608
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[    0.000000] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[    0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[    0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[    0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[    0.000000] PM: Registered nosave memory: [mem 0xbffe0000-0xbfffffff]
[    0.000000] PM: Registered nosave memory: [mem 0xc0000000-0xfeffbfff]
[    0.000000] PM: Registered nosave memory: [mem 0xfeffc000-0xfeffffff]
[    0.000000] PM: Registered nosave memory: [mem 0xff000000-0xfffbffff]
[    0.000000] PM: Registered nosave memory: [mem 0xfffc0000-0xffffffff]
[    0.000000] e820: [mem 0xc0000000-0xfeffbfff] available for PCI devices
[    0.000000] Booting paravirtualized kernel on KVM
[    0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[    0.000000] setup_percpu: NR_CPUS:384 nr_cpumask_bits:384 nr_cpu_ids:1 nr_node_ids:1
[    0.000000] percpu: Embedded 35 pages/cpu @ffff953e7fc00000 s104088 r8192 d31080 u2097152
[    0.000000] KVM setup async PF for cpu 0
[    0.000000] kvm-stealtime: cpu 0, msr 13fc10140
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 1032041
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: console=ttyS0
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Memory: 4043128K/4193784K available (5604K kernel code, 1009K rwdata, 1872K rodata, 1328K init, 780K bss, 150656K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Kernel/User page tables isolation: enabled
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	Build-time adjustment of leaf fanout to 64.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=384 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=1
[    0.000000] NR_IRQS:24832 nr_irqs:256 16
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [ttyS0] enabled
[    0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
[    0.000000] tsc: Detected 3408.018 MHz processor
[    0.078082] Calibrating delay loop (skipped) preset value.. 6816.03 BogoMIPS (lpj=3408018)
[    0.078739] pid_max: default: 32768 minimum: 301
[    0.079083] ACPI: Core revision 20160831
[    0.079973] ACPI: 2 ACPI AML tables successfully acquired and loaded
[    0.080460] Security Framework initialized
[    0.080813] Yama: becoming mindful.
[    0.081076] AppArmor: AppArmor initialized
[    0.081578] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.082830] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.083522] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.084068] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.084853] mce: CPU supports 10 MCE banks
[    0.085184] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[    0.085573] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
[    0.086042] Spectre V2 : Mitigation: Full generic retpoline
[    0.093895] Freeing SMP alternatives memory: 24K
[    0.097990] ftrace: allocating 23043 entries in 91 pages
[    0.122031] smpboot: Max logical packages: 1
[    0.122497] x2apic enabled
[    0.122937] Switched APIC routing to physical x2apic.
[    0.124142] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.225658] smpboot: CPU0: Intel QEMU Virtual CPU version 2.5+ (family: 0x6, model: 0x6, stepping: 0x3)
[    0.226362] Performance Events: PMU not available due to virtualization, using software events only.
[    0.227321] x86: Booted up 1 node, 1 CPUs
[    0.227615] smpboot: Total of 1 processors activated (6816.03 BogoMIPS)
[    0.228298] devtmpfs: initialized
[    0.228633] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    0.229480] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.229937] pinctrl core: initialized pinctrl subsystem
[    0.230398] NET: Registered protocol family 16
[    0.230807] cpuidle: using governor menu
[    0.231115] ACPI: bus type PCI registered
[    0.231407] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    0.231931] PCI: Using configuration type 1 for base access
[    0.232677] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.233210] ACPI: Added _OSI(Module Device)
[    0.233517] ACPI: Added _OSI(Processor Device)
[    0.233844] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.234185] ACPI: Added _OSI(Processor Aggregator Device)
[    0.235049] ACPI: Interpreter enabled
[    0.235330] ACPI: (supports S0 S3 S4 S5)
[    0.235616] ACPI: Using IOAPIC for interrupt routing
[    0.235989] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.237919] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    0.238372] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI]
[    0.238875] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
[    0.239356] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
[    0.240238] acpiphp: Slot [3] registered
[    0.240537] acpiphp: Slot [4] registered
[    0.240843] acpiphp: Slot [5] registered
[    0.241140] acpiphp: Slot [6] registered
[    0.241437] acpiphp: Slot [7] registered
[    0.241739] acpiphp: Slot [8] registered
[    0.242038] acpiphp: Slot [9] registered
[    0.242335] acpiphp: Slot [10] registered
[    0.242638] acpiphp: Slot [11] registered
[    0.242947] acpiphp: Slot [12] registered
[    0.243252] acpiphp: Slot [13] registered
[    0.243556] acpiphp: Slot [14] registered
[    0.243864] acpiphp: Slot [15] registered
[    0.244168] acpiphp: Slot [16] registered
[    0.244472] acpiphp: Slot [17] registered
[    0.244783] acpiphp: Slot [18] registered
[    0.245088] acpiphp: Slot [19] registered
[    0.245393] acpiphp: Slot [20] registered
[    0.245701] acpiphp: Slot [21] registered
[    0.246004] acpiphp: Slot [22] registered
[    0.246307] acpiphp: Slot [23] registered
[    0.246610] acpiphp: Slot [24] registered
[    0.246917] acpiphp: Slot [25] registered
[    0.247221] acpiphp: Slot [26] registered
[    0.247524] acpiphp: Slot [27] registered
[    0.247830] acpiphp: Slot [28] registered
[    0.248134] acpiphp: Slot [29] registered
[    0.248437] acpiphp: Slot [30] registered
[    0.248748] acpiphp: Slot [31] registered
[    0.249047] PCI host bridge to bus 0000:00
[    0.249346] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
[    0.249838] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
[    0.250328] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[    0.250870] pci_bus 0000:00: root bus resource [mem 0xc0000000-0xfebfffff window]
[    0.251410] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.254357] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io  0x01f0-0x01f7]
[    0.254881] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io  0x03f6]
[    0.255352] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io  0x0170-0x0177]
[    0.255868] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io  0x0376]
[    0.256645] pci 0000:00:01.3: quirk: [io  0x0600-0x063f] claimed by PIIX4 ACPI
[    0.257180] pci 0000:00:01.3: quirk: [io  0x0700-0x070f] claimed by PIIX4 SMB
[    0.266846] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[    0.267358] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[    0.267859] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[    0.268352] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
[    0.268836] ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
[    0.269390] ACPI: Enabled 16 GPEs in block 00 to 0F
[    0.269831] vgaarb: setting as boot device: PCI:0000:00:02.0
[    0.270245] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    0.270836] vgaarb: loaded
[    0.271038] vgaarb: bridge control possible 0000:00:02.0
[    0.271463] PCI: Using ACPI for IRQ routing
[    0.271885] NetLabel: Initializing
[    0.272139] NetLabel:  domain hash size = 128
[    0.272457] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.272917] NetLabel:  unlabeled traffic allowed by default
[    0.273349] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
[    0.274257] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[    0.274653] hpet0: 3 comparators, 64-bit 100.000000 MHz counter
[    0.279182] clocksource: Switched to clocksource kvm-clock
[    0.282775] VFS: Disk quotas dquot_6.6.0
[    0.283081] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.283622] AppArmor: AppArmor Filesystem Enabled
[    0.284019] pnp: PnP ACPI init
[    0.284501] pnp: PnP ACPI: found 6 devices
[    0.290013] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[    0.290703] NET: Registered protocol family 2
[    0.291101] TCP established hash table entries: 32768 (order: 6, 262144 bytes)
[    0.291672] TCP bind hash table entries: 32768 (order: 7, 524288 bytes)
[    0.292194] TCP: Hash tables configured (established 32768 bind 32768)
[    0.292684] UDP hash table entries: 2048 (order: 4, 65536 bytes)
[    0.293188] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
[    0.293680] NET: Registered protocol family 1
[    0.294009] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[    0.294455] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[    0.294888] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[    0.295369] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[    0.296009] Trying to unpack rootfs image as initramfs...
[    0.353189] Freeing initrd memory: 7436K
[    0.353519] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    0.353993] software IO TLB [mem 0xbbfe0000-0xbffe0000] (64MB) mapped at [ffff953dfbfe0000-ffff953dfffdffff]
[    0.354756] Scanning for low memory corruption every 60 seconds
[    0.355326] audit: initializing netlink subsys (disabled)
[    0.355738] audit: type=2000 audit(1519839031.515:1): initialized
[    0.356343] workingset: timestamp_bits=40 max_order=20 bucket_order=0
[    0.357618] zbud: loaded
[    0.358100] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.358666] io scheduler noop registered
[    0.358961] io scheduler deadline registered
[    0.359289] io scheduler cfq registered (default)
[    0.359665] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    0.360080] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[    0.360627] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.383193] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.384827] brd: module loaded
[    0.385175] registered taskstats version 1
[    0.385500] zswap: loaded using pool lzo/zbud
[    0.385859] AppArmor: AppArmor sha1 policy hashing enabled
[    0.386997] Freeing unused kernel memory: 1328K
[    0.387345] Write protecting the kernel read-only data: 8192k
[    0.387852] Freeing unused kernel memory: 524K
[    0.388375] Freeing unused kernel memory: 176K

�[1;32m<<< NixOS Stage 1 >>>�[0m

loading module loop...
[    0.402241] loop: module loaded
loading module vfat...
loading module nls_cp437...
loading module nls_iso8859-1...
loading module fuse...
[    0.413581] fuse init (API version 7.26)
loading module dm_mod...
[    0.418810] device-mapper: ioctl: 4.35.0-ioctl (2016-06-23) initialised: dm-devel@redhat.com
running udev...
[    0.421602] systemd-udevd[111]: starting version 234
[    0.448977] rtc_cmos 00:00: RTC can wake from S4
[    0.453624] rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0
[    0.456121] rtc_cmos 00:00: alarms up to one day, 114 bytes nvram, hpet irqs
[    0.461106] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[    0.462310] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.462679] serio: i8042 AUX port at 0x60,0x64 irq 12
[    0.481989] SCSI subsystem initialized
[    0.485208] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[    0.495774] scsi host0: ata_piix
[    0.496117] scsi host1: ata_piix
[    0.496446] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc040 irq 14
[    0.496951] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc048 irq 15
[    0.658358] ata1.00: ATA-7: QEMU HARDDISK, 2.5+, max UDMA/100
[    0.660507] ata1.00: 10485760 sectors, multi 16: LBA48 
[    0.662937] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
[    0.666017] ata2.00: configured for MWDMA2
[    0.668518] ata1.00: configured for MWDMA2
[    0.670307] scsi 0:0:0:0: Direct-Access     ATA      QEMU HARDDISK    2.5+ PQ: 0 ANSI: 5
[    0.674970] scsi 1:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     2.5+ PQ: 0 ANSI: 5
[    0.696830] sd 0:0:0:0: [sda] 10485760 512-byte logical blocks: (5.37 GB/5.00 GiB)
[    0.698005] sd 0:0:0:0: [sda] Write Protect is off
[    0.698751] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    0.702466] sd 0:0:0:0: [sda] Attached SCSI disk
[    0.703823] sr 1:0:0:0: [sr0] scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
[    0.704666] cdrom: Uniform CD-ROM driver Revision: 3.20
[    0.714024] random: fast init done
kbd_mode: KDSKBMODE: Inappropriate ioctl for device
�%Gstarting device mapper and LVM...
mounting tmpfs on /...
waiting for device /dev/root to appear...[    1.375388] tsc: Refined TSC clocksource calibration: 3407.981 MHz
[    1.377727] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fc2208fe, max_idle_ns: 440795218440 ns
.....[    6.187004] random: crng init done
...............
Timed out waiting for device /dev/root, trying to mount anyway.
mounting /dev/root on /iso...
mount: mounting /dev/root on /mnt-root/iso failed: No such file or directory

An error occurred in stage 1 of the boot process, which must mount the
root filesystem on `/mnt-root' and then start stage 2.  Press one
of the following keys:

  r) to reboot immediately
  *) to ignore the error and continue

Steps to reproduce

  1. mount the iso
    sudo mount -o loop <nixos.iso> iso

  2. run the qemu command as above, making sure you point the 'initrd' and the 'bzImage` in the iso\boot\ dir in the command correctly.

This is running it on an Ubuntu 16.04.3 LTS server edition.

@ianweatherhogg
Copy link

Hi,

I have nixos working via QEMU/libvirt on archlinux. Looking at my command history...

Create image.

qemu-img create -f qcow2 /common/Containers/pool/nixos.qcow2 12G

Install

qemu-system-x86_64 -m 2056 -hda /common/Containers/pool/nixos.qcow2 -cdrom /data/iso/nixos-minimal-17.09.2853.b222a0713f4-x86_64-linux.iso -boot d -vnc :1 -enable-kvm

Note the -vnc flag to view via vncviewer.

Install via your own method but I did ...

Via vncviwer I used this to bootstrap my installation. I know it's tailored for Vultr install (I have a Vulr account and used this script to install nixos successfully) but found it worked with QEMU. I think you need to tweak /dev/vda (and reflect this in configuration.nixat boot.load.grub.device) and naturally use your own generated keys. Tinker with configuration.nix if need be.

Powerdown and boot into fresh install.

qemu-system-x86_64 -m 2056 -hda /common/Containers/pool/nixos.qcow2 -vnc :1 -enable-kvm

This method only allows login over ssh and I couldn't identify the ip address of the instance/guest. This can be rectified by importing into libvirt and following the dns tweak by modifying /etc/nsswitch.conf as described on the archlinux wiki. (libvirt has been added).

hosts: files libvirt dns myhostname

This allows guest images to be referenced by their name in lieu of their ip addresses.

Importing into libvirt.

virt-install  --name nixos --ram 2048 --vcpus="1,maxvcpus=2" --connect qemu:///system --disk path="/common/Containers/pool/nixos.qcow2",device=disk,bus=virtio,format=qcow2 --network="network=default"  --os-type linux  --os-variant generic  --noautoconsole --console pty,target_type=serial  --graphics vnc,listen=0.0.0.0 --import

Start via virsh

virsh -c qemu:///system start nixos

ssh in.

ssh ian@nixos

@CMCDragonkai
Copy link
Member

I have this problem occurring as well.

The system boots up with QEMU easily when I use -vga std. But I try to use -nographic with the serial console redirected I end up with:

kbd_mode: KDSKBMODE: Inappropriate ioctl for device
starting device mapper and LVM...
[    1.799591] random: lvm: uninitialized urandom read (4 bytes read)
mounting tmpfs on /...
mounting ../nix-store.squashfs on /nix/.ro-store...
[    1.862079] squashfs: version 4.0 (2009/01/31) Phillip Lougher
mounting tmpfs on /nix/.rw-store...
mounting unionfs on /nix/store...
stage 2 init script (/mnt-root//init) not found

Pretty strange error.

@stale
Copy link

stale bot commented Jul 21, 2020

Hello, I'm a bot and I thank you in the name of the community for opening this issue.

To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.

If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.

Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 21, 2020
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nixos-vm-under-freebsd-bhyve-failing/24964/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

4 participants