~alpine/users

4 2

Unable to create virtual machines with LXD

Details
Message ID
<CAMYYbY5OEFPMeOT=tOS0VyMFM_xOzWTRxDcJ2AhpPH+_u0L_uQ@mail.gmail.com>
DKIM signature
missing
Download raw message
Hello,

when trying to create new LXD instance as a virtual machine, the
creation fails with following message:

~# lxc init images:alpine/3.17 alpine-test --vm
Creating alpine-test
Error: Failed instance creation: Failed creating instance record:
Instance type "virtual-machine" is not supported on this server: QEMU
failed to run feature checks

And in the logs these two messages sheds a bit more light to it:

level=error msg="Unable to run feature checks during QEMU
initialization: QEMU premature exit: exit status 1 (qemu: could not
load PC BIOS '/usr/share/OVMF/OVMF_CODE.fd')"
level=warning msg="Instance type not operational" driver=qemu
err="QEMU failed to run feature checks" type=virtual-machine

I went to check sources (see [1], function checkFeatures(hostArch int,
qemuPath string)) and they seems to run qemu-system-x86_64 like this:

~# qemu-system-x86_64 -S -nographic -nodefaults -no-user-config
-machine q35 -bios /usr/share/OVMF/OVMF_CODE.fd
qemu: could not load PC BIOS '/usr/share/OVMF/OVMF_CODE.fd'

Is this Alpine's bug? Or LXD upstream bug? I'm trying to run it on
"Alpine Linux v3.17".

Best Regards,
Martin

[1] - https://github.com/lxc/lxd/blob/master/lxd/instance/drivers/driver_qemu.go
--
Martin Rusko | martin.rusko@gmail.com | +46 768 598091 | +421 903 246 698
Details
Message ID
<CPWOB7RCL2Z7.CWFF6Y3XAXFC@sumire>
In-Reply-To
<CAMYYbY5OEFPMeOT=tOS0VyMFM_xOzWTRxDcJ2AhpPH+_u0L_uQ@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
On Thu Jan 19, 2023 at 7:11 PM CET, Martin Rusko wrote:
> Hello,
>
> when trying to create new LXD instance as a virtual machine, the
> creation fails with following message:
>
> ~# lxc init images:alpine/3.17 alpine-test --vm
> Creating alpine-test
> Error: Failed instance creation: Failed creating instance record:
> Instance type "virtual-machine" is not supported on this server: QEMU
> failed to run feature checks
>
> And in the logs these two messages sheds a bit more light to it:
>
> level=error msg="Unable to run feature checks during QEMU
> initialization: QEMU premature exit: exit status 1 (qemu: could not
> load PC BIOS '/usr/share/OVMF/OVMF_CODE.fd')"
> level=warning msg="Instance type not operational" driver=qemu
> err="QEMU failed to run feature checks" type=virtual-machine
>
> I went to check sources (see [1], function checkFeatures(hostArch int,
> qemuPath string)) and they seems to run qemu-system-x86_64 like this:
>
> ~# qemu-system-x86_64 -S -nographic -nodefaults -no-user-config
> -machine q35 -bios /usr/share/OVMF/OVMF_CODE.fd
> qemu: could not load PC BIOS '/usr/share/OVMF/OVMF_CODE.fd'

this file exists in:
https://pkgs.alpinelinux.org/contents?file=OVMF_CODE.fd&path=&name=&branch=edge
the ovmf package.

(and if it was another path, reading the code, LXD_OVMF_PATH lets you specify
the directory, in case you sourced your own ovmf firmware.)

>
> Is this Alpine's bug? Or LXD upstream bug? I'm trying to run it on
> "Alpine Linux v3.17".
>
> Best Regards,
> Martin
>
> [1] - https://github.com/lxc/lxd/blob/master/lxd/instance/drivers/driver_qemu.go
> --
> Martin Rusko | martin.rusko@gmail.com | +46 768 598091 | +421 903 246 698
Details
Message ID
<CAMYYbY5ArB4Tf=zP5U_0A2C6FaZ-+PNiHEFfck7AJxSH7LOZhg@mail.gmail.com>
In-Reply-To
<CAMYYbY5OEFPMeOT=tOS0VyMFM_xOzWTRxDcJ2AhpPH+_u0L_uQ@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
I can add that replacing /usr/share/OVMF/OVMF_CODE.fd file form ovmf
package with the file from ubuntu/22.04 makes the "feature check" to
succeed. The size is quite different 3.5M (Alpine) vs 1.9M (Ubuntu).
I'll try to see why that is.

/Martin

On Thu, Jan 19, 2023 at 7:11 PM Martin Rusko <martin.rusko@gmail.com> wrote:
>
> Hello,
>
> when trying to create new LXD instance as a virtual machine, the
> creation fails with following message:
>
> ~# lxc init images:alpine/3.17 alpine-test --vm
> Creating alpine-test
> Error: Failed instance creation: Failed creating instance record:
> Instance type "virtual-machine" is not supported on this server: QEMU
> failed to run feature checks
>
> And in the logs these two messages sheds a bit more light to it:
>
> level=error msg="Unable to run feature checks during QEMU
> initialization: QEMU premature exit: exit status 1 (qemu: could not
> load PC BIOS '/usr/share/OVMF/OVMF_CODE.fd')"
> level=warning msg="Instance type not operational" driver=qemu
> err="QEMU failed to run feature checks" type=virtual-machine
>
> I went to check sources (see [1], function checkFeatures(hostArch int,
> qemuPath string)) and they seems to run qemu-system-x86_64 like this:
>
> ~# qemu-system-x86_64 -S -nographic -nodefaults -no-user-config
> -machine q35 -bios /usr/share/OVMF/OVMF_CODE.fd
> qemu: could not load PC BIOS '/usr/share/OVMF/OVMF_CODE.fd'
>
> Is this Alpine's bug? Or LXD upstream bug? I'm trying to run it on
> "Alpine Linux v3.17".
>
> Best Regards,
> Martin
>
> [1] - https://github.com/lxc/lxd/blob/master/lxd/instance/drivers/driver_qemu.go
> --
> Martin Rusko | martin.rusko@gmail.com | +46 768 598091 | +421 903 246 698
Details
Message ID
<CAMYYbY746jYim6UcbshSHR+5Uq87+mecX_04jeiehaQUe4WxFQ@mail.gmail.com>
In-Reply-To
<CPWOB7RCL2Z7.CWFF6Y3XAXFC@sumire> (view parent)
DKIM signature
missing
Download raw message
On Fri, Jan 20, 2023 at 3:48 AM alice <alice@ayaya.dev> wrote:
>
> On Thu Jan 19, 2023 at 7:11 PM CET, Martin Rusko wrote:
> > Hello,
> >
> > when trying to create new LXD instance as a virtual machine, the
> > creation fails with following message:
> >
> > ~# lxc init images:alpine/3.17 alpine-test --vm
> > Creating alpine-test
> > Error: Failed instance creation: Failed creating instance record:
> > Instance type "virtual-machine" is not supported on this server: QEMU
> > failed to run feature checks
> >
> > And in the logs these two messages sheds a bit more light to it:
> >
> > level=error msg="Unable to run feature checks during QEMU
> > initialization: QEMU premature exit: exit status 1 (qemu: could not
> > load PC BIOS '/usr/share/OVMF/OVMF_CODE.fd')"
> > level=warning msg="Instance type not operational" driver=qemu
> > err="QEMU failed to run feature checks" type=virtual-machine
> >
> > I went to check sources (see [1], function checkFeatures(hostArch int,
> > qemuPath string)) and they seems to run qemu-system-x86_64 like this:
> >
> > ~# qemu-system-x86_64 -S -nographic -nodefaults -no-user-config
> > -machine q35 -bios /usr/share/OVMF/OVMF_CODE.fd
> > qemu: could not load PC BIOS '/usr/share/OVMF/OVMF_CODE.fd'
>
> this file exists in:
> https://pkgs.alpinelinux.org/contents?file=OVMF_CODE.fd&path=&name=&branch=edge
> the ovmf package.
>
> (and if it was another path, reading the code, LXD_OVMF_PATH lets you specify
> the directory, in case you sourced your own ovmf firmware.)

I didn't get this message "qemu: could not load PC BIOS
'/usr/share/OVMF/OVMF_CODE.fd'" because the file was missing, I had it
from the ovmf package. It just fails to load. Just bluntly replacing
it from Ubuntu makes it work. I'll try to look into LXD_OVMF_PATH, so
I'm not overwriting files from a package. Thanks!

/Martin
Details
Message ID
<CPX39OIVAOJ4.3Y5VK5Y4SFJS@sumire>
In-Reply-To
<CAMYYbY5ArB4Tf=zP5U_0A2C6FaZ-+PNiHEFfck7AJxSH7LOZhg@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
On Fri Jan 20, 2023 at 3:10 PM CET, Martin Rusko wrote:
> I can add that replacing /usr/share/OVMF/OVMF_CODE.fd file form ovmf
> package with the file from ubuntu/22.04 makes the "feature check" to
> succeed. The size is quite different 3.5M (Alpine) vs 1.9M (Ubuntu).
> I'll try to see why that is.

ah, okay, means it's broken somehow indeed.
for reference the build for it is defined in:
https://git.alpinelinux.org/aports/tree/community/edk2/APKBUILD

> /Martin
>
> On Thu, Jan 19, 2023 at 7:11 PM Martin Rusko <martin.rusko@gmail.com> wrote:
> >
> > Hello,
> >
> > when trying to create new LXD instance as a virtual machine, the
> > creation fails with following message:
> >
> > ~# lxc init images:alpine/3.17 alpine-test --vm
> > Creating alpine-test
> > Error: Failed instance creation: Failed creating instance record:
> > Instance type "virtual-machine" is not supported on this server: QEMU
> > failed to run feature checks
> >
> > And in the logs these two messages sheds a bit more light to it:
> >
> > level=error msg="Unable to run feature checks during QEMU
> > initialization: QEMU premature exit: exit status 1 (qemu: could not
> > load PC BIOS '/usr/share/OVMF/OVMF_CODE.fd')"
> > level=warning msg="Instance type not operational" driver=qemu
> > err="QEMU failed to run feature checks" type=virtual-machine
> >
> > I went to check sources (see [1], function checkFeatures(hostArch int,
> > qemuPath string)) and they seems to run qemu-system-x86_64 like this:
> >
> > ~# qemu-system-x86_64 -S -nographic -nodefaults -no-user-config
> > -machine q35 -bios /usr/share/OVMF/OVMF_CODE.fd
> > qemu: could not load PC BIOS '/usr/share/OVMF/OVMF_CODE.fd'
> >
> > Is this Alpine's bug? Or LXD upstream bug? I'm trying to run it on
> > "Alpine Linux v3.17".
> >
> > Best Regards,
> > Martin
> >
> > [1] - https://github.com/lxc/lxd/blob/master/lxd/instance/drivers/driver_qemu.go
> > --
> > Martin Rusko | martin.rusko@gmail.com | +46 768 598091 | +421 903 246 698
Reply to thread Export thread (mbox)