Bug 922419

Summary: VM can not start after snapshot creation because qemu has insufficient permissions to open the disk image
Product: Red Hat Enterprise Virtualization Manager Reporter: David Jaša <djasa>
Component: vdsmAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED DUPLICATE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.2.0CC: abaron, amureini, bazulay, hateya, iheim, lpeer, ykaul
Target Milestone: ---   
Target Release: 3.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-17 10:43:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Jaša 2013-03-16 19:14:57 UTC
Description of problem:
VM can not start after snapshot creation because qemu has insufficient permissions to open the disk image.

DC type: iscsi
VM is created from template

Version-Release number of selected component (if applicable):
installed as sf9, upgraded to sf10 (both engine and hosts)

How reproducible:
always on this setup

Steps to Reproduce:
1. create the VM from template, run the VM, shut the VM down (all in PUP)
2. create the snapshot in the power user portal
3. try to run the VM
  
Actual results:
VM can not be run on either host, qemu log contains (with libvirt log level raised):
qemu-kvm: -drive file=/rhev/data-center/5849b030-626e-47cb-ad90-3ce782d831b3/ac1a77db-f916-4d1d-98b4-39aa0d2b0afe/images/40c6e5e0-cc13-49ab-ae1e-215a67e68dcb/d77b22d3-2ed3-4305-ad5b-cd15d6e19178,if=none,id=drive-virtio-disk0,format=qcow2,serial=40c6e5e0-cc13-49ab-ae1e-215a67e68dcb,cache=none,werror=stop,rerror=stop,aio=native: could not open disk image /rhev/data-center/5849b030-626e-47cb-ad90-3ce782d831b3/ac1a77db-f916-4d1d-98b4-39aa0d2b0afe/images/40c6e5e0-cc13-49ab-ae1e-215a67e68dcb/d77b22d3-2ed3-4305-ad5b-cd15d6e19178: Operation not permitted


Expected results:
VM runs just fine

Additional info:
disk permissions:
> [root@hyper01 ~]# ls -ldZ /rhev/data-center/5849b030-626e-47cb-ad90-3ce782d831b3/ac1a77db-f916-4d1d-98b4-39aa0d2b0afe/images/40c6e5e0-cc13-49ab-ae1e-215a67e68dcb/d77b22d3-2ed3-4305-ad5b-cd15d6e19178 
> lrwxrwxrwx. vdsm kvm unconfined_u:object_r:mnt_t:s0   /rhev/data-center/5849b030-626e-47cb-ad90-3ce782d831b3/ac1a77db-f916-4d1d-98b4-39aa0d2b0afe/images/40c6e5e0-cc13-49ab-ae1e-215a67e68dcb/d77b22d3-2ed3-4305-ad5b-cd15d6e19178 -> /dev/ac1a77db-f916-4d1d-98b4-39aa0d2b0afe/d77b22d3-2ed3-4305-ad5b-cd15d6e19178
> [root@hyper01 ~]# ls -ldZ /dev/ac1a77db-f916-4d1d-98b4-39aa0d2b0afe/d77b22d3-2ed3-4305-ad5b-cd15d6e19178
> lrwxrwxrwx. root root system_u:object_r:device_t:s0    /dev/ac1a77db-f916-4d1d-98b4-39aa0d2b0afe/d77b22d3-2ed3-4305-ad5b-cd15d6e19178 -> ../dm-39
> [root@hyper01 ~]# ls -ldZ /dev/dm-39
> brw-rw----. vdsm qemu system_u:object_r:fixed_disk_device_t:s0 /dev/dm-39

Comment 1 Ayal Baron 2013-03-17 10:43:18 UTC

*** This bug has been marked as a duplicate of bug 903248 ***