[Bug 1203562] New: virt-install not pickeing the right boot firmware
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
https://bugzilla.suse.com/show_bug.cgi?id=1203562
Bug ID: 1203562
Summary: virt-install not pickeing the right boot firmware
Classification: openSUSE
Product: openSUSE Distribution
Version: Leap 15.4
Hardware: Other
OS: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Virtualization:Tools
Assignee: virt-bugs@suse.de
Reporter: aginies@suse.com
QA Contact: qa-bugs@suse.de
Found By: ---
Blocker: ---
Creating a VM and would like to use uefi
loader=/usr/share/qemu/ovmf-x86_64-smm-opensuse-code.bin
At the end the firmware used is the XML config is
/usr/share/qemu/ovmf-x86_64-smm-ms-code.bin
virt-install debug logs:
exec virt-install -d --name alp-demo --os-variant=opensuse15.3 --boot
uefi,loader_type=pflash,loader=/usr/share/qemu/ovmf-x86_64-smm-opensuse-code.bin,nvram_template=/usr/share/qemu/ovmf-x86_64-smm-opensuse-vars.bin
--import --disk /var/tmp/alp-demo/alp-demo.qcow2,bus=sata --memory 2048
--console pty,target_type=virtio --tpm
backend.type=emulator,backend.version=2.0,model=tpm-tis --network
network=default --transient --autoconsole graphical
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (cli:204) Launched with
command line: /usr/bin/virt-install -d --name alp-demo
--os-variant=opensuse15.3 --boot
uefi,loader_type=pflash,loader=/usr/share/qemu/ovmf-x86_64-smm-opensuse-code.bin,nvram_template=/usr/share/qemu/ovmf-x86_64-smm-opensuse-vars.bin
--import --disk /var/tmp/alp-demo/alp-demo.qcow2,bus=sata --memory 2048
--console pty,target_type=virtio --tpm
backend.type=emulator,backend.version=2.0,model=tpm-tis --network
network=default --transient --autoconsole graphical
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (virtinstall:212)
Distilled --network options: ['network=default']
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (virtinstall:142)
Distilled --disk options: ['/var/tmp/alp-demo/alp-demo.qcow2,bus=sata']
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (cli:216) Requesting
libvirt URI default
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (cli:219) Received libvirt
URI qemu:///system
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (guest:333) Setting Guest
osinfo name <_OsVariant name=generic>
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (guest:333) Setting Guest
osinfo name <_OsVariant name=opensuse15.3>
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (installer:553) No media
for distro detection.
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (installer:555)
installer.detect_distro returned=None
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (osdict:217) No
recommended value found for key='n-cpus', using minimum=1 * 2
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (guest:538) Prefer EFI =>
False
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (cpu:282) Using default
cpu mode=host-passthrough
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (graphics:157) App is
configured with default_graphics=spice
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (graphics:175) Local
connection, disabling spice image compression.
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (guest:1103) Using
num_pcie_root_ports=14
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (disk:236)
DeviceDisk.check_path_search path=/var/tmp/alp-demo/alp-demo.qcow2
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (cli:265)
Starting install...
Starting install...
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (installer:630) Generated
initial_xml: None required
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (installer:631) Generated
final_xml:
<domain type="kvm">
<name>alp-demo</name>
<uuid>2c5462d3-b596-4c75-ae08-dceb0e8563c3</uuid>
<metadata>
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
https://bugzilla.suse.com/show_bug.cgi?id=1203562
Antoine Ginies
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
https://bugzilla.suse.com/show_bug.cgi?id=1203562
Antoine Ginies
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
https://bugzilla.suse.com/show_bug.cgi?id=1203562
https://bugzilla.suse.com/show_bug.cgi?id=1203562#c1
Charles Arnold
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
https://bugzilla.suse.com/show_bug.cgi?id=1203562
https://bugzilla.suse.com/show_bug.cgi?id=1203562#c2
James Fehlig
[Tue, 20 Sep 2022 12:06:58 virt-install 18235] DEBUG (cli:204) Launched with command line: /usr/bin/virt-install -d --name alp-demo --os-variant=opensuse15.3 --boot uefi,loader_type=pflash,loader=/usr/share/qemu/ovmf-x86_64-smm-opensuse-code. bin,nvram_template=/usr/share/qemu/ovmf-x86_64-smm-opensuse-vars.bin --import --disk /var/tmp/alp-demo/alp-demo.qcow2,bus=sata --memory 2048 --console pty,target_type=virtio --tpm backend.type=emulator,backend.version=2.0,model=tpm-tis --network network=default --transient --autoconsole graphical
This command is not quite right. First, you've specified firmware autoselection with '--boot uefi', but then also tried to explicitly specify a firmware by adding 'loader=/usr/share/qemu/ovmf-x86_64-smm-opensuse-code.bin,nvram_template=/usr/share/qemu/ovmf-x86_64-smm-opensuse-vars.bin'. libvirt commit de2a338dce would help with the error reporting. E.g. on TW, which has that commit, the command would fail with a better error message virt82:~ # virt-install --name leap15.4-kvm --os-variant=opensuse15.4 --boot uefi,loader.type=pflash,loader=/usr/share/qemu/ovmf-x86_64-opensuse-4m-code.bin,nvram_template=/usr/share/qemu/ovmf-x86_64-opensuse-4m-vars.bin --disk /vm_images/jim/images/leap15.4-kvm/disk0.qcow2,format=qcow2 --memory 2048 --console pty,target_type=virtio --network bridge=br0 --autoconsole graphical --location https://download.opensuse.org/distribution/leap/15.4/repo/oss/ Starting install... ERROR loader attribute 'type' cannot be specified when firmware autoselection is enabled Also note your command has 'loader_type=pflash'. It should be 'loader.type=pflash'. If you want to explicitly specify a firmware, do not also use autoselection. A proper boot command line option would be --boot loader.type=pflash,loader.readonly=yes,loader=/usr/share/qemu/ovmf-x86_64-opensuse-4m-code.bin,nvram_template=/usr/share/qemu/ovmf-x86_64-opensuse-4m-vars.bin I would close this as invalid, but it is probably worth backporting commit de2a338dce to the libvirt 8.0.0 package for the improved error handling. -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
https://bugzilla.suse.com/show_bug.cgi?id=1203562
https://bugzilla.suse.com/show_bug.cgi?id=1203562#c3
James Fehlig
I would close this as invalid, but it is probably worth backporting commit de2a338dce to the libvirt 8.0.0 package for the improved error handling.
After spending 1 day now trying to backport this patch I'm wondering if the effort is worth it. Since the RH guys have nothing to do except rewrite code, even a simple commit like de2a338dce is difficult to backport. I've already added commits 29bbd927 and f5dcd8b9 to ease the pain, but still failing lots of unit tests. If we really want this fixed up right, we'd probably need all the commits touching the firmware handling code c76e595131abeff6ce1ddcd0047decf71ddd5267 031f379573a28c7784096825f4975956495f0974 acb8733924e2f330e3774de9ab21fc2eee3534fb f29a8bcef1dd9bdeb1b2819dd73b8e94cd833634 53cdfd7994a5c3352ec9a998a8fb003a008b91ac 2ce1dcc6b57426009fe4841ad41c2c03112391fc 29bbd927f8fd248856a4957f7e9ce84f71423c3e 1afc026c73c7514c5e95b12d06aca18a0bfa6e26 628c018344688505db0d67f1389144ab14ee88a8 040ebb9d1b5d1817ab41c446303ee12d157abda6 cec35f4a5225d9188a6c201d03531cb9562dabfe 5943e4ade6dd10c5c65a195234eff3742c7e7221 28c689dc61bc1e24fb2e03a6d445ea1a7a938d28 f0e68d28e1ef182a5f0e2bf4666fcbb14b06a44d bdd9ce0fda75d9c79c153912fc964c8f1aed1aae 9c7499ce542e296ebbcb28db7da6582c85cba176 6cacfc751eb4d200da78a0a59de0676478e8a33b c98910d0110850ffcf3e534b5ea70a3afabb53f9 161b31f9584eeba17cf29d38289c3a8a03e9e858 421d4f1fa84529f9c7c5d884e09ec42a71d737f0 f5dcd8b9796f7dacb9e91da17099d39c5622e328 de2a338dcebde096d4806e43702513284607db8f c4b8124e45ae754e7432a9065a1e4a54bbd971e6 73c5ae55c7c3a5b26cc16ad85ecd57fc1d410b33 262672dbbfe46c6e9090afdf516c13bfb93f98e5 981879d026d9ee89183125d0049191097ec10b47 578ac25c6ae86d3f655ad902d1bcb57beff0e936 ef53798ab645496002aa8da2b3650dde19832f3d Or just wait for all this stuff in SP5. Antoine, would you like me to continue with this and backport all these firmware handling improvements to SP4? -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
https://bugzilla.suse.com/show_bug.cgi?id=1203562
https://bugzilla.suse.com/show_bug.cgi?id=1203562#c4
Antoine Ginies
participants (1)
-
bugzilla_noreply@suse.com