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 <[email protected]> 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@kpkvm1 56]# grep -vE '^($|#)' /etc/libvirt/qemu.conf > user = "oneadmin" > group = "oneadmin" > dynamic_ownership = 0 > > > > [root@kpkvm1 58]# grep -vE '^($|#)' /etc/libvirt/libvirtd.conf > [root@kpkvm1 58]# > > > [root@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@kpkvm1 58]# id oneadmin > uid=9869(oneadmin) gid=9869(oneadmin) groups=9869(oneadmin) > > > [root@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@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@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 > [email protected] > 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 [email protected] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
