我尝试使用 xen 作为虚拟机管理程序而不是 kvm + libvirt + virt-manager 在我安装了 Devuan 5 的 ARM Chromebook 上启动 FreeBSD,因为 Stefano 说:
Libvirt + virt-manager with the xen accelerator might work on the ARM Chromebook.
That's because as far as I know Xen integration in libvirt is done via linking to
libxl directly and libxl is supported and working on ARM.
不幸的是,有些东西无法正常工作。我所做的就是在 xen 中重新启动机器,启用 libvirtd & 和 virtlogd & 以及 virt-manager &,但这就是发生的事情:
Traceback (most recent call last):
File "/usr/lib/xen-4.17/bin/pygrub", line 884, in <module>
raise RuntimeError("Unable to find partition containing kernel")
RuntimeError: Unable to find partition containing kernel
我认为它无法识别 FreeBSD 文件系统结构及其内核。 Libvirt 似乎被编程为引导 Linux,而不是 FreeBSD。事实上,我做了反证。
根据这篇文章:
https://blog.roberthallam.org/2020/05/solving-unable-to-find-partition-containing-kernel/
我在名为“debian.img”的映像文件的启动目录中创建了一个名为 menu.lst 的文件,并在其中添加了以下内容:
default 0
timeout 10
title Debian
root (hd0,1)
kernel /boot/vmlinux-6.1.59-stb-xen-cbe+ root=/dev/xvda
initrd /boot/initrd.img-6.1.59-stb-xen-cbe+
我再次尝试使用 virt-manager 启动映像。它再次给出了这个错误:
error :libxlDomainStartPerform:1256 : internal error :
libxenlight failed to create new domain 'debian12'
但查看日志文件内部,我发现了这个有趣的情况;
Using <class 'grub.GrubConf.GrubConfigFile'> to parse /boot/grub/menu.lst
(B )0 [1;24r [m [?7h [?1h = [H [J [?1h = [1B pyGRUB version 0.6
[1B [0m
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
[1B [0m x [0;7m Debian 12
[m [0m x
[1B [0m x [72C [0m x
[1B [0m x [72C [0m x
[1B [0m x [72C [0m x
[1B [0m x [72C [0m x
[1B [0m x [72C [0m x
[1B [0m x [72C [0m x
[1B [0m x [72C [0m x
[1B [0m
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
[1B [70D [0m Use the ↑ and ↓ keys to select which entry is highlighted. [1B
[58DPress enter to boot the selected OS, 'e' to edit the [1B [52Dcommands
before booting, 'a' to modify the kernel arguments [1B [59Dbefore booting,
or 'c' for a command line. [12A [26C [17B [68DWill boot selected entry in
10 seconds [?1h =
[J [17A [73C [17B [68DWill boot selected entry in 9 seconds [?1h =
[J [17A [73C [17B [68DWill boot selected entry in 8 seconds [?1h =
[J [17A [73C [17B [68DWill boot selected entry in 7 seconds [?1h =
[J [17A [73C [17B [68DWill boot selected entry in 6 seconds [?1h =
[J [17A [73C [17B [68DWill boot selected entry in 5 seconds [?1h =
[J [17A [73C [17B [68DWill boot selected entry in 4 seconds [?1h =
[J [17A [73C [17B [68DWill boot selected entry in 3 seconds [?1h =
[J [17A [73C [17B [68DWill boot selected entry in 2 seconds [?1h =
[J [17A [73C [17B [68DWill boot selected entry in 1 seconds [?1l >
[24;1H [?1l >
所以,它似乎尝试启动,但由于未知原因,它仍然给出错误。
无论如何:我的 xen 设置不再被破坏;使用Libvirt Linux好像可以启动,FreeBSD不行。