Mario Marietto <[email protected]> writes:

> Hello.
>
> Premising that I'm using this openbsd version :
>
> marietto# uname -a
>
> OpenBSD marietto.homenet.telecomitalia.it 7.0 GENERIC.MP#211 amd64
>
>
> I'm trying to install the NixOS Linux distribution as a virtual machine
> guest hosted on OpenBSD VMM hypervisor. Below there are the commands that I
> have issued :

What Linux kernel does this guest use? I ask not because I want to
support Linux specifically, but because of my next question below.

>
>
> 1) vmctl create -s 50G linux.qcow2
>
> 2) nano /etc/vm.conf
>
> vm "linux" {
> memory 4G
> disk "/home/marietto/Desktop/virt/linux.qcow2"
> cdrom
> "/home/marietto/Desktop/virt/nixos-plasma5-21.11.334934.8a053bc2255-x86_64-linux.iso"
> interface { lladdr "aa:bb:cc:dd:ee:ff" switch "uplink" }
> owner marietto
> disable
> }
>
> switch "uplink" {
> interface bridge0
> }
>
> 3) echo "add em0" > /etc/hostname.bridge0 sh /etc/netstart bridge0
> 4) rcctl enable vmd
> 5) rcctl start vmd
> 6) vmctl start -c linux
>
>
> and boom,this is what happens :
>
>
> [ 0.010318] ACPI BIOS Error (bug): A valid RSDP was not found
> (20200925/tbxfroot-210)
> [ 5.430342] mce: Unable to init MCE device (rc: -5)
>
> <<< NixOS Stage 1 >>>
>
> loading module loop...
> loading module overlay...
> loading module vfat...
> loading module nls_cp437...
> loading module nls_iso8859-1...
> loading module dm_mod...
> running udev...
> Starting version 249.7
> kbd_mode: KDSKBMODE: Inappropriate ioctl for device
> starting device mapper and LVM...
> mounting tmpfs on /...
> waiting for device /dev/root to appear.....................
>
> 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:
>
> i) to launch an interactive shell
> f) to start an interactive shell having pid 1 (needed if you want to start
> stage 2's init manually)
> r) to reboot immediately
> *) to ignore the error and continue
>
> this is the reason of the failure :
>
> Asynchronous wait on fence :Xorg[80912]:c0e0 timed out
> (hint:0xffffffff814b1810s)
> Asynchronous wait on fence :Xorg[80912]:c1ca timed out
> (hint:0xffffffff814b1810s)
> Asynchronous wait on fence :Xorg[80912]:c20c timed out
> (hint:0xffffffff814b1810s)
> Asynchronous wait on fence :Xorg[80912]:c870 timed out
> (hint:0xffffffff814b1810s)
> Asynchronous wait on fence :Xorg[80912]:c8d0 timed out
> (hint:0xffffffff814b1810s)
> Asynchronous wait on fence :Xorg[80912]:cca8 timed out
> (hint:0xffffffff814b1810s)
> Asynchronous wait on fence :Xorg[80912]:cd78 timed out
> (hint:0xffffffff814b1810s)

No idea what those are.

> vmx_fault_page: uvm_fault returns 14, GPA=0xfe001818, rip=0xffffffffc0d6bb96
>

That physical address looks to me like it's related to an mmio address
for the Intel power management controller on newer cpus. It's a known
issue [1] that vmm(4) and vmd(8) do not currently support emulating
devices that require mmio.

You can try using an older Linux kernel version or building a custom one
that doesn't build in support for the intel_pmc driver. The driver
doesn't offer any possible way I know of to disable it via boot args I'm
afraid. Maybe Linux has something similar to our 'boot -c'? No idea.

I hear nixos let's you build custom images/isos...I'd say go that route.

> you can find the full log here :
>
> https://paste.ubuntu.com/p/dRcfXxYBGY/
>
> I've opened a thread on Reddit and I've got some support,but we haven't
> been able to fix the error. You can find it here :
>
> https://www.reddit.com/r/openbsd/comments/rt5yvq/trying_to_run_a_nixos_vm_as_an_openbsd_guest_for/

I started some support for mmio at a hackathon last year, but it's been
perpetually trumped by other priorities related to VMX stability
stuff. I think I have those squashed now so maybe 2022 will be a
different story.

-dv

[1] https://marc.info/?l=openbsd-misc&m=161687980909035&w=2

Reply via email to