And of course - libvirtd daemon is restarted and running on both machines.

oneadmin@opennebula-host:~$ ps aux|grep libv
root      1010  0.0  0.0 852624  6612 ?        Sl   12:03   0:00 /usr/sbin/libvirtd -d -l
106       1107  0.0  0.0  25964   992 ?        S    12:03   0:00 /usr/sbin/dnsmasq -u libvirt-dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override
oneadmin  7053  0.0  0.0   9352   652 pts/0    S+   14:23   0:00 grep libv
oneadmin@opennebula-host:~$

oneadmin@nebula-3:~$ ps aux|grep libv
106       2439  0.0  0.0  25964   928 ?        S    10:09   0:00 /usr/sbin/dnsmasq -u libvirt-dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --listen-address 192.168.122.1 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override
root     19329  0.0  0.1 262560  5864 ?        Sl   12:14   0:00 /usr/sbin/libvirtd -d -l
oneadmin 19659  0.0  0.0   8072   648 pts/1    S+   12:22   0:00 grep libv
oneadmin@nebula-3:~$

Jan

----- Pôvodná správa -----
Predmet: Re: [one-users] Error when instantiating VM from image
Dátum: Wed, 20 Jun 2012 12:15:01 +0200
Od: Jan Benadik <jan.bena...@atos.net>
Odpoveď komu: jan.bena...@atos.net
Organizácia: Atos IT Solutions and Services s.r.o.
Pre: Jaime Melis <jme...@opennebula.org>
Kópia: cloud.b.lab <cloud.b....@zoho.com>, users@lists.opennebula.org


oneadminoneadmin@nebula-3:~$ ls -l `readlink -f  /var/lib/one/0/images/disk.1`
-rw-rw---- 1 oneadmin root 10737418241 Jun 20 10:57 /var/lib/one/images/9c52b90a79dba7c26a912d05ff5190b8
oneadmin@nebula-3:~$ id
uid=108(oneadmin) gid=115(cloud) groups=115(cloud),6(disk),105(kvm),111(libvirtd)
oneadmin@nebula-3:~$ grep -Ev '^($|#)' /etc/libvirt/qemu.conf
user = "oneadmin"
group = "cloud"
dynamic_ownership = 0
oneadmin@nebula-3:~$


Dňa 20.06.2012 11:23, Jaime Melis  wrote / napísal(a):
Hello Jan,

can you please revert to your initial conf (dyn_ownership = 0) and send us:

# something like this (the disk will have probably changed by now):
$ ls -l `readlink -f  /var/lib/one/5/images/disk.1`

and:
$ id
grep -Ev '^($|#)' /etc/libvirt/qemu.conf

can you confirm that libvirtd is running and restarted?

regards,
Jaime

On Wed, Jun 20, 2012 at 11:14 AM, Jan Benadik <jan.bena...@atos.net> wrote:
ad1)
- doesn't help, libvirtd daemon didn't start (dnsmasq only)
- yes - it is owned by oneadmin (but this is link only, original file is owned by oneadmin too)

ad2) - doesn't help

Still the same error message.


Jan

Dňa 20.06.2012 09:12, cloud.b.lab  wrote / napísal(a):
Jan,

This reply is from a ONE user.

Try after making following change:

1) In /etc/libvirt/libvirtd.conf set :

#unix_sock_group = "libvirtd"
unix_sock_group = "oneadmin"



Restart Libvirt-bin.

Also just check if the ownership of /var/lib/one/5/images/disk.1 is with oneadmin.

If that does't help try with following too
2) In /etc/libvirt/qemu.conf I have set
dynamic_ownership = 1

Regards,
Anil.

---- On Tue, 19 Jun 2012 23:32:43 -0700 Jan Benadik<jan.bena...@atos.net> wrote ----

Thanks for reply, but it doesn't help.
Still the same result ...:-(

Jan

Dňa 19.06.2012 19:06, Jaime Melis  wrote / napísal(a):
Hello,

You probably need to add oneadmin to the disk group.

Let us know if that doesn't work.

Cheers,
Jaime

On Mon, Jun 18, 2012 at 12:44 PM, Jan Benadik <jan.bena...@atos.net> wrote:
Hi all,

I have two machines with Ubuntu 12.04 Server ("central" and "host"), KVM hypervisor, Opennebula 3.2.1, shared /var/lib/one folder (nfs)
User "oneadmin" and group "cloud" has the same uid and gid on both systems, user oneadmin is a member of kvm and libvirtd group too.

In /etc/libvirt/libvirtd.conf I have set :
listen_tls = 0
listen_tcp = 1
unix_sock_group = "libvirtd"
unix_sock_ro_perms = "0777"
unix_sock_rw_perms = "0777"
unix_sock_dir = "/var/run/libvirt"
auth_unix_ro = "none"
auth_unix_rw = "none"

In /etc/libvirt/qemu.conf I have set :
- user = "oneadmin"
- group = "cloud"
- dynamic_ownership = 0

In /etc/apparmor.d/usr.sbin.libvirtd I have set:
/var/lib/one/** lrwk,

Daemon libvirtd is running on both machines.
Permissions for /var/lib/one folder are:
drwxr-xr-x 15 oneadmin root 4096 June 18 10:46 one

Permissions of folder /var/lib/one/images are:
drwsrws--T 2 oneadmin cloud 4096 June 18 10:46 images

Permissions of images are:
-rw-rw---- 1 oneadmin cloud     688914432  June 18 10:46 e9203521a014fd8045d64206277acaa6f
-rw-rw---- 1 oneadmin cloud 10737418241 June 18 10:46 6f2589756c6432563546cc36543c55465


Monitoring of host is working, but if I want to start VM, the folloving error is in /var/log/one/oned.log:
Mon Jun 18 10:17:56 2012 [DiM][I]: New VM state is ACTIVE.
Mon Jun 18 10:17:57 2012 [LCM][I]: New VM state is PROLOG.
Mon Jun 18 10:17:57 2012 [VM][I]: Virtual Machine has no context
Mon Jun 18 10:17:58 2012 [TM][D]: tm_clone.sh: seed:/var/lib/one/images/e9203521a14fd8045d64206277acaa6f myto:/var/lib/one/5/images/disk.0
Mon Jun 18 10:17:58 2012 [TM][D]: tm_clone.sh: DST: /var/lib/one/5/images/disk.0
Mon Jun 18 10:17:58 2012 [TM][I]: tm_clone.sh: Creating directory /var/lib/one/5/images
Mon Jun 18 10:17:58 2012 [TM][I]: tm_clone.sh: Executed "mkdir -p /var/lib/one/5/images".
Mon Jun 18 10:17:58 2012 [TM][I]: tm_clone.sh: Executed "chmod a+w /var/lib/one/5/images".
Mon Jun 18 10:17:58 2012 [TM][I]: tm_clone.sh: Cloning /var/lib/one/images/e9203521a14fd8045d64206277acaa6f
Mon Jun 18 10:17:58 2012 [TM][I]: tm_clone.sh: Executed "cp -r /var/lib/one/images/e9203521a14fd8045d64206277acaa6f /var/lib/one/5/images/disk.0".
Mon Jun 18 10:17:58 2012 [TM][I]: tm_clone.sh: Executed "chmod a+rw /var/lib/one/5/images/disk.0".
Mon Jun 18 10:17:58 2012 [TM][I]: ExitCode: 0
Mon Jun 18 10:17:58 2012 [TM][I]: tm_ln.sh: Creating directory /var/lib/one/5/images
Mon Jun 18 10:17:58 2012 [TM][I]: tm_ln.sh: Executed "mkdir -p /var/lib/one/5/images".
Mon Jun 18 10:17:58 2012 [TM][I]: tm_ln.sh: Executed "chmod a+w /var/lib/one/5/images".
Mon Jun 18 10:17:58 2012 [TM][I]: tm_ln.sh: Link /var/lib/one/images/6f540e1c32177f6e5f5cc9a51bc42408
Mon Jun 18 10:17:58 2012 [TM][I]: tm_ln.sh: Executed "ln -s /var/lib/one/images/6f540e1c32177f6e5f5cc9a51bc42408 /var/lib/one/5/images/disk.1".
Mon Jun 18 10:17:58 2012 [TM][I]: ExitCode: 0
Mon Jun 18 10:18:04 2012 [LCM][I]: New VM state is BOOT
Mon Jun 18 10:18:04 2012 [VMM][I]: Generating deployment file: /var/lib/one/5/deployment.0
Mon Jun 18 10:18:04 2012 [VMM][I]: ExitCode: 0
Mon Jun 18 10:18:04 2012 [VMM][I]: Successfully execute network driver operation: pre.
Mon Jun 18 10:18:07 2012 [VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy /var/lib/one/5/images/deployment.0 myto 5 myto
Mon Jun 18 10:18:07 2012 [VMM][I]: error: Failed to create domain from /var/lib/one/5/images/deployment.0
Mon Jun 18 10:18:07 2012 [VMM][I]: error: internal error process exited while connecting to monitor: kvm: -drive file=/var/lib/one/5/images/disk.1,if=none,id=drive-ide0-0-0,format=raw: could not open disk image /var/lib/one/5/images/disk.1: Permission denied
Mon Jun 18 10:18:07 2012 [VMM][I]:
Mon Jun 18 10:18:07 2012 [VMM][E]: Could not create domain from /var/lib/one/5/images/deployment.0
Mon Jun 18 10:18:07 2012 [VMM][I]: ExitCode: 255
Mon Jun 18 10:18:07 2012 [VMM][I]: Failed to execute virtualization driver operation: deploy.
Mon Jun 18 10:18:07 2012 [VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one/5/images/deployment.0
Mon Jun 18 10:18:12 2012 [DiM][I]: New VM state is FAILED

I dont knew where is issue - could somebody help me?

Thx
--
Jan Benadik
+421 46 5151 332
+421 903 691 634
jan.bena...@atos.net
Vinohradn cka 6, 971 01 Prievidza
www.sk.atos.net
__________________________________



_______________________________________________
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org




--
Jaime Melis
Project Engineer
OpenNebula - The Open Source Toolkit for Cloud Computing
www.OpenNebula.org | jme...@opennebula.org

--

Ján Beňadik
Managed Services - Solution Design Architect
+421 46 5151 332
+421 903 691 634
jan.bena...@atos.net
Vinohradnícka 6, 971 01 Prievidza
www.sk.atos.net
__________________________________


_______________________________________________
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


--

Ján Beňadik
Managed Services - Solution Design Architect
+421 46 5151 332
+421 903 691 634
jan.bena...@atos.net
Vinohradnícka 6, 971 01 Prievidza
www.sk.atos.net
__________________________________





--
Jaime Melis
Project Engineer
OpenNebula - The Open Source Toolkit for Cloud Computing
www.OpenNebula.org | jme...@opennebula.org

--

Ján Beňadik
Managed Services - Solution Design Architect
+421 46 5151 332
+421 903 691 634
jan.bena...@atos.net
Vinohradnícka 6, 971 01 Prievidza
www.sk.atos.net
__________________________________



--

Ján Beňadik
Managed Services - Solution Design Architect
+421 46 5151 332
+421 903 691 634
jan.bena...@atos.net
Vinohradnícka 6, 971 01 Prievidza
www.sk.atos.net
__________________________________


_______________________________________________
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

Reply via email to