Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jan 2021 07:57:07 -0800
From:      Chuck Tuffli <chuck@tuffli.net>
To:        John Kennedy <warlock@phouka.net>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: RHEL virtualization
Message-ID:  <CAM0tzX3ZBeqHimLyJQNgLWyuPcUzMUzeB3MkqGSzrr6Ut%2B%2BLSw@mail.gmail.com>
In-Reply-To: <YAyt7cRRvm9Q4RK0@phouka1.phouka.net>
References:  <YAyt7cRRvm9Q4RK0@phouka1.phouka.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 23, 2021 at 3:16 PM John Kennedy <warlock@phouka.net> wrote:
...
> That being said, RHEL on bhyve has been a pain to figure out.  The best I've
> done so far is using sysutils/grub2-bhyve to set up the boot CD, using
> BHYVE_UEFI.fd as UEFI firmware (sysutils/bhyve-firmware I think) and then
> getting at the console via net/tigervnc-viewer.
>
> Currently I'm fighting grub-bhyve's issue finding the kernel to load (if I'm
> finding the right problem reports, it doesn't seem to like modern XFS or
> ext4 partitions).  I couldn't get net/ipxe to PXE boot anything, and I din't
> manage to get very far with sysutils/uefi-edk2-bhyve.  And of course some
> of these are flagged with python2.7 isses.

Hi

I ran into a similar situation (RHELL VM's in bhyve) and created a
version of grub-bhyve that knows how to find the grub.cfg and/or
syslinux.conf files in a VM's disk image. Because of this, you don't
have to maintain a copy of the grub configuration just for grub-bhyve.
I implemented this on the latest version of grub which includes XFS
and other goodies. The fine print:
 - The syntax is slightly different. To load an image use
        grub-bhyve --disk=/path/to/vm/disk.img --vm=vm_name
    note that the root, device-map, and directory options are no
longer necessary
- The project is at the "it works for me" stage and hasn't received
much usage aside from myself. That said, feedback is welcome.
 - It builds on FreeBSD 12.x but 13.x has an issue

Code is here: https://gitlab.com/ctuffli/grub

To build:
    $ env PYTHON=python3.7 ./bootstrap
    $ env MAKE=gmake ./configure --with-platform=bhyve
    $ gmake

The resulting binary, `grub-bhyve`, will be in the `grub-core/`
directory. If you have success or troubles with it, please let me
know.

--chuck



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM0tzX3ZBeqHimLyJQNgLWyuPcUzMUzeB3MkqGSzrr6Ut%2B%2BLSw>