* [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI
@ 2025-04-08 12:13 Dominik Csapak
2025-04-08 12:13 ` [pve-devel] [PATCH manager v7 1/3] ui: qemu hd edit: allow importing a disk from the import storage Dominik Csapak
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: Dominik Csapak @ 2025-04-08 12:13 UTC (permalink / raw)
To: pve-devel
this is a continuation of my previous series [0]
It enables importing disks on the UI in the HardwareView of a vm,
in the create wizard, and in the storage content view.
I split the patches so that the wizard and storage content view one are
separate, so they can be reviewed independently.
changes from v6:
* drop applied patches
* make import in hd edit panel dependant on configuration, instead of
showing a checkbox
* wizard and HardwareView got an explicit import button
* make the import button work on the storage content view for disk
images
* split patches for hdedit, wizard and storage content
0: https://lore.proxmox.com/pve-devel/20250407101310.3196974-1-d.csapak@proxmox.com/
Dominik Csapak (3):
ui: qemu hd edit: allow importing a disk from the import storage
ui: vm create wizard: allow importing disks
ui: import storage content: allow importing of vm disk images
www/manager6/panel/MultiDiskEdit.js | 36 ++++-
www/manager6/qemu/HDEdit.js | 200 ++++++++++++++++++++++++++--
www/manager6/qemu/HardwareView.js | 6 +
www/manager6/qemu/MultiHDEdit.js | 5 +-
www/manager6/storage/Browser.js | 22 ++-
5 files changed, 249 insertions(+), 20 deletions(-)
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* [pve-devel] [PATCH manager v7 1/3] ui: qemu hd edit: allow importing a disk from the import storage
2025-04-08 12:13 [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI Dominik Csapak
@ 2025-04-08 12:13 ` Dominik Csapak
2025-04-08 12:13 ` [pve-devel] [PATCH manager v7 2/3] ui: vm create wizard: allow importing disks Dominik Csapak
` (4 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Dominik Csapak @ 2025-04-08 12:13 UTC (permalink / raw)
To: pve-devel
from the hardware view of a virtual machine, by adding a new 'Import
Hard Disk' option in the 'Add' menu.
It replaces the standard storage selector by a import storage selector,
the file selector for the image to be imported, and a target storage
selector.
partially fixes #2424
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/qemu/HDEdit.js | 68 +++++++++++++++++++++++++++----
www/manager6/qemu/HardwareView.js | 6 +++
2 files changed, 66 insertions(+), 8 deletions(-)
diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
index b78647ec..38bfb883 100644
--- a/www/manager6/qemu/HDEdit.js
+++ b/www/manager6/qemu/HDEdit.js
@@ -8,6 +8,8 @@ Ext.define('PVE.qemu.HDInputPanel', {
unused: false, // ADD usused disk imaged
+ importDisk: false, // use import options
+
vmconfig: {}, // used to select usused disks
viewModel: {
@@ -78,11 +80,14 @@ Ext.define('PVE.qemu.HDInputPanel', {
if (values.hdimage) {
me.drive.file = values.hdimage;
} else {
- me.drive.file = values.hdstorage + ":" + values.disksize;
+ let disksize = values['import-from'] ? 0 : values.disksize;
+ me.drive.file = `${values.hdstorage}:${disksize}`;
+ PVE.Utils.propertyStringSet(me.drive, values['import-from'], 'import-from');
}
me.drive.format = values.diskformat;
}
+
PVE.Utils.propertyStringSet(me.drive, !values.backup, 'backup', '0');
PVE.Utils.propertyStringSet(me.drive, values.noreplicate, 'replicate', 'no');
PVE.Utils.propertyStringSet(me.drive, values.discard, 'discard', 'on');
@@ -168,6 +173,11 @@ Ext.define('PVE.qemu.HDInputPanel', {
var me = this;
me.down('#hdstorage').setNodename(nodename);
me.down('#hdimage').setStorage(undefined, nodename);
+
+ me.lookup('new-disk')?.setNodename(nodename);
+ me.lookup('import-source')?.setNodename(nodename);
+ me.lookup('import-source-file')?.setNodename(nodename);
+ me.lookup('import-target')?.setNodename(nodename);
},
hasAdvanced: true,
@@ -220,13 +230,52 @@ Ext.define('PVE.qemu.HDInputPanel', {
});
column1.push(me.unusedDisks);
} else if (me.isCreate) {
- column1.push({
- xtype: 'pveDiskStorageSelector',
- storageContent: 'images',
- name: 'disk',
- nodename: me.nodename,
- autoSelect: me.insideWizard,
- });
+ if (!me.importDisk) {
+ column1.push({
+ reference: 'new-disk',
+ xtype: 'pveDiskStorageSelector',
+ storageContent: 'images',
+ name: 'disk',
+ nodename: me.nodename,
+ autoSelect: me.insideWizard,
+ });
+ } else {
+ column1.push({
+ xtype: 'pveStorageSelector',
+ reference: 'import-source',
+ fieldLabel: gettext('Import Storage'),
+ name: 'import-source-storage',
+ storageContent: 'import',
+ nodename: me.nodename,
+ autoSelect: me.insideWizard,
+ disabled: false,
+ listeners: {
+ change: function(_selector, storage) {
+ me.lookup('import-source-file').setStorage(storage);
+ me.lookup('import-source-file').setDisabled(!storage);
+ },
+ },
+ });
+ column1.push({
+ xtype: 'pveFileSelector',
+ reference: 'import-source-file',
+ fieldLabel: gettext("Select Image"),
+ storageContent: 'import',
+ name: 'import-from',
+ filter: (rec) => ['qcow2', 'vmdk', 'raw'].indexOf(rec?.data?.format) !== -1,
+ nodename: me.nodename,
+ });
+ column1.push({
+ xtype: 'pveDiskStorageSelector',
+ reference: 'import-target',
+ storageLabel: gettext('Target Storage'),
+ hideSize: true,
+ storageContent: 'images',
+ name: 'disk',
+ nodename: me.nodename,
+ autoSelect: me.insideWizard,
+ });
+ }
} else {
column1.push({
xtype: 'textfield',
@@ -450,6 +499,8 @@ Ext.define('PVE.qemu.HDEdit', {
width: 600,
bodyPadding: 0,
+ importDisk: false,
+
initComponent: function() {
var me = this;
@@ -467,6 +518,7 @@ Ext.define('PVE.qemu.HDEdit', {
nodename: nodename,
unused: unused,
isCreate: me.isCreate,
+ importDisk: me.importDisk,
});
if (unused) {
diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index 4ce9908c..bf4319f4 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -697,6 +697,12 @@ Ext.define('PVE.qemu.HardwareView', {
disabled: !caps.vms['VM.Config.Disk'],
handler: editorFactory('HDEdit'),
},
+ {
+ text: gettext('Import Hard Disk'),
+ iconCls: 'fa fa-fw fa-cloud-download',
+ disabled: !caps.vms['VM.Config.Disk'],
+ handler: editorFactory('HDEdit', { importDisk: true }),
+ },
{
text: gettext('CD/DVD Drive'),
iconCls: 'pve-itype-icon-cdrom',
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* [pve-devel] [PATCH manager v7 2/3] ui: vm create wizard: allow importing disks
2025-04-08 12:13 [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI Dominik Csapak
2025-04-08 12:13 ` [pve-devel] [PATCH manager v7 1/3] ui: qemu hd edit: allow importing a disk from the import storage Dominik Csapak
@ 2025-04-08 12:13 ` Dominik Csapak
2025-04-08 12:13 ` [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images Dominik Csapak
` (3 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Dominik Csapak @ 2025-04-08 12:13 UTC (permalink / raw)
To: pve-devel
by adding a new 'import' button in the disk tab, which adds the same
input panel as the one we have when doing an 'Import Hard Disk' for an
existing VM.
partially fixes #2424
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/panel/MultiDiskEdit.js | 36 +++++++++++++++++++++++++----
www/manager6/qemu/MultiHDEdit.js | 5 +++-
2 files changed, 36 insertions(+), 5 deletions(-)
diff --git a/www/manager6/panel/MultiDiskEdit.js b/www/manager6/panel/MultiDiskEdit.js
index ea1f974d..ffa2f234 100644
--- a/www/manager6/panel/MultiDiskEdit.js
+++ b/www/manager6/panel/MultiDiskEdit.js
@@ -1,6 +1,8 @@
Ext.define('PVE.panel.MultiDiskPanel', {
extend: 'Ext.panel.Panel',
+ mixins: ['Proxmox.Mixin.CBind'],
+
setNodename: function(nodename) {
this.items.each((panel) => panel.setNodename(nodename));
},
@@ -8,6 +10,8 @@ Ext.define('PVE.panel.MultiDiskPanel', {
border: false,
bodyBorder: false,
+ importDisk: false, // allow import panel
+
layout: 'card',
controller: {
@@ -16,25 +20,35 @@ Ext.define('PVE.panel.MultiDiskPanel', {
vmconfig: {},
onAdd: function() {
+ this.addDiskChecked(false);
+ },
+
+ onImport: function() {
+ this.addDiskChecked(true);
+ },
+
+ addDiskChecked: function(importDisk) {
let me = this;
me.lookup('addButton').setDisabled(true);
- me.addDisk();
+ me.lookup('addImportButton').setDisabled(true);
+ me.addDisk(importDisk);
let count = me.lookup('grid').getStore().getCount() + 1; // +1 is from ide2
me.lookup('addButton').setDisabled(count >= me.maxCount);
+ me.lookup('addImportButton').setDisabled(count >= me.maxCount);
},
getNextFreeDisk: function(vmconfig) {
throw "implement in subclass";
},
- addPanel: function(itemId, vmconfig, nextFreeDisk) {
+ addPanel: function(itemId, vmconfig, nextFreeDisk, importDisk) {
throw "implement in subclass";
},
// define in subclass
diskSorter: undefined,
- addDisk: function() {
+ addDisk: function(importDisk) {
let me = this;
let grid = me.lookup('grid');
let store = grid.getStore();
@@ -53,7 +67,7 @@ Ext.define('PVE.panel.MultiDiskPanel', {
itemId,
})[0];
- let panel = me.addPanel(itemId, vmconfig, nextFreeDisk);
+ let panel = me.addPanel(itemId, vmconfig, nextFreeDisk, importDisk);
panel.updateVMConfig(vmconfig);
// we need to setup a validitychange handler, so that we can show
@@ -171,6 +185,7 @@ Ext.define('PVE.panel.MultiDiskPanel', {
store.remove(record);
me.getView().remove(record.get('itemId'));
me.lookup('addButton').setDisabled(false);
+ me.lookup('addImportButton').setDisabled(false);
me.updateVMConfig();
me.checkValidity();
},
@@ -210,6 +225,7 @@ Ext.define('PVE.panel.MultiDiskPanel', {
dock: 'left',
border: false,
width: 130,
+ cbind: {}, // for nested cbinds
items: [
{
xtype: 'grid',
@@ -257,6 +273,18 @@ Ext.define('PVE.panel.MultiDiskPanel', {
iconCls: 'fa fa-plus-circle',
handler: 'onAdd',
},
+ {
+ xtype: 'button',
+ reference: 'addImportButton',
+ text: gettext('Import'),
+ iconCls: 'fa fa-cloud-download',
+ handler: 'onImport',
+ margin: '5 0 0 0',
+ cbind: {
+ disabled: '{!importDisk}',
+ hidden: '{!importDisk}',
+ },
+ },
{
// dummy field to control wizard validation
xtype: 'textfield',
diff --git a/www/manager6/qemu/MultiHDEdit.js b/www/manager6/qemu/MultiHDEdit.js
index 27884f3f..159236b6 100644
--- a/www/manager6/qemu/MultiHDEdit.js
+++ b/www/manager6/qemu/MultiHDEdit.js
@@ -4,6 +4,8 @@ Ext.define('PVE.qemu.MultiHDPanel', {
onlineHelp: 'qm_hard_disk',
+ importDisk: true,
+
controller: {
xclass: 'Ext.app.ViewController',
@@ -16,7 +18,7 @@ Ext.define('PVE.qemu.MultiHDPanel', {
return PVE.Utils.nextFreeDisk(clist, vmconfig);
},
- addPanel: function(itemId, vmconfig, nextFreeDisk) {
+ addPanel: function(itemId, vmconfig, nextFreeDisk, importDisk) {
let me = this;
return me.getView().add({
vmconfig,
@@ -30,6 +32,7 @@ Ext.define('PVE.qemu.MultiHDPanel', {
itemId,
isCreate: true,
insideWizard: true,
+ importDisk,
});
},
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images
2025-04-08 12:13 [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI Dominik Csapak
2025-04-08 12:13 ` [pve-devel] [PATCH manager v7 1/3] ui: qemu hd edit: allow importing a disk from the import storage Dominik Csapak
2025-04-08 12:13 ` [pve-devel] [PATCH manager v7 2/3] ui: vm create wizard: allow importing disks Dominik Csapak
@ 2025-04-08 12:13 ` Dominik Csapak
2025-04-08 15:34 ` Thomas Lamprecht
2025-04-08 15:44 ` [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI Michael Köppl
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Dominik Csapak @ 2025-04-08 12:13 UTC (permalink / raw)
To: pve-devel
By enabling the import button for qcow2/vmdk/raw files, and showing a
window with a VMID selector and the disk edit panel.
Change the edit panel so that when we give an explicit volume id
directly, we don't let the user select one. Instead it show it in a
displayfield.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/qemu/HDEdit.js | 180 +++++++++++++++++++++++++++-----
www/manager6/storage/Browser.js | 22 ++--
2 files changed, 171 insertions(+), 31 deletions(-)
diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
index 38bfb883..0a9c718d 100644
--- a/www/manager6/qemu/HDEdit.js
+++ b/www/manager6/qemu/HDEdit.js
@@ -9,6 +9,7 @@ Ext.define('PVE.qemu.HDInputPanel', {
unused: false, // ADD usused disk imaged
importDisk: false, // use import options
+ importSelection: undefined, // preselect a disk to import
vmconfig: {}, // used to select usused disks
@@ -240,31 +241,44 @@ Ext.define('PVE.qemu.HDInputPanel', {
autoSelect: me.insideWizard,
});
} else {
- column1.push({
- xtype: 'pveStorageSelector',
- reference: 'import-source',
- fieldLabel: gettext('Import Storage'),
- name: 'import-source-storage',
- storageContent: 'import',
- nodename: me.nodename,
- autoSelect: me.insideWizard,
- disabled: false,
- listeners: {
- change: function(_selector, storage) {
- me.lookup('import-source-file').setStorage(storage);
- me.lookup('import-source-file').setDisabled(!storage);
+ if (me.importSelection) {
+ column1.push({
+ xtype: 'displayfield',
+ fieldLabel: gettext('Selected Image'),
+ value: me.importSelection,
+ });
+ column1.push({
+ xtype: 'hiddenfield',
+ name: 'import-from',
+ value: me.importSelection,
+ });
+ } else {
+ column1.push({
+ xtype: 'pveStorageSelector',
+ reference: 'import-source',
+ fieldLabel: gettext('Import Storage'),
+ name: 'import-source-storage',
+ storageContent: 'import',
+ nodename: me.nodename,
+ autoSelect: me.insideWizard,
+ disabled: false,
+ listeners: {
+ change: function(_selector, storage) {
+ me.lookup('import-source-file').setStorage(storage);
+ me.lookup('import-source-file').setDisabled(!storage);
+ },
},
- },
- });
- column1.push({
- xtype: 'pveFileSelector',
- reference: 'import-source-file',
- fieldLabel: gettext("Select Image"),
- storageContent: 'import',
- name: 'import-from',
- filter: (rec) => ['qcow2', 'vmdk', 'raw'].indexOf(rec?.data?.format) !== -1,
- nodename: me.nodename,
- });
+ });
+ column1.push({
+ xtype: 'pveFileSelector',
+ reference: 'import-source-file',
+ fieldLabel: gettext("Select Image"),
+ storageContent: 'import',
+ name: 'import-from',
+ filter: (rec) => ['qcow2', 'vmdk', 'raw'].indexOf(rec?.data?.format) !== -1,
+ nodename: me.nodename,
+ });
+ }
column1.push({
xtype: 'pveDiskStorageSelector',
reference: 'import-target',
@@ -553,3 +567,121 @@ Ext.define('PVE.qemu.HDEdit', {
});
},
});
+
+Ext.define('PVE.qemu.HDImportEdit', {
+ extend: 'Proxmox.window.Edit',
+ mixins: ['Proxmox.Mixin.CBind'],
+
+ isAdd: true,
+ isCreate: true,
+
+ backgroundDelay: 5,
+
+ width: 600,
+ bodyPadding: 0,
+
+ title: gettext('Import Hard Disk'),
+
+ url: "dummy", // will be set on vmid change
+
+ cbindData: function() {
+ let me = this;
+
+ if (!me.nodename) {
+ throw "no nodename given";
+ }
+
+ if (!me.selection) {
+ throw "no image preselected";
+ }
+
+ return {
+ nodename: me.nodename,
+ selection: me.selection,
+ };
+ },
+
+ controller: {
+ xclass: 'Ext.app.ViewController',
+
+ onVmidChange: function(_selector, value) {
+ let me = this;
+ let view = me.getView();
+ let ipanel = me.lookup('ipanel');
+ ipanel.setDisabled(true);
+ ipanel.setVisible(!!value);
+ let validation = me.lookup('validationProxy');
+ validation.setValue(false);
+ view.url = `/api2/extjs/nodes/${view.nodename}/qemu/${value}/config`;
+ Proxmox.Utils.setErrorMask(ipanel, true);
+
+ Proxmox.Utils.API2Request({
+ url: view.url,
+ method: 'GET',
+ success: function(response, opts) {
+ ipanel.setVMConfig(response.result.data);
+
+ validation.setValue(true);
+
+ ipanel.setDisabled(false);
+ Proxmox.Utils.setErrorMask(ipanel, false);
+ },
+ failure: function(response, _opts) {
+ Proxmox.Utils.setErrorMask(ipanel, response.htmlStatus);
+ },
+ });
+ },
+ },
+
+ items: [
+ {
+ xtype: 'vmComboSelector',
+ padding: 10,
+ allowBlank: false,
+ fieldLabel: gettext('Target Guest'),
+ submitValue: false,
+ cbind: {}, // for nested cbinds
+ store: {
+ model: 'PVEResources',
+ autoLoad: true,
+ sorters: 'vmid',
+ cbind: {}, // for nested cbinds
+ filters: [
+ {
+ property: 'type',
+ value: 'qemu',
+ },
+ {
+ property: 'node',
+ cbind: {
+ value: '{nodename}',
+ },
+ },
+ ],
+ },
+ listeners: {
+ change: 'onVmidChange',
+ },
+ },
+ {
+ // used to prevent submitting while vm config is being loaded or that returns an error
+ xtype: 'textfield',
+ reference: 'validationProxy',
+ submitValue: false,
+ hidden: true,
+ validator: (val) => !!val,
+ },
+ {
+ xtype: 'pveQemuHDInputPanel',
+ reference: 'ipanel',
+ hidden: true,
+ disabled: true,
+ isCreate: true,
+ importDisk: true,
+ cbind: {
+ importSelection: '{selection}',
+ nodename: '{nodename}',
+ },
+ },
+ ],
+});
diff --git a/www/manager6/storage/Browser.js b/www/manager6/storage/Browser.js
index c0b66acc..c25b99be 100644
--- a/www/manager6/storage/Browser.js
+++ b/www/manager6/storage/Browser.js
@@ -124,7 +124,7 @@ Ext.define('PVE.storage.Browser', {
});
}
if (contents.includes('import')) {
- let isImportable = format => ['ova', 'ovf', 'vmx'].indexOf(format) !== -1;
+ let isImportable = format => ['ova', 'ovf', 'vmx', 'raw', 'qcow2', 'vmdk'].indexOf(format) !== -1;
let createGuestImportWindow = (selection) => {
if (!selection) {
return;
@@ -132,12 +132,20 @@ Ext.define('PVE.storage.Browser', {
let volumeName = selection.data.volid.replace(/^.*?:/, '');
- Ext.create('PVE.window.GuestImport', {
- storage: storeid,
- volumeName,
- nodename,
- autoShow: true,
- });
+ if (['raw', 'vmdk', 'qcow2'].indexOf(selection.data.format) !== -1) {
+ Ext.create('PVE.qemu.HDImportEdit', {
+ selection: selection.data.volid,
+ nodename,
+ autoShow: true,
+ });
+ } else {
+ Ext.create('PVE.window.GuestImport', {
+ storage: storeid,
+ volumeName,
+ nodename,
+ autoShow: true,
+ });
+ }
};
me.items.push({
xtype: 'pveStorageContentView',
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images
2025-04-08 12:13 ` [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images Dominik Csapak
@ 2025-04-08 15:34 ` Thomas Lamprecht
2025-04-09 7:10 ` Dominik Csapak
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Lamprecht @ 2025-04-08 15:34 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
Am 08.04.25 um 14:13 schrieb Dominik Csapak:
> By enabling the import button for qcow2/vmdk/raw files, and showing a
> window with a VMID selector and the disk edit panel.
>
functionality wise I'd have applied that as it would be new and have thus
almost no regression potential, might be also better to factor out the
panel upfront in a dedicated commit and then integrate it everywhere.
But lets wait this out, no point in rushing things here.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI
2025-04-08 12:13 [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI Dominik Csapak
` (2 preceding siblings ...)
2025-04-08 12:13 ` [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images Dominik Csapak
@ 2025-04-08 15:44 ` Michael Köppl
2025-04-10 12:04 ` Lukas Wagner via pve-devel
[not found] ` <c7b3dfb5-89aa-4f42-927d-08475d17e7f0@proxmox.com>
5 siblings, 0 replies; 13+ messages in thread
From: Michael Köppl @ 2025-04-08 15:44 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
On 4/8/25 14:13, Dominik Csapak wrote:
> this is a continuation of my previous series [0]
>
> It enables importing disks on the UI in the HardwareView of a vm,
> in the create wizard, and in the storage content view.
>
> I split the patches so that the wizard and storage content view one are
> separate, so they can be reviewed independently.
>
> changes from v6:
> * drop applied patches
> * make import in hd edit panel dependant on configuration, instead of
> showing a checkbox
> * wizard and HardwareView got an explicit import button
> * make the import button work on the storage content view for disk
> images
> * split patches for hdedit, wizard and storage content
>
> 0: https://lore.proxmox.com/pve-devel/20250407101310.3196974-1-d.csapak@proxmox.com/
Hi,
tested this by creating disk images from existing VMs and importing them
in the following ways:
- during creation of a VM in the CreateWizard
- through the Hardware view of an existing VM, then changing the boot
order to boot from the imported disk
- from the storage content view; uploaded a disk image and imported into
an existing VM from there
- imported with IDE, SATA, SCSI, and VirtIO controllers
- imported qcow2, vmdk, and raw disk images
The tested cases worked as I would expect and I was able to create and
start VMs with the given images. Creating multiple new VMs with imported
disks in parallel did slow down the creation considerably, but otherwise
worked without problems for me. I also tried adding, removing, changing
disks in the CreateWizard to see if I could get around the constraints
set for the new selectors. The UI part was overall intuitive to use.
I pondered a bit on the icon chosen for the import, but would could not
really find a more fitting one. Maybe someone else has a stronger
opinion on this?
So please consider this:
Reviewed-by: Michael Köppl <m.koeppl@proxmox.com>
Tested-by: Michael Köppl <m.koeppl@proxmox.com>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images
2025-04-08 15:34 ` Thomas Lamprecht
@ 2025-04-09 7:10 ` Dominik Csapak
2025-04-10 11:39 ` Gilberto Ferreira via pve-devel
0 siblings, 1 reply; 13+ messages in thread
From: Dominik Csapak @ 2025-04-09 7:10 UTC (permalink / raw)
To: Thomas Lamprecht, Proxmox VE development discussion
On 4/8/25 17:34, Thomas Lamprecht wrote:
> Am 08.04.25 um 14:13 schrieb Dominik Csapak:
>> By enabling the import button for qcow2/vmdk/raw files, and showing a
>> window with a VMID selector and the disk edit panel.
>>
> functionality wise I'd have applied that as it would be new and have thus
> almost no regression potential, might be also better to factor out the
> panel upfront in a dedicated commit and then integrate it everywhere.
>
> But lets wait this out, no point in rushing things here.
Sure, don't rush this. Is there anything concrete you'd want to do have done differently
here though?
Even for the import storage content I'd really like to reuse the general disk edit panel
(for e.g. the detection of which bus/controller is used, etc.), so the regression potential
would be no different even if we'd only show it in the storage content.
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images
2025-04-09 7:10 ` Dominik Csapak
@ 2025-04-10 11:39 ` Gilberto Ferreira via pve-devel
2025-04-10 12:04 ` Dominik Csapak via pve-devel
0 siblings, 1 reply; 13+ messages in thread
From: Gilberto Ferreira via pve-devel @ 2025-04-10 11:39 UTC (permalink / raw)
To: Proxmox VE development discussion; +Cc: Gilberto Ferreira, Thomas Lamprecht
[-- Attachment #1: Type: message/rfc822, Size: 7077 bytes --]
From: Gilberto Ferreira <gilberto.nunes32@gmail.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Cc: Thomas Lamprecht <t.lamprecht@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images
Date: Thu, 10 Apr 2025 08:39:58 -0300
Message-ID: <CAOKSTBsFSWxePJzuVY2UvWioNdrDOOHXyhjmAVBTYN9HtjbfAQ@mail.gmail.com>
Hi folks.
I tried this feature in the new Proxmox VE 8.4, I just can upload vmdk,
qcow2 and raw file.
Tried vhd and vdi and no luck.
And I can't use the uploaded file to import the image and create a new VM.
Is that supposed to be this way, at least for now?
Is there any further development to be done?
I suppose this is not a bug, right? But, instead, something to fully
implement in next upgrades.
Cheers.
---
Gilberto Nunes Ferreira
+55 (47) 99676-7530 - Whatsapp / Telegram
Em qua., 9 de abr. de 2025 às 04:10, Dominik Csapak <d.csapak@proxmox.com>
escreveu:
> On 4/8/25 17:34, Thomas Lamprecht wrote:
> > Am 08.04.25 um 14:13 schrieb Dominik Csapak:
> >> By enabling the import button for qcow2/vmdk/raw files, and showing a
> >> window with a VMID selector and the disk edit panel.
> >>
> > functionality wise I'd have applied that as it would be new and have thus
> > almost no regression potential, might be also better to factor out the
> > panel upfront in a dedicated commit and then integrate it everywhere.
> >
> > But lets wait this out, no point in rushing things here.
>
> Sure, don't rush this. Is there anything concrete you'd want to do have
> done differently
> here though?
>
> Even for the import storage content I'd really like to reuse the general
> disk edit panel
> (for e.g. the detection of which bus/controller is used, etc.), so the
> regression potential
> would be no different even if we'd only show it in the storage content.
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI
2025-04-08 12:13 [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI Dominik Csapak
` (3 preceding siblings ...)
2025-04-08 15:44 ` [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI Michael Köppl
@ 2025-04-10 12:04 ` Lukas Wagner via pve-devel
[not found] ` <c7b3dfb5-89aa-4f42-927d-08475d17e7f0@proxmox.com>
5 siblings, 0 replies; 13+ messages in thread
From: Lukas Wagner via pve-devel @ 2025-04-10 12:04 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak; +Cc: Lukas Wagner
[-- Attachment #1: Type: message/rfc822, Size: 3854 bytes --]
From: Lukas Wagner <l.wagner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>, Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI
Date: Thu, 10 Apr 2025 14:04:05 +0200
Message-ID: <c7b3dfb5-89aa-4f42-927d-08475d17e7f0@proxmox.com>
On 2025-04-08 14:13, Dominik Csapak wrote:
> this is a continuation of my previous series [0]
>
> It enables importing disks on the UI in the HardwareView of a vm,
> in the create wizard, and in the storage content view.
>
> I split the patches so that the wizard and storage content view one are
> separate, so they can be reviewed independently.
>
Gave this a quick test on the latest pve-manager master branch. Seems to work as advertised.
Tried importing from the Create-VM wizard, by going to the Hardware tab a VM as well
as from the storage view itself.
Noticed that under "Download from URL" there is no way to automatically extract compressed
images the same way as we do it for ISO images. Is there some technical reason for this?
Or is it just not implemented yet? Anyway, would be a nice addition for a
future patch series :)
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
--
- Lukas
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images
2025-04-10 11:39 ` Gilberto Ferreira via pve-devel
@ 2025-04-10 12:04 ` Dominik Csapak via pve-devel
2025-04-10 12:13 ` Gilberto Ferreira via pve-devel
2025-04-10 12:25 ` Gilberto Ferreira via pve-devel
0 siblings, 2 replies; 13+ messages in thread
From: Dominik Csapak via pve-devel @ 2025-04-10 12:04 UTC (permalink / raw)
To: pve-devel; +Cc: Dominik Csapak
[-- Attachment #1: Type: message/rfc822, Size: 3600 bytes --]
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images
Date: Thu, 10 Apr 2025 14:04:30 +0200
Message-ID: <3b00d216-959b-45f3-85cd-e06c571284ec@proxmox.com>
On 4/10/25 13:39, Gilberto Ferreira via pve-devel wrote:
> Hi folks.
Hi
> I tried this feature in the new Proxmox VE 8.4, I just can upload vmdk,
> qcow2 and raw file.
> Tried vhd and vdi and no luck.
> And I can't use the uploaded file to import the image and create a new VM.
> Is that supposed to be this way, at least for now?
> Is there any further development to be done?
> I suppose this is not a bug, right? But, instead, something to fully
> implement in next upgrades.
Yes, we held off on applying the remaining UI patches for now since it was too close to
the release.
FYI, you can use the uploaded images via the api or cli already, no need to wait
for the gui patches, see my other docs patch (not yet applied) for details:
https://lore.proxmox.com/all/20250408142239.3527806-1-d.csapak@proxmox.com/
as for vhd,vdi not sure if we'll support that, it would require a bit more work
to support this (if you want you can open an enhancement request on our bugzilla,
best with examples where such images are offered)
>
> Cheers.
Best regards
Dominik
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI
[not found] ` <c7b3dfb5-89aa-4f42-927d-08475d17e7f0@proxmox.com>
@ 2025-04-10 12:06 ` Dominik Csapak via pve-devel
0 siblings, 0 replies; 13+ messages in thread
From: Dominik Csapak via pve-devel @ 2025-04-10 12:06 UTC (permalink / raw)
To: Lukas Wagner, Proxmox VE development discussion; +Cc: Dominik Csapak
[-- Attachment #1: Type: message/rfc822, Size: 3467 bytes --]
From: Dominik Csapak <d.csapak@proxmox.com>
To: Lukas Wagner <l.wagner@proxmox.com>, Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI
Date: Thu, 10 Apr 2025 14:06:22 +0200
Message-ID: <2ace65d7-641d-422d-83e8-e31f24d10a63@proxmox.com>
On 4/10/25 14:04, Lukas Wagner wrote:
>
>
> On 2025-04-08 14:13, Dominik Csapak wrote:
>> this is a continuation of my previous series [0]
>>
>> It enables importing disks on the UI in the HardwareView of a vm,
>> in the create wizard, and in the storage content view.
>>
>> I split the patches so that the wizard and storage content view one are
>> separate, so they can be reviewed independently.
>>
>
> Gave this a quick test on the latest pve-manager master branch. Seems to work as advertised.
> Tried importing from the Create-VM wizard, by going to the Hardware tab a VM as well
> as from the storage view itself.
>
> Noticed that under "Download from URL" there is no way to automatically extract compressed
> images the same way as we do it for ISO images. Is there some technical reason for this?
> Or is it just not implemented yet? Anyway, would be a nice addition for a
> future patch series :)
yeah, it's just not implemented yet, but it totally makes sense to have in the future
Thanks for testing!
>
> Tested-by: Lukas Wagner <l.wagner@proxmox.com>
>
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images
2025-04-10 12:04 ` Dominik Csapak via pve-devel
@ 2025-04-10 12:13 ` Gilberto Ferreira via pve-devel
2025-04-10 12:25 ` Gilberto Ferreira via pve-devel
1 sibling, 0 replies; 13+ messages in thread
From: Gilberto Ferreira via pve-devel @ 2025-04-10 12:13 UTC (permalink / raw)
To: Proxmox VE development discussion; +Cc: Gilberto Ferreira
[-- Attachment #1: Type: message/rfc822, Size: 7686 bytes --]
From: Gilberto Ferreira <gilberto.nunes32@gmail.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images
Date: Thu, 10 Apr 2025 09:13:33 -0300
Message-ID: <CAOKSTBu08vAGYY78M4Et07-F20mZn-kZCq2QQChrMD=rL6CYzQ@mail.gmail.com>
Thank you, for the clarification.
Regards
---
Gilberto Nunes Ferreira
+55 (47) 99676-7530 - Whatsapp / Telegram
Em qui., 10 de abr. de 2025 às 09:05, Dominik Csapak via pve-devel <
pve-devel@lists.proxmox.com> escreveu:
>
>
>
> ---------- Forwarded message ----------
> From: Dominik Csapak <d.csapak@proxmox.com>
> To: pve-devel@lists.proxmox.com
> Cc:
> Bcc:
> Date: Thu, 10 Apr 2025 14:04:30 +0200
> Subject: Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage
> content: allow importing of vm disk images
> On 4/10/25 13:39, Gilberto Ferreira via pve-devel wrote:
> > Hi folks.
>
> Hi
>
> > I tried this feature in the new Proxmox VE 8.4, I just can upload vmdk,
> > qcow2 and raw file.
> > Tried vhd and vdi and no luck.
> > And I can't use the uploaded file to import the image and create a new
> VM.
> > Is that supposed to be this way, at least for now?
> > Is there any further development to be done?
> > I suppose this is not a bug, right? But, instead, something to fully
> > implement in next upgrades.
>
> Yes, we held off on applying the remaining UI patches for now since it was
> too close to
> the release.
>
> FYI, you can use the uploaded images via the api or cli already, no need
> to wait
> for the gui patches, see my other docs patch (not yet applied) for details:
> https://lore.proxmox.com/all/20250408142239.3527806-1-d.csapak@proxmox.com/
>
> as for vhd,vdi not sure if we'll support that, it would require a bit more
> work
> to support this (if you want you can open an enhancement request on our
> bugzilla,
> best with examples where such images are offered)
>
> >
> > Cheers.
>
> Best regards
> Dominik
>
>
>
>
>
> ---------- Forwarded message ----------
> From: Dominik Csapak via pve-devel <pve-devel@lists.proxmox.com>
> To: pve-devel@lists.proxmox.com
> Cc: Dominik Csapak <d.csapak@proxmox.com>
> Bcc:
> Date: Thu, 10 Apr 2025 14:04:30 +0200
> Subject: Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage
> content: allow importing of vm disk images
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images
2025-04-10 12:04 ` Dominik Csapak via pve-devel
2025-04-10 12:13 ` Gilberto Ferreira via pve-devel
@ 2025-04-10 12:25 ` Gilberto Ferreira via pve-devel
1 sibling, 0 replies; 13+ messages in thread
From: Gilberto Ferreira via pve-devel @ 2025-04-10 12:25 UTC (permalink / raw)
To: Proxmox VE development discussion; +Cc: Gilberto Ferreira
[-- Attachment #1: Type: message/rfc822, Size: 7990 bytes --]
From: Gilberto Ferreira <gilberto.nunes32@gmail.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images
Date: Thu, 10 Apr 2025 09:25:30 -0300
Message-ID: <CAOKSTBsm0Rtbmp014GWsv0Gz907ReXCjSbWg=efzqJXRoc2qNQ@mail.gmail.com>
Oh! I almost forgot.
About the vhd(x) image format, often we can use the disk2vhd Windows tool
to generate a disk clone from a running Windows system.
The import storage accepting the vhd(x) format will help in this case. I
think the same about vdi formats.
But, anyway, I will open an enhanced request in bugzila.
Cheers.
---
Gilberto Nunes Ferreira
+55 (47) 99676-7530 - Whatsapp / Telegram
Em qui., 10 de abr. de 2025 às 09:05, Dominik Csapak via pve-devel <
pve-devel@lists.proxmox.com> escreveu:
>
>
>
> ---------- Forwarded message ----------
> From: Dominik Csapak <d.csapak@proxmox.com>
> To: pve-devel@lists.proxmox.com
> Cc:
> Bcc:
> Date: Thu, 10 Apr 2025 14:04:30 +0200
> Subject: Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage
> content: allow importing of vm disk images
> On 4/10/25 13:39, Gilberto Ferreira via pve-devel wrote:
> > Hi folks.
>
> Hi
>
> > I tried this feature in the new Proxmox VE 8.4, I just can upload vmdk,
> > qcow2 and raw file.
> > Tried vhd and vdi and no luck.
> > And I can't use the uploaded file to import the image and create a new
> VM.
> > Is that supposed to be this way, at least for now?
> > Is there any further development to be done?
> > I suppose this is not a bug, right? But, instead, something to fully
> > implement in next upgrades.
>
> Yes, we held off on applying the remaining UI patches for now since it was
> too close to
> the release.
>
> FYI, you can use the uploaded images via the api or cli already, no need
> to wait
> for the gui patches, see my other docs patch (not yet applied) for details:
> https://lore.proxmox.com/all/20250408142239.3527806-1-d.csapak@proxmox.com/
>
> as for vhd,vdi not sure if we'll support that, it would require a bit more
> work
> to support this (if you want you can open an enhancement request on our
> bugzilla,
> best with examples where such images are offered)
>
> >
> > Cheers.
>
> Best regards
> Dominik
>
>
>
>
>
> ---------- Forwarded message ----------
> From: Dominik Csapak via pve-devel <pve-devel@lists.proxmox.com>
> To: pve-devel@lists.proxmox.com
> Cc: Dominik Csapak <d.csapak@proxmox.com>
> Bcc:
> Date: Thu, 10 Apr 2025 14:04:30 +0200
> Subject: Re: [pve-devel] [PATCH manager v7 3/3] ui: import storage
> content: allow importing of vm disk images
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2025-04-10 12:26 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-08 12:13 [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI Dominik Csapak
2025-04-08 12:13 ` [pve-devel] [PATCH manager v7 1/3] ui: qemu hd edit: allow importing a disk from the import storage Dominik Csapak
2025-04-08 12:13 ` [pve-devel] [PATCH manager v7 2/3] ui: vm create wizard: allow importing disks Dominik Csapak
2025-04-08 12:13 ` [pve-devel] [PATCH manager v7 3/3] ui: import storage content: allow importing of vm disk images Dominik Csapak
2025-04-08 15:34 ` Thomas Lamprecht
2025-04-09 7:10 ` Dominik Csapak
2025-04-10 11:39 ` Gilberto Ferreira via pve-devel
2025-04-10 12:04 ` Dominik Csapak via pve-devel
2025-04-10 12:13 ` Gilberto Ferreira via pve-devel
2025-04-10 12:25 ` Gilberto Ferreira via pve-devel
2025-04-08 15:44 ` [pve-devel] [PATCH manager v7 0/3] allow importing vm disk images on the UI Michael Köppl
2025-04-10 12:04 ` Lukas Wagner via pve-devel
[not found] ` <c7b3dfb5-89aa-4f42-927d-08475d17e7f0@proxmox.com>
2025-04-10 12:06 ` Dominik Csapak via pve-devel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal