mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 09:26:03 +00:00
fix(instances): a VM of an architecture without firmware choices or PCI cards can be created
The create page shows no firmware choice for an architecture whose host offers none, yet the form required one, so such a VM could never be created from the page. The firmware is now optional there: the machine's own is used, as the job and the API already did. s390x machines have no PCI bus for the emulated network cards (e1000, e1000e, rtl8139), yet the create page and the VM's network tab offered them for every architecture. They now offer default and virtio there, and a create job refuses a card model the VM's architecture cannot have.
This commit is contained in:
parent
3bd519c935
commit
159049736d
12 changed files with 107 additions and 80 deletions
|
|
@ -893,10 +893,11 @@ class wvmConnect(object):
|
|||
|
||||
return util.get_xml_path(self.get_dom_cap_xml(arch, machine), func=get_hostdev_list)
|
||||
|
||||
def get_network_models(self):
|
||||
"""
|
||||
:return: network card models
|
||||
"""
|
||||
def get_network_models(self, arch):
|
||||
"""The network card models for a VM of arch: s390x machines have no
|
||||
PCI bus for the emulated ones."""
|
||||
if arch == "s390x":
|
||||
return ["default", "virtio"]
|
||||
return ["default", "e1000", "e1000e", "rtl8139", "virtio"]
|
||||
|
||||
def get_image_formats(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue