Am 08.11.23 um 15:28 schrieb Hannes Dürr: >> >> Can we do the check before creating the drive instead? We know if it's a >> CD or pass-through and the path or if it's iscsi ahead of time and that >> should be enough for the check, or what am I missing? > I don't think its possible to check in advance as the config can still > contain a not properly formed path like: > 'local-lvm:5', which will be formed to the real path when creating the > disk or am I mistaken You can just teach the get_scsi_devicetype() helper to recognize the special syntax and compare by storage type in that case (can/should be it's own patch ;)). At a glance, 'iscsidirect' and 'zfs' are the ones using an "iscsi://" path, but please double check. Of course there could be a third-party plugin using "iscsi://" too, but this is just an early check and only applies to VMs with machine version < 4.1 anyways. These cases should be very rare and it'll just fail later so no big deal. The benefit of having the check earlier for all other cases is enough to justify that IMHO.
_______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel