Description of problem: When importing VM from an external provider, during "locked" VM, before copying disks phase, it is possible to make a template from that VM. This option should be blocked when VM is locked (when import is in copying disks phase, this option changed to grayed out). VM created from disk template will run with a corrupted disk image. Version-Release number of selected component (if applicable): ovirt-engine-4.0.2.2-0.1.el7ev vdsm-4.18.9-1.el7ev.x86_64 qemu-kvm-rhev-2.3.0-31.el7_2.20.x86_64 libvirt-client-1.2.17-13.el7_2.5.x86_64 sanlck-3.2.4-3.el7_2.x86_64 How reproducible: Consistently Steps to Reproduce: 1. import VM from an external provider. 2. Wait for padlock icon to appear on VM and make a template from this VM. 3. Actual results: Template is being created. VM created from this template failed to load because of missing boot parameters. Expected results: Make template option should be blocked during the import process. Additional info: Video capture of this issue attached. engine and vdsm logs attached.
Created attachment 1187525 [details] Video capture of this issue
Created attachment 1187529 [details] vdsm.log.gz
Created attachment 1187537 [details] engine.log.gz
Should be enough to add a validate() and updateActionAvailability() for VMs which are locked. Fix should be trivial, targeting to 4.1 and if it will all go well we may backport.
Verification builds: ovirt-engine-4.1.1-0.1.el7 libvirt-client-2.0.0-10.el7_3.4.x86_64 vdsm-4.19.4-1.el7ev.x86_64 qemu-kvm-rhev-2.6.0-28.el7_3.3.x86_64 sanlock-3.4.0-1.el7.x86_64 virt-v2v-1.32.7-3.el7_3.2.x86_64