Michael Rebstock
2012-Aug-03 11:06 UTC
[libvirt-users] error deploying a vm: Operation not permitted
Dear Ladies and Gentleman, I am trying to deploy a virtual machine on a KVM host. I created a deployment file (see beneath) and a disk for this VM. As root I executed the following command: virsh create deployment.0 but then I get the following error message: error: Failed to create domain from deployment.0 error: cannot set ownership on /var/lib/one/datastores/0/15/disk.0: Operation not permitted What am I doing wrong? Thanks in advance. Best regards Michael Rebstock ######################### Content of the deployment file: <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>one-15</name> <memory>2097152</memory> <os> <type arch='i686'>hvm</type> <boot dev='hd'/> </os> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <source file='/var/lib/one/datastores/0/15/disk.0'/> <target dev='hda' bus='ide'/> <driver name='qemu' type='raw' cache='default'/> </disk> <interface type='bridge'> <source bridge='319er-vlan'/> <mac address='22:00:c0:ba:2a:64'/> </interface> </devices> <features> <acpi/> </features> </domain> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120803/4021b91e/attachment.htm>
Eric Blake
2012-Aug-03 16:34 UTC
[libvirt-users] error deploying a vm: Operation not permitted
On 08/03/2012 05:06 AM, Michael Rebstock wrote:> > but then I get the following error message: > > error: Failed to create domain from deployment.0 > > error: cannot set ownership on /var/lib/one/datastores/0/15/disk.0: > Operation not permittedWhat distro? If this is a Fedora-based distro, I would guess that this is a SELinux issue, where you haven't set up libvirt to know that you want to use /var/lib/one/datastores as a libvirt image repository, therefore it is labeled incorrectly and SELinux denies attempts to use it. If I'm right, then the solution would be to create a storage pool for that directory, so that libvirt will then know to alter the labeling of that directory and thus permit access to the images contained inside. [If you're using a debian-based distro, then the same comments probably apply to your appArmor setup, but I'm not as familiar with setting that up] -- Eric Blake eblake at redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 620 bytes Desc: OpenPGP digital signature URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120803/d1d75a89/attachment.sig>
Maybe Matching Threads
- Re: Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path
- Re: [libvirt] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path
- Re: [libvirt] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path
- Re: [libvirt] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path
- Re: [libvirt] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path