diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js index 8cac54e..b5067d7 100644 --- a/www/manager6/window/Migrate.js +++ b/www/manager6/window/Migrate.js @@ -366,11 +366,22 @@ Ext.define('PVE.window.Migrate', { migrateStats.local_disks.forEach(function (disk) { if (disk.cdrom && disk.cdrom === 1) { if (!disk.volid.includes('vm-' + vm.get('vmid') + '-cloudinit')) { + let text = gettext('Cannot migrate VM with local CD/DVD'); + let snapshots = Object.keys(disk.referenced_in_snapshot ?? {}).sort(); + if (!disk.is_attached && snapshots.length) { + text = Ext.String.format( + ngettext( + 'Cannot migrate VM with local CD/DVD ({0}) referenced in snapshot {1}. Remove the snapshot to allow migration.', + 'Cannot migrate VM with local CD/DVD ({0}) referenced in snapshots {1}. Remove the snapshots to allow migration.', + snapshots.length, + ), + disk.volid, + snapshots.join(', '), + ); + } + migration.possible = false; - migration.preconditions.push({ - text: gettext('Cannot migrate VM with local CD/DVD'), - severity: 'error', - }); + migration.preconditions.push({ text, severity: 'error' }); } } else { let size = disk.size