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
|
|
@ -104,7 +104,8 @@ class NewVMForm(forms.Form):
|
|||
"""The new VM form (create_instance_w2.html); the API takes CreateInstanceSerializer."""
|
||||
|
||||
name = forms.CharField(max_length=64)
|
||||
firmware = forms.CharField(max_length=64)
|
||||
# empty: the machine's own, for an architecture with no firmware choice
|
||||
firmware = forms.CharField(max_length=64, required=False)
|
||||
# an emulated TPM 2.0, as Windows 11 needs
|
||||
tpm = forms.BooleanField(required=False)
|
||||
vcpu = forms.IntegerField(min_value=1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue