Multiple CD-ROM / ISO Support Per VM#13101
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #13101 +/- ##
============================================
+ Coverage 18.09% 18.10% +0.01%
- Complexity 16723 16770 +47
============================================
Files 6037 6041 +4
Lines 542580 542928 +348
Branches 66427 66489 +62
============================================
+ Hits 98155 98307 +152
- Misses 433399 433570 +171
- Partials 11026 11051 +25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@Damans227 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 17708 |
…avior for listByVmId
|
@blueorangutan package |
|
@Damans227 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17709 |
…rImpl for ISO deletion checks
|
@blueorangutan package |
|
@Damans227 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17720 |
| VmIsoMapVO highest = highestCdromMapEntry(vmId); | ||
| return highest == null ? CDROM_PRIMARY_DEVICE_SEQ + 1 : highest.getDeviceSeq() + 1; |
There was a problem hiding this comment.
Is we aren't using highestCdromMapEntry() elsewhere I was wondering if we could just do:
| VmIsoMapVO highest = highestCdromMapEntry(vmId); | |
| return highest == null ? CDROM_PRIMARY_DEVICE_SEQ + 1 : highest.getDeviceSeq() + 1; | |
| return _vmIsoMapDao.listByVmId(vmId).stream() | |
| .mapToInt(VmIsoMapVO::getDeviceSeq) | |
| .max() | |
| .orElse(CDROM_PRIMARY_DEVICE_SEQ) + 1; |
feel free to ignore.
Pearl1594
left a comment
There was a problem hiding this comment.
code lgtm. Left a few minor comments.
|
@blueorangutan package |
|
@Damans227 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17740 |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
…host IDs and improve cluster ID retrieval
…gurations during VM boot
…D from candidates based on hypervisor type
|
@blueorangutan package |
|
@Damans227 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 17862 |
|
@blueorangutan package |
|
@Damans227 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17863 |
Description
Adds multiple CD-ROM support per VM on KVM. Today CloudStack allows only one ISO per VM, forcing a manual ISO-swap workflow to install Windows on KVM (Windows installer + VirtIO drivers). After this PR each VM can hold up to
vm.cdrom.max.countISOs simultaneously, each appearing as its own CD-ROM inside the guest.What changes:
detachIsotakes an optionalid(required when multiple ISOs are attached).listVirtualMachinesreturnsisos[]andcdrommaxcount; legacyisoidstill reflects the bootable ISO.vm.cdrom.max.count(default1). Values above the host-advertised cap fail loudly instead of silent clamping.host.cdrom.max.counthost detail; management reads fromhost_details, no hardcoded hypervisor numbers in management code.vm_iso_maptable holds extra slots;user_vm.iso_idis kept as the bootable pointer. ISO deletion is gated by both tables.Scope: KVM only.
Design doc: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=421957739
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
Screen.Recording.2026-05-04.at.5.20.18.PM.mov
How Has This Been Tested?
TemplateManagerImplTestfor slot allocation, the duplicate-attach check, and the detach-id resolution helper.How did you try to break this feature and the system with this change?
vm.cdrom.max.countabove the host's advertised cap to confirm the validate-and-throw fires on attach/deployuser_vm.iso_idandvm_iso_mapstay in syncisoidinlistVirtualMachines) see no functional change