Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: creating a linux domU



On Sat, Jun 27, 2020 at 05:58:53PM +0100, Iain Hibbert wrote:
So my next step is, trying to create a linux domU (I have NetBSD dom0 and
domU just fine). This is apparently not so easy and I haven't found the
right answer in any wiki tutorials or guide. This is where I'm at

I have halted and removed the iso from the disk spec, but it still boots
into the installer. I guess thats in initrd.gz. I can open a shell from
the installer and poke around in there but no way to get out that I can
see. The only disk partition I can mount is an EFI partition which doesn't
offer much.

You have to get both installed kernel and initrd from your disk image.
In every linux installation you should always make separate /boot of
ext2fs type so you can always work with /boot outside the VM.

If you won't reinstall Linux you can boot into installation image, load
any shell, mount / or /boot and copy installed kernel somewhere via
network.

I have removed the ramdisk spec but the kernel panics because it can't
find a rootfs. I guess that must be normal?

It is okay. Kernel and initrd are always paired.

I can't find any other kernel or ramdisk; surely there would be something
installed on the disk image I think, but can I get into that from NetBSD
as it is ext4?  Have tried fuse-ext2 and e2fsprogs with no luck.

As far as I know there is no straight way to get images from ext4 in NetBSD.
But you have options - load installer and run shell, or run VM in HVM mode,
or you can try any live linux with network to copy both kernel and initrd
from /boot of installed system.

I thought I might be able to install or boot as HVM by adding type = "hvm"
but I just don't understand the error messages. First, I get
 HVM direct kernel boot is not supported by qemu-xen-traditional

HVM boots as a regular BIOS computer so you have to remove any PV params
from config.

so I comment out the kernel line and then I get

 direct boot parameters specified but kernel missing

Try to remove "kernel", "ramdisk" and "extra" parameters from config.

If I instead try to add bootloader = "pygrub" then I get a different
error, which is

 Unable to find partition containing kernel

(though I note that the guide/wiki says pygrub is known to be problematic)

In fact it works pretty well on straightforward configuration and it will
if you will make separate /boot of ext2fs type and no LVM. Not sure about
EFI, but it seems to work too.

Apparently pvgrub is now merged into normal grub but is not enabled in
pkgsrc, is there a known way to build that?

I have some days spent on it with no success even on Linux.

I've read that recent linux doesn't seem to work on NetBSD but I've tried
Centos 6.10 and not really any different. I didn't find a download link
for an older debian.

--
Sincerely yours,
Dima Veselov
Physics R&D Establishment of Saint-Petersburg University


Home | Main Index | Thread Index | Old Index