[pve-devel] Feature idea: import cloud images as disks, or at VM creation

Gilou contact+dev at gilouweb.com
Tue Apr 25 21:34:19 CEST 2023


Le 24/04/2023 à 11:00, Fabian Grünbichler a écrit :
> On April 24, 2023 10:01 am, DERUMIER, Alexandre wrote:
>> I think it could be done with some kind of new naming for this kind of
>> disk,
>>
>> like "template-....."  in the storage
>>
>> to match current lxc behaviour.
>>
>>
>> I don't think we need to vm template itself inside this, only the disk.
>>
>> then use could create a vm like
>>
>> qm create <vmid> --iscsi0:template-.....
> 
> we basically already have this, it's just not yet on the GUI ;)
> 
> $ qm create/set 123 --scsi0 TARGET_STORAGE:0,import-from=SOURCE_STORAGE:VOLUME,other_option=value >
> will import an existing volume (or, if highly privileged, arbitrary
> image/block device) to a newly allocated volume on TARGET_STORAGE.

That is cool… I'll look into it, my goal being that it can be done 
without requiring neither root at pam nor even SSH.

> 
> also mentioned in the docs for cloud-init:
> 
> https://pve.proxmox.com/pve-docs/chapter-qm.html#_preparing_cloud_init_templates

I won't blame (or git blame) the doc, I missed it ;)
> 
> we haven't fully hashed out yet how to integrate it into the GUI, but
> it's already available on the API and CLI.
> 
> one part that might still be worth of discussion is whether to add a new
> dir or naming scheme on storages for VM template files like downloaded
> cloud(-init) images, and then on the GUI only offer up those and volumes
> of VM templates as sources (at least by default), instead of *all*
> images accessible to the user.

I wouldn't mind having ISO images renamed as ISO/Cloud images or 
something, and letting .raw and .qcow2 go through (.img are allowed 
already). I haven't tried just faking the extension though…

However, it's not the same kind as iso regarding performance and volume 
potentially. I usually just use raw image to avoid decompression, and 
templates can grow heavy… Maybe a separate category is more work, but 
would end up being clearer.

Public / curated repos can be a next step, but already having a GUI to 
jumpstart a VM (with or without cloud-init btw, if you just use DHCP or 
so to provision, you can be very happy there, and other technologies 
could be packed in the template with the same provisionning goal)

I'm glad I put that back on my list, this will make a difference for 
self-service providers…

Cheers,
Gilou






More information about the pve-devel mailing list