From nobody Sat Jul 8 19:08:51 2023 X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qz0F62rCKz4m76W for ; Sat, 8 Jul 2023 19:09:30 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from webmail5.jnielsen.net (webmail5.jnielsen.net [IPv6:2607:f170:34:11::b0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.freebsdsolutions.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qz0F60JZPz3DJr for ; Sat, 8 Jul 2023 19:09:29 +0000 (UTC) (envelope-from lists@jnielsen.net) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple ([IPv6:2600:381:b110:372:3163:a4e8:c8b6:b73f]) (authenticated bits=0) by webmail5.jnielsen.net (8.17.2/8.17.1) with ESMTPSA id 368J9CcZ005469 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Sat, 8 Jul 2023 13:09:15 -0600 (MDT) (envelope-from lists@jnielsen.net) X-Authentication-Warning: webmail5.jnielsen.net: Host [IPv6:2600:381:b110:372:3163:a4e8:c8b6:b73f] claimed to be smtpclient.apple Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: John Nielsen List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org Mime-Version: 1.0 (1.0) Subject: Re: convert bhyve vm image to something linux lvm/kvm/qemu can use Date: Sat, 8 Jul 2023 13:08:51 -0600 Message-Id: References: Cc: freebsd-virtualization@freebsd.org In-Reply-To: To: void X-Mailer: iPhone Mail (20F75) X-Rspamd-Queue-Id: 4Qz0F60JZPz3DJr X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6364, ipnet:2607:f170:30::/44, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N > On Jul 8, 2023, at 5:00 AM, void 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