but only when we detect the 'ova-needs-extraction' warning. This can be used to select the storage where the disks contained in an OVA will be extracted to temporarily.
Signed-off-by: Dominik Csapak <d.csa...@proxmox.com> --- new in v2 www/manager6/window/GuestImport.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/www/manager6/window/GuestImport.js b/www/manager6/window/GuestImport.js index 2c8bc189..3b328f36 100644 --- a/www/manager6/window/GuestImport.js +++ b/www/manager6/window/GuestImport.js @@ -303,6 +303,7 @@ Ext.define('PVE.window.GuestImport', { os: 'l26', maxCdDrives: false, uniqueMACAdresses: false, + isOva: false, warnings: [], }, @@ -432,6 +433,10 @@ Ext.define('PVE.window.GuestImport', { } } + if (config['import-extraction-storage'] === '') { + delete config['import-extraction-storage']; + } + return config; }, @@ -553,6 +558,22 @@ Ext.define('PVE.window.GuestImport', { allowBlank: false, fieldLabel: gettext('Default Bridge'), }, + { + xtype: 'pveStorageSelector', + reference: 'extractionStorage', + fieldLabel: gettext('Extraction Storage'), + storageContent: 'images', + emptyText: gettext('Import Storage'), + autoSelect: false, + name: 'import-extraction-storage', + disabled: true, + hidden: true, + allowBlank: true, + bind: { + disabled: '{!isOva}', + hidden: '{!isOva}', + }, + }, ], columnB: [ @@ -918,6 +939,7 @@ Ext.define('PVE.window.GuestImport', { me.lookup('defaultStorage').setNodename(me.nodename); me.lookup('defaultBridge').setNodename(me.nodename); + me.lookup('extractionStorage').setNodename(me.nodename); let renderWarning = w => { const warningsCatalogue = { @@ -999,6 +1021,7 @@ Ext.define('PVE.window.GuestImport', { } me.getViewModel().set('warnings', data.warnings.map(w => renderWarning(w))); + me.getViewModel().set('isOva', data.warnings.map(w => w.type).indexOf('ova-needs-extracting') !== -1); let osinfo = PVE.Utils.get_kvm_osinfo(me.vmConfig.ostype ?? ''); let prepareForVirtIO = (me.vmConfig.ostype ?? '').startsWith('w') && (me.vmConfig.bios ?? '').indexOf('ovmf') !== -1; -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel