[one-users] could not open disk image : Permission denied

Jaime Melis jmelis at c12g.com
Tue Dec 3 03:54:51 PST 2013


Hi,

Please reply to the mailing list as well.

If you keep those settings you will probably have problems with snapshots.

This is probably due to the NFS configuration.

cheers,
Jaime


On Tue, Dec 3, 2013 at 12:27 PM, Geeta Gulabani
<geeta.gulabani at kpoint.com>wrote:

> Hi Jaime,
>
> As per javier suggestions i tried reboot but it didnt work.
> But i changed the permissions in ./etc/libvirt/libvirtd.conf from oneadmin
> to root and it worked
>
>
> user  = "root"
> group = "root"
> dynamic_ownership = 0
>
>
> -- Geeta
>
>
> On Tue, Dec 3, 2013 at 4:42 PM, Jaime Melis <jmelis at c12g.com> wrote:
>
>> Hi Geeta,
>>
>> did it work after Javier and Marios's suggestions?
>>
>> cheers,
>> Jaime
>>
>>
>> On Tue, Nov 19, 2013 at 12:30 PM, Javier Fontan <jfontan at opennebula.org>wrote:
>>
>>> The images of the VM have mixed permissions (oneadmin and root).
>>>
>>>   * Make sure that oned is running as oneadmin, not root.
>>>   * qemu.conf is correct. Leave it like this and reboot kpkvm1. It may
>>> be that even that the configuration is OK libvirt/kvm modules are
>>> still trying to run as root and can not use files owned by oneadmin
>>> user.
>>>
>>> Cheers
>>>
>>>
>>>
>>> On Tue, Nov 19, 2013 at 9:59 AM, Geeta Gulabani
>>> <geeta.gulabani at kpoint.com> wrote:
>>> > Hi,
>>> >
>>> > My Environment :
>>> >
>>> > Frontend and host : centos 6.4
>>> > Opennebula version : 4.2
>>> >
>>> > Tue Nov 19 13:58:16 2013 [VMM][I]: Command execution fail: cat << EOT |
>>> > /var/tmp/one/vmm/kvm/deploy
>>> '/var/lib/one//datastores/0/58/deployment.0'
>>> > 'kpkvm1.gslab.com' 58 kpkvm1.gslab.com
>>> > Tue Nov 19 13:58:16 2013 [VMM][I]: error: Failed to create domain from
>>> > /var/lib/one//datastores/0/58/deployment.0
>>> > Tue Nov 19 13:58:16 2013 [VMM][I]: error: internal error process exited
>>> > while connecting to monitor: qemu-kvm: -drive
>>> >
>>> file=/var/lib/one//datastores/0/58/disk.0,if=none,id=drive-ide0-0-0,format=raw,cache=none:
>>> > could not open disk image /var/lib/one//datastores/0/58/disk.0:
>>> Permission
>>> > denied
>>> > Tue Nov 19 13:58:16 2013 [VMM][I]:
>>> > Tue Nov 19 13:58:16 2013 [VMM][E]: Could not create domain from
>>> > /var/lib/one//datastores/0/58/deployment.0
>>> > Tue Nov 19 13:58:16 2013 [VMM][I]: ExitCode: 255
>>> > Tue Nov 19 13:58:16 2013 [VMM][I]: Failed to execute virtualization
>>> driver
>>> > operation: deploy.
>>> > Tue Nov 19 13:58:16 2013 [VMM][E]: Error deploying virtual machine:
>>> Could
>>> > not create domain from /var/lib/one//datastores/0/58/deployment.0
>>> > Tue Nov 19 13:58:16 2013 [DiM][I]: New VM state is FAILED
>>> >
>>> > Here are some other details :
>>> >
>>> > [root at kpkvm1 56]# grep -vE '^($|#)' /etc/libvirt/qemu.conf
>>> > user  = "oneadmin"
>>> > group = "oneadmin"
>>> > dynamic_ownership = 0
>>> >
>>> >
>>> >
>>> > [root at kpkvm1 58]# grep -vE '^($|#)' /etc/libvirt/libvirtd.conf
>>> > [root at kpkvm1 58]#
>>> >
>>> >
>>> > [root at kpkvm1 58]# cat
>>> >
>>> /etc/polkit-1/localauthority/50-local.d/50-org.libvirt.unix.manage-opennebula.pkla
>>> > [Allow oneadmin user to manage virtual machines]
>>> > Identity=unix-user:oneadmin
>>> > Action=org.libvirt.unix.manage
>>> > #Action=org.libvirt.unix.monitor
>>> > ResultAny=yes
>>> > ResultInactive=yes
>>> > ResultActive=yes
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > [root at kpkvm1 58]# id oneadmin
>>> > uid=9869(oneadmin) gid=9869(oneadmin) groups=9869(oneadmin)
>>> >
>>> >
>>> > [root at kpkvm1 58]# cat /etc/libvirt/qemu.conf
>>> > user  = "oneadmin"
>>> > group = "oneadmin"
>>> > dynamic_ownership = 0
>>> >
>>> >
>>> > I tried changing dynamic_ownership to 1 , started libvirtd and oned and
>>> > again tried creating the vm
>>> > sudo -u oneadmin virsh -c qemu:///system create deployment.0
>>> > it gives the same error
>>> > error: Failed to create domain from deployment.0
>>> > error: internal error process exited while connecting to monitor:
>>> qemu-kvm:
>>> > -drive
>>> >
>>> file=/var/lib/one//datastores/0/58/disk.0,if=none,id=drive-ide0-0-0,format=raw,cache=none:
>>> > could not open disk image /var/lib/one//datastores/0/58/disk.0:
>>> Permission
>>> > denied
>>> >
>>> >
>>> >
>>> > Here are the libvirtd logs :
>>> >
>>> > 2013-11-19 08:52:21.246+0000: 8915: info : libvirt version: 0.10.2,
>>> package:
>>> > 18.el6_4.14 (CentOS BuildSystem <http://bugs.centos.org>,
>>> > 2013-09-19-19:15:27, c6b8.bsys.dev.centos.org)
>>> > 2013-11-19 08:52:21.246+0000: 8915: error : qemuMonitorOpenUnix:293 :
>>> failed
>>> > to connect to monitor socket: No such process
>>> > 2013-11-19 08:52:21.246+0000: 8915: error :
>>> qemuProcessWaitForMonitor:1768 :
>>> > internal error process exited while connecting to monitor: qemu-kvm:
>>> -drive
>>> >
>>> file=/var/lib/one//datastores/0/58/disk.0,if=none,id=drive-ide0-0-0,format=raw,cache=none:
>>> > could not open disk image /var/lib/one//datastores/0/58/disk.0:
>>> Permission
>>> > denied
>>> >
>>> >
>>> > [root at kpkvm1 58]# ls -lrt
>>> > total 6171016
>>> > -rw-r--r-- 1 oneadmin oneadmin 6318739456 Nov 19 13:58 disk.0
>>> > -rw-r--r-- 1 root     root         372736 Nov 19 13:58 disk.1
>>> > lrwxrwxrwx 1 root     root             35 Nov 19 13:58 disk.1.iso ->
>>> > /var/lib/one/datastores/0/58/disk.1
>>> > -rw-r--r-- 1 root     root            912 Nov 19 13:58 deployment.0
>>> > [root at kpkvm1 58]# sudo -u oneadmin virsh -c qemu:///system create
>>> > deployment.0
>>> > error: Failed to create domain from deployment.0
>>> > error: internal error process exited while connecting to monitor:
>>> qemu-kvm:
>>> > -drive
>>> >
>>> file=/var/lib/one//datastores/0/58/disk.0,if=none,id=drive-ide0-0-0,format=raw,cache=none:
>>> > could not open disk image /var/lib/one//datastores/0/58/disk.0:
>>> Permission
>>> > denied
>>> >
>>> >
>>> >
>>> > Can anybody help?
>>> >
>>> >
>>> > Regards,
>>> > Geeta.
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > Users mailing list
>>> > Users at lists.opennebula.org
>>> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>> >
>>>
>>>
>>>
>>> --
>>> Javier Fontán Muiños
>>> Developer
>>> OpenNebula - The Open Source Toolkit for Data Center Virtualization
>>> www.OpenNebula.org | @OpenNebula | github.com/jfontan
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opennebula.org
>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>
>>
>>
>>
>> --
>> Jaime Melis
>> C12G Labs - Flexible Enterprise Cloud Made Simple
>> http://www.c12g.com | jmelis at c12g.com
>>
>> --
>>
>> Confidentiality Warning: The information contained in this e-mail and
>> any accompanying documents, unless otherwise expressly indicated, is
>> confidential and privileged, and is intended solely for the person
>> and/or entity to whom it is addressed (i.e. those identified in the
>> "To" and "cc" box). They are the property of C12G Labs S.L..
>> Unauthorized distribution, review, use, disclosure, or copying of this
>> communication, or any part thereof, is strictly prohibited and may be
>> unlawful. If you have received this e-mail in error, please notify us
>> immediately by e-mail at abuse at c12g.com and delete the e-mail and
>> attachments and any copy from your system. C12G's thanks you for your
>> cooperation.
>>
>
>


-- 
Jaime Melis
C12G Labs - Flexible Enterprise Cloud Made Simple
http://www.c12g.com | jmelis at c12g.com

--

Confidentiality Warning: The information contained in this e-mail and
any accompanying documents, unless otherwise expressly indicated, is
confidential and privileged, and is intended solely for the person
and/or entity to whom it is addressed (i.e. those identified in the
"To" and "cc" box). They are the property of C12G Labs S.L..
Unauthorized distribution, review, use, disclosure, or copying of this
communication, or any part thereof, is strictly prohibited and may be
unlawful. If you have received this e-mail in error, please notify us
immediately by e-mail at abuse at c12g.com and delete the e-mail and
attachments and any copy from your system. C12G's thanks you for your
cooperation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20131203/605690fd/attachment-0002.htm>


More information about the Users mailing list