Created attachment 1128288 [details] engine and vdsm logs Description of problem: When exporting a vm that was originally cloned as thin copy from template and discard snapshot attribute is set to 'false' should not be allowed because it is impossible to import that template back to the environment: "Cannot import and collapse VM, Template is missing in domain export_domain". Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Create vm from template as thin copy 2. Export the vm from REST using [1] in 'Additional info' (do not remove the source vm) 3. Try to import the vm Actual results: Expected results: Additional info: [1] <action> <async>false</async> <grace_period> <expiry>10</expiry> </grace_period> <storage_domain> <name>export_domain</name> </storage_domain> <discard_snapshots>false</discard_snapshots> <exclusive>false</exclusive> </action>
(In reply to ratamir from comment #0) > Description of problem: > When exporting a vm that was originally cloned as thin copy from template > and discard snapshot attribute is set to 'false' should not be allowed > because it is impossible to import that template back to the environment: > "Cannot import and collapse VM, Template is missing in domain export_domain". Have you attempted to import without collapsing?
Yes and see the same behavior
(In reply to ratamir from comment #2) > Yes and see the same behavior Logs please?
Allon, Sorry but I thought I was able to do this. It is impossible to import without collapse snapshot only if I'm removing the source vm before the import
Hi Allon, Is there any good reason why not fixing this bug? In case I'm creating a vm from template and thin copy and export it, I can't import it again.
(In reply to ratamir from comment #5) > Hi Allon, > Is there any good reason why not fixing this bug? > In case I'm creating a vm from template and thin copy and export it, I can't > import it again. Sure you can - just export and import the template too.
Or (options from my POV) 1. we can block the option to export thin copy unless the template is already imported 2. give warning message that in order to import the vm we need to export the template and import it first as well. question- what happens in case I want to import to the same domain which already has the template? do I need to export import as well?
(In reply to Aharon Canan from comment #7) > Or (options from my POV) > 1. we can block the option to export thin copy unless the template is > already imported Doesn't make any sense. > 2. give warning message that in order to import the vm we need to export the > template and import it first as well. We don't nanny the user. > > question- > what happens in case I want to import to the same domain which already has > the template? do I need to export import as well? Don't understand the question - please clarify.