[pve-devel] qemu-server : add new qm import_disk feature

Fabian Gr├╝nbichler f.gruenbichler at proxmox.com
Thu Jan 19 11:21:55 CET 2017


On Thu, Jan 19, 2017 at 10:24:17AM +0100, Alexandre DERUMIER wrote:
> The problem with 1),
> 
> it's that users don't have always local file storage space. 
> (for example, they have only small local disk and disks are on a san, or they have big lvmthin storage but no space for files)
> 
> My students/customers generaly export image on usb drive or network share,
> 

the directory storage does not have to be local (e.g., a CIFS or NFS
share mounted locally works just fine) - "local" is just the default PVE
one.

> and don't known nothing about directory structure (/images/vmid/vm-ID-whatever)
> and don't want to define a storage for this in proxmox configuration.

well... you can't have your cake and eat it too? or in other words,
nothing in life is free..

if you add your mounted USB drive / network share / ..  as directory
storage, it will even add the directory structure and you just need to
move the disk image..

alternatively, but I would only recommend this temporary while
importing, you can use a symlink instead of moving/copying the disk
image. then you neither need to add a new (temporary) storage, nor do
you need to copy (with all the space and time requirements). a simply
"ln -s" (again, with the right target name and location!) followed by
"qm rescan -vmid ID" is enough. after using move disk, don't forget to
remove the symlink to prevent accidents. (removing the unused source
disk in PVE should only remove the symlink, but I would not rely on
this!)

> I'm more to implement root permission only and add some regex for paths. (CLI only is enough)

if you mean a whitelist regex of acceptable paths, I don't really see
the advantage compared to the existing whitelist of "put it on a
storage with an accepted name". adding a blacklist does not help at all?



More information about the pve-devel mailing list