mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
guest: Don't set default uefi if firmware= is set
This commit is contained in:
parent
e5980863dd
commit
0c223ab21f
@ -0,0 +1,55 @@
|
||||
<domain type="kvm">
|
||||
<name>vm1</name>
|
||||
<uuid>00000000-1111-2222-3333-444444444444</uuid>
|
||||
<memory>65536</memory>
|
||||
<currentMemory>65536</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os firmware="efi">
|
||||
<type arch="aarch64" machine="virt">hvm</type>
|
||||
<boot dev="network"/>
|
||||
</os>
|
||||
<cpu mode="host-passthrough"/>
|
||||
<clock offset="utc"/>
|
||||
<on_reboot>destroy</on_reboot>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||
<controller type="usb" index="0" model="qemu-xhci" ports="15"/>
|
||||
<interface type="bridge">
|
||||
<source bridge="testsuitebr0"/>
|
||||
<mac address="00:11:22:33:44:55"/>
|
||||
<model type="virtio"/>
|
||||
</interface>
|
||||
<console type="pty"/>
|
||||
<channel type="unix">
|
||||
<source mode="bind"/>
|
||||
<target type="virtio" name="org.qemu.guest_agent.0"/>
|
||||
</channel>
|
||||
</devices>
|
||||
</domain>
|
||||
<domain type="kvm">
|
||||
<name>vm1</name>
|
||||
<uuid>00000000-1111-2222-3333-444444444444</uuid>
|
||||
<memory>65536</memory>
|
||||
<currentMemory>65536</currentMemory>
|
||||
<vcpu>1</vcpu>
|
||||
<os firmware="efi">
|
||||
<type arch="aarch64" machine="virt">hvm</type>
|
||||
<boot dev="network"/>
|
||||
</os>
|
||||
<cpu mode="host-passthrough"/>
|
||||
<clock offset="utc"/>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||
<controller type="usb" index="0" model="qemu-xhci" ports="15"/>
|
||||
<interface type="bridge">
|
||||
<source bridge="testsuitebr0"/>
|
||||
<mac address="00:11:22:33:44:55"/>
|
||||
<model type="virtio"/>
|
||||
</interface>
|
||||
<console type="pty"/>
|
||||
<channel type="unix">
|
||||
<source mode="bind"/>
|
||||
<target type="virtio" name="org.qemu.guest_agent.0"/>
|
||||
</channel>
|
||||
</devices>
|
||||
</domain>
|
@ -990,6 +990,7 @@ c.add_compare("--arch aarch64 --boot kernel=/f19-arm.kernel,initrd=/f19-arm.init
|
||||
c.add_compare("--arch aarch64 --cdrom %(EXISTIMG2)s --boot loader=CODE.fd,nvram.template=VARS.fd --disk %(EXISTIMG1)s --cpu none --events on_crash=preserve,on_reboot=destroy,on_poweroff=restart", "aarch64-cdrom")
|
||||
c.add_compare("--connect %(URI-KVM-AARCH64)s --disk %(EXISTIMG1)s --import --os-variant fedora21 --panic default", "aarch64-kvm-import") # the --panic is a no-op
|
||||
c.add_compare("--connect %(URI-KVM-AARCH64)s --disk size=1 --os-variant fedora22 --features gic_version=host --network network=default,address.type=pci --controller type=scsi,model=virtio-scsi,address.type=pci", "aarch64-kvm-gic")
|
||||
c.add_compare("--connect %(URI-KVM-AARCH64)s --arch aarch64 --disk none --pxe --boot firmware=efi", "aarch64-firmware-no-override")
|
||||
|
||||
|
||||
# Simple headless guests for various architectures
|
||||
|
@ -561,8 +561,9 @@ class Guest(XMLBuilder):
|
||||
return path
|
||||
|
||||
def is_uefi(self):
|
||||
return bool(self.os.loader and
|
||||
self.os.loader_type == "pflash")
|
||||
if self.os.loader and self.os.loader_type == "pflash":
|
||||
return True
|
||||
return self.os.firmware == "efi"
|
||||
|
||||
def set_uefi_path(self, path):
|
||||
"""
|
||||
@ -781,11 +782,13 @@ class Guest(XMLBuilder):
|
||||
not self.os.kernel and
|
||||
not self.os.loader and
|
||||
self.os.loader_ro is None and
|
||||
self.os.nvram is None)
|
||||
self.os.nvram is None and
|
||||
self.os.firmware is None)
|
||||
|
||||
if use_default_uefi or self.uefi_requested:
|
||||
try:
|
||||
path = self.get_uefi_path()
|
||||
log.debug("Setting UEFI path=%s", path)
|
||||
self.set_uefi_path(path)
|
||||
except RuntimeError as e:
|
||||
if self.uefi_requested:
|
||||
|
Loading…
Reference in New Issue
Block a user