weizhouapache commented on PR #14407: URL: https://github.com/apache/cloudstack/pull/14407#issuecomment-6214865813
### Manual test results (commit de91dd4417a) **Environment**: management server and one KVM host built from this branch (24.0.0-SNAPSHOT). The agent advertises `host.cdrom.max.count=2`. `vm.iso.max.count` is 1 by default and was raised to 2 for the two-ISO cases (restored afterwards). Template: Ubuntu 24.04 cloud image. Guest OS types: Ubuntu, Windows Server 2022 and "Other (64-bit)". Every check was asserted by a script (target dev and bus from `virsh dumpxml`, device ids from the DB, VM state after start). | # | Case | Result | |---|---|---| | 1 | BIOS, no config drive, `vm.iso.max.count=1` | Data disks get device ids 1, 2, 5, 6, 7 (`vdb`, `vdc`, `vdf`, `vdg`, `vdh`). A second ISO is rejected. | | 2 | BIOS, no config drive, 2 ISOs | ISOs on `hdc` and `hdd`. A third ISO is rejected. Data disks 1, 2, 5. | | 3 | BIOS, config drive, 2 ISOs | ISO1 `hdc`, config drive `hdd`, ISO2 SATA `sdf`. Data disks 1, 2, 6. Detaching ISO2 leaves the config drive intact. | | 4 | UEFI/q35, SCSI, config drive (#13484) | No duplicate target names. Data disks 1, 2, 6, 7. | | 5 | UEFI/q35, SCSI, no config drive (#14321) | CD-ROMs `sdd` and `sde`, data disks 1, 2, 5. No clash. | | 6 | Deployed stopped, 4 disks attached while stopped, config drive | Ids 1, 2, 6, 7. The VM starts cleanly. | | 7 | Windows Server 2022, secure UEFI | All devices SATA, no clash. ISOs are kept across a restart. Data disks 1, 2, 6, 7, 8. | | 8 | "Other (64-bit)", BIOS, IDE root | Root `hda`, CD-ROMs `hdc`, `hdd` (config drive) and `sdf`. Data disks 1, 2, 6. | | 9 | Explicit `deviceid` 3 or 4 on attach | Rejected, the message lists the reserved CD-ROM and config drive ids. | | 10 | NIC plugged into a running VM that already has config drive | The config drive is re-attached on `hdd`. The CD-ROMs are unchanged. | | 11 | Import of an unmanaged KVM VM with 4 data disks | Ids 1, 2, 6, 7 (before the change: 1, 2, 3, 4). The VM starts with a valid domain. | Also checked: a second ISO on a running config drive VM that booted with `vm.iso.max.count=1` fails to attach until the VM is restarted. This matches the description. q35 selected only through `kvm.guest.os.machine.type`, without the `UEFI` detail, still fails to start (IDE is unsupported on q35). This is the same as before the change. Unit tests of the touched classes pass (`VolumeApiServiceImplTest`, `TemplateManagerImplTest`, `UnmanagedVMsManagerImplTest`, `KVMGuruTest`, `LibvirtComputingResourceTest`, `LibvirtVMDefTest`, `ConfigDriveNetworkElementTest`). **Not covered by these tests** - Backup restore (`KVMGuru`), VMware to KVM import, live migration, non-KVM hypervisors, and hosts that advertise a CD-ROM cap other than 2. - A volume that already sits on a reserved device id is not moved. - A NIC on a config drive network added to a running VM that booted without config drive: only the ISO file is created, nothing is attached until the next start. ISO attach/detach on that VM before the restart was not tested. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
