You are not logged in.

#1 2019-01-14 02:09:07

Chessmaster942
Member
Registered: 2012-10-29
Posts: 31

Cannot Boot OVMF Bios with Xen

Alright, so I'm trying to use Xen to manage a set of VMs that I'll be using on my personal computer.
Additionally, I would like try to make each of the domUs (guests) self-standing. I'm giving them access to parts of entire disks with the intent that if I wanted to, I either could boot them directly, or virtualize several at a time.

I've had quite a bit of experience with Xen int he past with creating well performing VMs, but I've never quite tried anything of the nature of an OS that is both a HVM domU or native OS depending on boot.
So it goes to be said that for simplicity in the past I've always used seabios for booting. This time around I need to use OVMF to take advantage of UEFI booting since that's how my OS's will normally boot  when not a domU.

I've made a fresh install of arch, and I've got xen built from the AUR, with the ovmf dependency installed before building the package, and unfortunately, I cannot get _anything_ to boot properly -- every domU I start just dies almost immediately.
Furthermore, a brief test shows that QEMU will use ovmf successfully, so I'm not sure it's a problem with ovmf itself. My guess is that xen cannot find it, or is looking at a wrong version, or ...

Here's the configuration file for my domU:

name = 'test'
type = 'hvm'
memory = 1024
vcpus = 1
disk = ['/dev/sdb,raw,sda,rw']
vif = ['bridge=br0']
vnc = 1
vnclisten = '0.0.0.0'
vncdisplay = 1
bios = 'ovmf'
bios_override = '/usr/share/ovmf/x64/OVMF_CODE.fd'    # Added to try to be explicit, same behavior with or without

on_shutdown = 'destroy'
on_reboot = 'destroy'    # With this option commented out, domU's reboot forever...
on_crash = 'destroy'     # Since this option doesn't have an effect, they're actually closing cleanly?

# Straight from the xen wiki...
device_model_args_hvm = [
  '-chardev', 'file,id=debugcon,path=/var/log/xen/ovmf.log,',
  '-device', 'isa-debugcon,iobase=0x402,chardev=debugcon',
]

Additionally, the log file I specify in the 'device_model_args_hvm' part to debug ovmf is created, but never populated...

Here's the log from "qemu-dm-test.log"

VNC server running on 0.0.0.0:5901
qemu-system-i386: terminating on signal 1 from pid 3027 (xl)

...that's all she wrote. And according to the wiki using a 32-bit version of QEMU is normal.

And here's the log from "xl-test.log"

Waiting for domain test (domid 9) to die [pid 3027]
Domain 9 has shut down, reason code 1 0x1
Action for shutdown reason code 1 is restart
Domain 9 needs to be cleaned up: destroying the domain
Done. Rebooting now

(Okay, so we now know that it's definitely rebooting, not crashing)

And, finally, here's `xl info'

host                   : OVERLORD-XEN
release                : 4.20.1-arch1-1-ARCH
version                : #1 SMP PREEMPT Wed Jan 9 20:25:43 UTC 2019
machine                : x86_64
nr_cpus                : 16
max_cpu_id             : 15
nr_nodes               : 1
cores_per_socket       : 8
threads_per_core       : 2
cpu_mhz                : 3194.160
hw_caps                : 178bf3ff:f6d8320b:2e500800:244033ff:0000000f:209c01a9:00000000:00000500
virt_caps              : hvm hvm_directio
total_memory           : 32688
free_memory            : 1035
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 11
xen_extra              : .0
xen_version            : 4.11.0
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : 
xen_commandline        : console=vga iommu=force:true noreboot=true reboot=no vga=current ucode=scan
cc_compiler            : gcc (GCC) 8.2.1 20181127
cc_compile_by          : jwargo
cc_compile_domain      : 
cc_compile_date        : Sun Jan 13 17:57:10 CST 2019
build_id               : 3b34b9a87e996ce370b32b63ad59b69c
xend_config_format     : 4

I'm going to keep looking into this, but I'd love another pair of eyes, and I'd really love anyone who can point me in the right direction...

Last edited by Chessmaster942 (2019-01-14 02:11:04)

Offline

#2 2019-01-14 02:18:39

Chessmaster942
Member
Registered: 2012-10-29
Posts: 31

Re: Cannot Boot OVMF Bios with Xen

It's also probably worth noting that getting rid of the 'bios' and 'bios_override' directives in the domU configuration results in a perfectly working BIOS system, so the problem is definitely specific to ovmf...

Offline

#3 2019-01-14 03:14:44

Chessmaster942
Member
Registered: 2012-10-29
Posts: 31

Re: Cannot Boot OVMF Bios with Xen

Oh -- I almost forgot -- here's my Xen EFI configuration

[global]
default=xen

[xen]
options=console=vga iommu=force:true noreboot=true reboot=no vga=current ucode=scan
kernel=vmlinuz-linux root=PARTUUID=02557654-3fa6-42f9-b178-8633ea099838 rw add_efi_memmap
ramdisk=initramfs-linux.img

Offline

#4 2019-01-14 03:21:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Cannot Boot OVMF Bios with Xen

Please use the edit button: there is no need to keep bumping the thread.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2019-04-19 19:35:34

FallenSnow
Member
Registered: 2014-04-07
Posts: 39

Re: Cannot Boot OVMF Bios with Xen

Sorry for the necrobump.

Having the same issue. Chessmaster942, did you ever find a solution?

Offline

Board footer

Powered by FluxBB