lxd icon indicating copy to clipboard operation
lxd copied to clipboard

Launch an instance from image in different project

Open kamzar1 opened this issue 2 years ago • 2 comments

With introduction of virtual machines, size of published images can easily exceed 5GB, especially those of windows.

https://github.com/lxc/lxd/issues/10009 now allow you to copy images within projects, yet it would save time and resources, when you could launch an instance directly from an image located in another project.

It could be any source project or a dedicated one, holding all those large images and serve as image/profile template project.

As images have their own set of profiles, it would make it easier to inherit those profiles from any other project or at least the ability to copy or share profiles among projects.

kamzar1 avatar Mar 19 '22 03:03 kamzar1

It's a bit tricky from a security point of view and will need some API changes to allow it. The fact that images can be tied to profiles in their project is actually a problem too as an instance cannot be tied to a profile from another project.

In general, we'd much rather people copy the image into their project and launch it from there. There is no resource duplication other than the few bytes it takes for another DB entry. Image files are stored by hash so the same image in multiple projects still only exists once on disk.

stgraber avatar Mar 19 '22 03:03 stgraber

I understand your point. Also the fear of having multiple copies of same image seems to be groundless. Right now, a project can either inherit all profiles/images from default with no own assets or having only his own. Make it tricky sometimes copy and paste the profile among autonomous projects. I could imagine a 'community' project (non-default) with relaxed security policies serving as template to others.

kamzar1 avatar Mar 19 '22 04:03 kamzar1