Hide Forgot
Created attachment 1080014 [details] part of engine log generated during the processing of the request Description of problem: Misleading error message is printed as result of an attempt to change template of stopped (Down) vm: "There was an attempt to change VM values while the VM is not down. Please shut down the VM in order to modify these properties." Version-Release number of selected component (if applicable): 4.0 master, commit e94ce26 How reproducible: 100% Steps to Reproduce: 1. Create a template with two versions 2. Create a vm based on the first version of the template (and let that vm in down state) 3. Execute following rest request PUT /vms/{new-vm-id} <vm> <template id="{id-if-the-second-versiton-of-the-template}"/> </vm> Actual results: 400 Bad Request <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <fault> <reason>Operation Failed</reason> <detail>[There was an attempt to change VM values while the VM is not down. Please shut down the VM in order to modify these properties.]</detail> </fault> Expected results: Either real explanation of the reason why template can't be changed or the template of vm to be changed.
Does this happen in 3.6 as well?
Yes, it does.
The template can be changed for pool VMs only with additional requirement on keeping the template version chain. Patch improving the error message has been posted.
it would be interesting to unblock changing of the template for any thin && stateless VM. It should work
Fixed bug tickets must have version flags set prior to fixing them. Please set the correct version flags and move the bugs back to the previous status after this is corrected.
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.
Verified on version: 4.0.2.6-0.1.el7ev <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <fault> <reason>Operation Failed</reason> <detail>[Cannot edit VM. The Template can be changed for pool VMs only.]</detail> </fault>