[one-users] Failed to create Domain
Javier Fontan
jfontan at opennebula.org
Wed Jun 20 03:45:23 PDT 2012
Hello,
This is the working configuration I have in an Ubunutu 12.04:
* Packages:
openssh-client
openssh-server
libvirt-bin
qemu-kvm
ruby
* /etc/apparmor.d/local/usr.sbin.libvirtd
--8<------
/var/lib/one/** lrwk,
------>8--
* /etc/libvirt/qemu.conf
--8<------
# The user ID for QEMU processes run by the system instance.
#user = "root"
user = "oneadmin"
# The group ID for QEMU processes run by the system instance.
#group = "root"
group = "oneadmin"
# Whether libvirt should dynamically change file ownership
# to match the configured user/group above. Defaults to 1.
# Set to 0 to disable file ownership changes.
#dynamic_ownership = 1
dynamic_ownership = 0
------>8--
* /etc/libvirt/libvirtd.conf
--8<------
listen_tls = 0
listen_tcp = 1
unix_sock_group = "libvirtd"
unix_sock_rw_perms = "0770"
mdns_adv = 0
auth_unix_ro = "none"
auth_unix_rw = "none"
------>8--
* oneadmin extra groups
usermod -a -G libvirtd,kvm oneadmin
Make sure you restart all the daemons, reload apparmor and reload kvm
modules so thy have the correct permissions. Maybe is just easier to
restart the machine.
On Wed, Jun 20, 2012 at 12:15 PM, Mohamed Mohamed
<mohamed.mohamed at telecom-sudparis.eu> wrote:
> i executed these commands, the daemons were the same as you said,
> when i deployed the Vms failed again and the error shown in /var/log/libvirt/libvirtd.log is:
>
> 2012-06-20 10:09:51.702+0000: 25257: error : virCommandWait:2192 : internal error Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin /etc/default/qemu-kvm -help) status unexpected: exit status 1
>
>
> best,
> Mohamed
>
> ----- Mail original -----
> De: "Jaime Melis" <jmelis at opennebula.org>
> À: "Mohamed Mohamed" <mohamed.mohamed at telecom-sudparis.eu>
> Cc: "Users OpenNebula" <users at lists.opennebula.org>
> Envoyé: Mercredi 20 Juin 2012 12:05:42
> Objet: Re: [one-users] Failed to create Domain
>
> Can you do the following:
> 1) sudo ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable
> 2) sudo /etc/init.d/apparmor restart
> 3) sudo /etc/init.d/libvirt-bin restart
> 4) try deploying again
>
> (the name of the daemons may be different)
>
> Regards,
> Jaime
>
> On Wed, Jun 20, 2012 at 11:59 AM, Mohamed Mohamed
> <mohamed.mohamed at telecom-sudparis.eu> wrote:
>>
>> i disactivated apparmor and the command response is the following:
>>
>> $ grep -Ev '^($|#)' /etc/libvirt/qemu.conf
>> vnc_listen = "0.0.0.0"
>> user = "oneadmin"
>> group = "cloud"
>> dynamic_ownership = 0
>>
>> cheers,
>> Mohamed
>>
>> ________________________________
>> De: "Jaime Melis" <jmelis at opennebula.org>
>> À: "Mohamed Mohamed" <mohamed.mohamed at telecom-sudparis.eu>
>> Cc: "Users OpenNebula" <users at lists.opennebula.org>
>> Envoyé: Mercredi 20 Juin 2012 11:56:27
>>
>> Objet: Re: [one-users] Failed to create Domain
>>
>> Can you also send us:
>> $ grep -Ev '^($|#)' /etc/libvirt/qemu.conf
>>
>> Also, can you disable apparmor, to rule it out?
>>
>> PS: please use 'reply all' so everybody can benefit from these emails.
>>
>> cheers,
>> Jaime
>>
>> On Wed, Jun 20, 2012 at 11:51 AM, Mohamed Mohamed <mohamed.mohamed at telecom-sudparis.eu> wrote:
>>>
>>> The responses for the commands are the following:
>>> $ lsmod|grep kvm
>>> kvm_intel 137721 0
>>> kvm 415549 1 kvm_intel
>>>
>>> $ ls -l /dev/kvm
>>> crw-rw----+ 1 root kvm 10, 232 juin 20 10:53 /dev/kvm
>>>
>>> $ id oneadmin
>>> uid=115(oneadmin) gid=125(cloud) groupes=125(cloud),0(root),6(disk),27(sudo),116(ssh),126(libvirtd),127(kvm)
>>>
>>>
>>> regards,
>>> Mohamed
>>> ________________________________
>>> De: "Jaime Melis" <jmelis at opennebula.org>
>>> À: "Mohamed Mohamed" <mohamed.mohamed at telecom-sudparis.eu>
>>> Envoyé: Mercredi 20 Juin 2012 11:44:49
>>>
>>> Objet: Re: [one-users] Failed to create Domain
>>>
>>> Also, can you send us the output of the following commands?
>>>
>>> $ ls -l /dev/kvm
>>> $ id oneadmin
>>>
>>>
>>> On Wed, Jun 20, 2012 at 11:43 AM, Jaime Melis <jmelis at opennebula.org> wrote:
>>>>
>>>> Do you have the kvm kernel modules? If so, can you reload them and try again?
>>>>
>>>> You should see something like:
>>>>
>>>> $ lsmod|grep kvm
>>>> kvm_intel 125275 0
>>>> kvm 359932 1 kvm_intel
>>>>
>>>> regards,
>>>> Jaime
>>>>
>>>>> Could not access KVM kernel module: Permission denied
>>>>> failed to initialize KVM: Permission denied
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Jaime Melis
>>>> Project Engineer
>>>> OpenNebula - The Open Source Toolkit for Cloud Computing
>>>> www.OpenNebula.org | jmelis at opennebula.org
>>>
>>>
>>>
>>>
>>> --
>>> Jaime Melis
>>> Project Engineer
>>> OpenNebula - The Open Source Toolkit for Cloud Computing
>>> www.OpenNebula.org | jmelis at opennebula.org
>>>
>>
>>
>>
>> --
>> Jaime Melis
>> Project Engineer
>> OpenNebula - The Open Source Toolkit for Cloud Computing
>> www.OpenNebula.org | jmelis at opennebula.org
>>
>
>
>
> --
> Jaime Melis
> Project Engineer
> OpenNebula - The Open Source Toolkit for Cloud Computing
> www.OpenNebula.org | jmelis at opennebula.org
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
--
Javier Fontán Muiños
Project Engineer
OpenNebula - The Open Source Toolkit for Data Center Virtualization
www.OpenNebula.org | jfontan at opennebula.org | @OpenNebula
More information about the Users
mailing list