Date: Sat, 8 Jul 2023 13:08:51 -0600 From: John Nielsen <lists@jnielsen.net> To: void <void@f-m.fm> Cc: freebsd-virtualization@freebsd.org Subject: Re: convert bhyve vm image to something linux lvm/kvm/qemu can use Message-ID: <ADE05824-E6B0-4E01-B149-3E65087145BB@jnielsen.net> In-Reply-To: <ZKlBoqY3JLrcrH-U@int21h> References: <ZKlBoqY3JLrcrH-U@int21h>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Jul 8, 2023, at 5:00 AM, void <void@f-m.fm> wrote: >=20 > =EF=BB=BFHello list, >=20 > I need to convert a bhyve filebacked (so: .img) freebsd instance to > something a linux host running lvm+kvm+qemu would understand. >=20 > What format do I need to convert it to? Qemu can handle raw images just fine. If you want something more space frien= dly with more features you could do qcow2. (Use qemu-img to convert.) > Do I need to worry about the boot partition of the freebsd instance? If the VM is set up to boot with UEFI then the partitioning should be fine w= ith no changes, just make sure you use an appropriate UEFI boot firmware wit= h qemu (libvirtd makes this pretty straightforward). If you are using bhyve-load or similar to load the kernel from the bhyve hyp= ervisor you=E2=80=99ll need to adapt to a normal boot (could be either BIOS o= r UEFI, IMO UEFI is easier and it=E2=80=99s much more modern). If doing the f= ormer then you will likely need a FreeBSD-boot partition and to make sure al= l the boot blocks are in the right places (see the man page for gpart=E2=80=99= s =E2=80=9Cbootstrap=E2=80=9D command). If doing the latter you=E2=80=99ll n= eed an EFI MSDOS partition but you can just copy the EFI boot loader to it. S= ee the handbook. Also keep in mind that EFI doesn=E2=80=99t have to be the f= irst partition so if you=E2=80=99re out of space you can just extend the dis= k and add it at the end. JN
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ADE05824-E6B0-4E01-B149-3E65087145BB>