Bug 1338943

Summary: VM Snapshot can't be cloned to new VM
Product: [oVirt] ovirt-engine Reporter: jniederm
Component: BLL.VirtAssignee: jniederm
Status: CLOSED CURRENTRELEASE QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: high    
Version: 3.6.5CC: bugs, mgoldboi, michal.skrivanek, pspacek, stirabos, tjelinek
Target Milestone: ovirt-3.6.7Flags: rule-engine: ovirt-3.6.z+
mgoldboi: planning_ack+
tjelinek: devel_ack+
mavital: testing_ack+
Target Release: 3.6.7.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When creating new VM from VM snapshot usign "Clone" action: * Custom properties either inherited from snapshot or edited by user in "Clone VM from Snapshot" dialog was not applied to new VM. * "VmCreator" role was not sufficient to create (clone) VM from snapshot. Error popup was shown with message "User is not authorized to perform this action." after "Clone VM from Snapshot" dialog was confirmed. Both problems fixed
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-04 12:29:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1213937    

Description jniederm 2016-05-23 16:55:51 UTC
Description of problem:
Creating a VM from VM snapshot fails with error popup "User is not authorized to perform this action." if the user is not admin@userportal and has only role VmCreator.

Version-Release number of selected component (if applicable):
3.6.5, also tested on master (commit 6a84511)

How reproducible:
100%

Steps to Reproduce:
1. Create a VM
2. Create a snapshot of the VM
3. Pick a user and assign him system-wide role 'VmCreator', 'SuperUser' role for some unrelated VM (just to allow him to log in Webadmin) and make sure he has no other permissions.
4. Log to webadmin using user above.
5. Clone snapshot (step 2) to new VM
6. In "Clone VM from Snapshot" dialog set name only and press "OK".

Actual results:
Error dialog pops up: 
Operation canceled
Error while executing action:
<vm-name>:
    User is not authorized to perform this action.

Expected results:
VM is created.

Additional info:
It actually turned out that no user (even admin@internal) can adjust custom properties in "Clone VM from Snapshot" dialog.

Steps to reproduce:
(from Webadmin as admin@internal)
1. Create VM
2. Create a snapshot of the VM
3. Select "Clone" on the snapshot
4. Adjust Custom properties in "Clone VM from Snapshot" dialog
5. Confirm dialog wiht "OK"
6. Check custom properties of newly created VM in Edit VM dialog

Actual results:
no custom properties

Expected results:
Custom properties set in "Clone VM from Snapshot" dialog are reflected to the VM.

Comment 1 Red Hat Bugzilla Rules Engine 2016-05-23 16:55:57 UTC
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.

Comment 2 Tomas Jelinek 2016-05-24 07:13:02 UTC
no, not modified - on more backport needed

Comment 4 meital avital 2016-06-23 07:21:08 UTC
Verified on version: 3.6.7.2-0.1.el6