[pve-devel] Disk Image Upload

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Feb 18 13:35:36 CET 2016


Hi,

On Mon, Feb 15, 2016 at 02:25:04PM +0100, Timo Grodzinski wrote:
> Hi list,
>
> here is the patch for uploading and importing disk images to vms.
>
> - I have added an an 'Upload disk' button in the vm's hardware tab
> - It is also possible to upload gzipped image files, they will be extracted when file has extension '.gz'.
> - Because disk images can be huge, I have added an temp volume to dir and nfs storage plugins to store temporary disk image uploads. The temp upload storage can be configured in the datastore.cfg file.
>
> Any further recommendations?

So the one big question we have is why the upload button is supposed to
replace an existing disk. It would probably be easier to allocate a disk
as 'unusedX' which can then be added via the gui as usual after the
upload has completed.
Eg. currently deleting a disk already creates an 'unusedX' entry which
can be re-added via the gui, and for the implicit conversion happening
in this patch set the functionality is already provided by the
'Move Disk' button.
This would also avoid the temporary files, as you could store directly
to the storage and even optionally pipe it through gunzip.
Then there's also no question about when to delete the old disk, which
with the current patch set happens before allocating the new disk and
can thus leave you with a broken state. It's understandable why you'd
want this (ie to replace disks on volumes with no free space left). But
then what's to stop you from actually hitting the delete button before
uploading?

Currently you don't seem to allow uploading additional disks at all
(as in without replacing some existing entry), which IMHO seems like a
somewhat arbitrary restriction.
+        die "disk '$disk' does not exist\n" if !$conf->{$disk};

If you've been through these possibilities already it would be nice if
you could let us know the rationale behind the current choices.




More information about the pve-devel mailing list