Commit Graph
4 Commits
Author SHA1 Message Date
dualfroz b77120f913 fix #6184: import: ovf: add CD drives
The OVF parser only looks at disk drives, so the CD drives of a guest
are dropped on import. Appliances shipped as OVA sometimes come with
an ISO image in a CD drive, for example to install the guest on first
boot. Such a guest then does not boot after the import, and the user
is not told about the image at all.

Add the CD drives of the manifest as empty drives on their controller,
after the disks in the boot order, like the ESXi import does. As CD
images cannot be imported, report a referenced image with the existing
'cdrom-image-ignored' warning, so that the import wizard tells the user
to configure the drive in the 'Advanced' tab.

As the address only takes the position on the controller into account,
a CD drive can end up with the address of a disk, for example with a
disk on the first IDE controller and the CD drive on the second one.
Such a CD drive gets the next free address on its bus.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-10-03 02:00:08 +02:00
upstream 095cd282f3 Upstream proxmox-git/pve-storage state of the touched files before 1860d190cb 2026-10-03 02:00:08 +02:00
dualfroz 9f20cd4f75 fix #5998: import: avoid duplicate disk keys with multiple controllers
The disk key is built from the controller type and the address of the
disk on that controller. The address is only unique per controller, so
with more than one controller of the same type, like a VM with more than
16 disks spread over two SCSI controllers, several disks got the same
key. 'qm importovf' then failed with "cowardly refusing to overwrite
existing entry: scsi0", and the import wizard silently dropped all but
one of those disks, as they are stored in a hash by key.

Keep the address for the first disk using it and move any further disk
with the same address to the lowest address of that bus that is not
used by any other disk.

Add a test manifest with a second SCSI controller.

Signed-off-by: Michal Fox <me@dualfroz.com>
2026-09-25 11:38:19 +02:00
upstream 25ba04d0ba Upstream proxmox-git/pve-storage state of the touched files before 0788e6240e 2026-09-25 11:38:09 +02:00