On Tue, Sep 04, 2018 at 17:32:49 +0200, Gionatan Danti wrote:
Il 03-09-2018 13:14 Gionatan Danti ha scritto:
> Hi list,
> suppose I have an immutable (ie: due to a read-only snapshot) backing
> file.
>
> After creating an overlay file with "qemu-img create -f qcow2 -o
> backing_file=/path/to/immutable/file.img current.qcow2", libvirt
> refuse to start the virtual machine and exits with an error stating
> "Could not open backing file /path/to/immutable/file.img: Permission
> denied".
>
> From my understanding, libvirtd is trying to change the
> owner/permissions/selinux context of the backing file but, being it
> immutable, fails to start the VM. Is that the expected behavior?
>
> Thanks.
Hi all, any suggestion on the matter?
You forgot to specify the format of the backing file into the overlay
file (qemu-img option -F). Libvirt treats any unspecified format as raw
since it's not secure to do probing of the format.