On Mon, 11 Dec 2023 at 05:51, Richard W.M. Jones <rjones(a)redhat.com> wrote:
On Sun, Dec 10, 2023 at 09:42:04PM -0500, Stefan Hajnoczi wrote:
> Hi,
> virt-builder --update debian-12 fails with:
> Setting up grub-pc (2.06-13+deb12u1) ...
> grub-pc: Running grub-install ...
> /dev/vda does not exist, so cannot grub-install to it!
> You must correct your GRUB install devices before proceeding:
>
> DEBIAN_FRONTEND=dialog dpkg --configure grub-pc
> dpkg --configure -a
> dpkg: error processing package grub-pc (--configure):
> installed grub-pc package post-installation script subprocess
> returned error exit status 1
>
> Any idea why /dev/vda isn't available to grub-install in virt-builder?
>
> I guess there might be some special guest device configuration for the
> guestfs appliance that runs virt-builder steps, causing the device to
> appear as something other than /dev/vda.
virt-builder templates are generated using whatever default disk
interface virt-install chooses:
https://github.com/rwmjones/guestfs-tools/blob/master/builder/templates/d...
which is probably virtio-blk.
However the libguestfs appliance, where virt-builder does its updates
etc, uses virtio-scsi.
TBH I don't think this is solvable from virt-builder. I would either
"hold" the grub-pc package (see below), or do the update as a
firstboot operation, or try to get Debian to fix it in the grub-pc
package, or maybe we could switch the template to use UEFI in future.
I see. It would be nice to add this to the debian template's "notes"
field to let users know.
Thanks,
Stefan