Hide Forgot
Stateless VM snapshot gets deleted when user shuts down VM in a Manual Pool type Description of problem: When user shuts down a VM from a Manual Pool, the snapshot created gets deleted without the intervention of the admin user, meaning, the admin user won't put the VM into the pool again leaving the VM ready for the user to re-take it and continue with his work later. Version-Release number of selected component (if applicable): RHEV-M: rhevm-3.5.3.1-1.4.el6ev.noarch RHEV-H: Red Hat Enterprise Virtualization Hypervisor release 6.6 (20150603.0.el6ev) vdsm: vdsm-4.16.20-1.el6ev.x86_64 How reproducible: 100% Steps to Reproduce: 1. Create a Windows VM, install the required software on it and sysprep 2. Make a template from the previous VM 3. Make a Pool based on the earlier template - Select template - Define the Pool name - Define the VM count - Define Manual as type - Under initial run, configure a domain - USB support: enable 4. Once the VMs are created, the admin starts them and completes the sysprep procedure 5. Once it is done, the admin user shuts them off 6. Define the amount of pre-started VMs 7. The system creates the required snapshots and starts the pre-started VMs 8. Set up permissions on the pool to a users group Actual results: After the initial configuration, if a user shuts down a VM, and the admin user doesn't move back the VM to the pool, the system deletes the snapshot and keeps the permissions between the user and the VM. When the user starts the VM back, there is no new data on the image which was previously written. Also, it doesn't create a new snapshot for the VM which leaves the VM to use the base image. Expected results: In a manual pool type, if the admin user doesn't return back the VM to the pool, the written snapshot should retain the information and boot back from it till the VM gets back to the pool, in that case the snapshot should be deleted. The base image should not be used on these operations. Additional info: Will add relevant logs (engine.log and vdsm.log)
Simpler way to reproduce: 1. Create a VM and add a disk to it. 2. Create a template based on the VM above. 3. Create a Manual Pool based on the template above. 4. Enter User Portal. 5. Take a VM from the Pool and run it. 6. Return back to Admin Portal. 7. Ensure the user have taken ownership on the VM and new snapshot was created. 8. Shutdown the VM. Actual result: The snapshot is deleted after the VM goes down. Expected result: The snapshot is preserved after the VM goes down. It is deleted only after admin removes user's permission on the VM.
Verified on rhevm-3.6.0-0.18.el6.noarch according to steps in comment 5: 1. Create a VM and add a disk to it. 2. Create a template based on the VM above. 3. Create a Manual Pool based on the template above. 4. Enter User Portal. 5. Take a VM from the Pool and run it. 6. Return back to Admin Portal. 7. Ensure the user have taken ownership on the VM and new snapshot was created. 8. Shutdown the VM. Got the expected results: After shutting down the vm, snapshot still exits and user permission still exists. After removing the user permission, snapashot is deleted.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2016-0376.html