1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/instances/templates
catborise 03ac93ea53 fix(instances): CD-ROM bus, USB controller and MACs of a new VM
Creating each option on a RHEL qemu-kvm host showed:

- CD-ROM: the create page offered every disk bus, but the empty CD-ROM
  of a new VM works only on ide, sata and scsi. fdc and virtio failed
  ("Invalid bus type", "does not support ejectable media"), usb failed
  with a device named 'Nonea' because vol_dev_type() had no prefix for
  usb, and after that libvirt refuses an empty usb disk. Only ide, sata
  and scsi are offered now, and another value is refused before any
  storage is allocated. vol_dev_type() names usb disks sdX, which also
  fixes data volumes on the usb bus.
- USB controller: any input device added a bare <controller
  type='usb'/>, which libvirt turns into piix3-uhci (USB 1.1) on q35
  instead of its default qemu-xhci. The bare controller is gone; libvirt
  adds the machine's default for USB inputs.
- MACs: with more networks than MAC addresses, create_instance indexed
  past the list and the request failed with a 500. NICs without a given
  MAC now get one from libvirt. MAC addresses are validated (format, not
  more than networks) by the page and the API before anything is
  created; they went into the XML unchecked.

Unit tests cover the refused values, the MAC rule and the usb prefix.
Live tests create a VM with every offered CD-ROM bus and start it,
check the USB controller with a USB input device and create a VM with
two networks and one MAC.
2026-10-04 18:33:28 +03:00
..
instances fix(instances): NIC edits keep their settings; edits keep metadata 2026-10-04 01:08:11 +03:00
add_instance_network_block.html change name for network model to nic type 2023-08-17 13:22:18 +03:00
add_instance_owner_block.html logger updates (#31) 2023-08-09 09:20:18 +03:00
add_instance_volume.html logger updates (#31) 2023-08-09 09:20:18 +03:00
allinstances.html fix listing vms for normal users 2024-02-13 14:24:38 +03:00
allinstances_index_grouped.html fix listing vms for normal users 2024-02-13 14:24:38 +03:00
allinstances_index_nongrouped.html bootstrap icon conversion fixes 2023-08-11 09:40:38 +03:00
bottom_bar.html logger updates (#31) 2023-08-09 09:20:18 +03:00
create_flav_block.html logger updates (#31) 2023-08-09 09:20:18 +03:00
create_inst_block.html bootstrap icon conversion fixes 2023-08-11 09:40:38 +03:00
create_instance_w1.html fix: serve compute JSON endpoints as application/json, build chipset list safely 2026-10-02 22:34:05 +03:00
create_instance_w2.html fix(instances): CD-ROM bus, USB controller and MACs of a new VM 2026-10-04 18:33:28 +03:00
instance.html feat(console): VNC is the only console type 2026-10-04 01:08:11 +03:00
instance_actions.html feat(security): enforce require_POST on power actions, prevent open redirects, and isolate instance permissions 2026-09-27 13:20:45 +03:00