[one-users] Failed to create VM domain

Valentin Bud valentin at hackaserver.com
Mon Sep 10 05:14:02 PDT 2012


Hi,

I have managed to get OpenNebula running on a CentOS 6.3 host.

First thing that comes in mind is polkit. I honestly don't remember the
exact error I have received but I do know that OpenNebula didn't work until
I have configure polkit.

# 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

Also qemu is configured to run under oneadmin user and group

# cat /etc/libvirt/qemu.conf | egrep "^user|^group"
user = "oneadmin"
group = "oneadmin"

Another problem I have encountered using libvirt installed from rpm is that
the VMs won't start complaining that some lsi device is missing if you use
IDE or SCSI disks. This is easy, just go with virtio devices. I think the
simplest way to setup this would be to edit /etc/one/oned.conf and change
DEFAULT_DEVICE_PREFIX.

DEFAULT_DEVICE_PREFIX = "vd"

Other than that I've had no problems. Well one more, but that's specific to
my environment. I user OpenNebula with RVM for Ruby and the init.d script
couldn't find the ruby executable. For everyone who's interested in this I
have added the RVM ruby path to $PATH in oned init.d script:

# Source function library.
. /etc/rc.d/init.d/functions

RETVAL=0
PATH=$PATH:/usr/local/rvm/rubies/ruby-1.8.7-p370/bin/

Oh, one more thing, I have installed OpenNebula 3.6 from source.

Good Will,
v

On Mon, Sep 10, 2012 at 11:25 AM, Virginia Martín-Rubio Pascual <
virginia.martinrubio at rediris.es> wrote:

> Hi,
>
> OpenNebula is running in CentOS 6.3.
>
> The /var/log/libvirt/qemu/one-9.log file doesn't exist in the host. When I
> create a virtual machine manually in the host (with virt-manager) a
> /var/log/libvirtt/qemu/newVM.log file is created, but when the virtual
> machine is created with OpenNebula, this file doesn't appear...
>
> The libvirtd.conf contains these lines:
>
> *log_level = 1*
> *log_filters="1:libvirt 1:util 1:qemu"*
> *log_outputs="1:file:/var/log/libvirt/libvirtd.log"*
>
>
> Cheers,
> Virginia.
>
> El 07/09/2012, a las 15:25, Valentin Bud escribió:
>
> Hi,
>
> What OS are you running OpenNebula on and what does
> /var/log/libvirt/qemu/one-9.log outputs?
>
> Good Will,
> v
>
> On Fri, Sep 7, 2012 at 4:06 PM, Virginia Martín-Rubio Pascual <
> virginia.martinrubio at rediris.es> wrote:
>
>> Hi,
>>
>> When I try to instantiate a VM template, I obtain this error:
>>
>> ...
>>
>> Fri Sep  7 14:48:27 2012 [DiM][I]: New VM state is ACTIVE.
>> Fri Sep  7 14:48:27 2012 [LCM][I]: New VM state is PROLOG.
>> Fri Sep  7 14:48:27 2012 [VM][I]: Virtual Machine has no context
>> Fri Sep  7 14:48:32 2012 [TM][I]: clone: Cloning ../../103/87a4fbf0be08256920937769ee8c8b9e in democrito.admin.rediris.es:/var/lib/one/datastores/0/9/disk.0
>> Fri Sep  7 14:48:32 2012 [TM][I]: ExitCode: 0
>> Fri Sep  7 14:51:24 2012 [TM][I]: clone: Cloning ../../104/274b59f9fd0b1c200cead63ad81c5035 in democrito.admin.rediris.es:/var/lib/one/datastores/0/9/disk.1
>> Fri Sep  7 14:51:24 2012 [TM][I]: ExitCode: 0
>> Fri Sep  7 14:51:24 2012 [LCM][I]: New VM state is BOOT
>> Fri Sep  7 14:51:24 2012 [VMM][I]: Generating deployment file: /var/lib/one/9/deployment.8
>> Fri Sep  7 14:51:25 2012 [VMM][I]: ExitCode: 0
>> Fri Sep  7 14:51:25 2012 [VMM][I]: Successfully execute network driver operation: pre.
>> Fri Sep  7 14:51:25 2012 [VMM][I]: Command execution fail: cat << EOT | /var/lib/one/remotes/vmm/kvm/deploy /var/lib/one/datastores/0/9/deployment.8 democrito.admin.rediris.es 9 democrito.admin.rediris.es
>> Fri Sep  7 14:51:25 2012 [VMM][I]: error: Failed to create domain from /var/lib/one/datastores/0/9/deployment.8
>> Fri Sep  7 14:51:25 2012 [VMM][I]: error: An error occurred, but the cause is unknownFri Sep  7 14:51:25 2012 [VMM][E]: Could not create domain from /var/lib/one/datastores/0/9/deployment.8
>> Fri Sep  7 14:51:25 2012 [VMM][I]: ExitCode: 255
>> Fri Sep  7 14:51:25 2012 [VMM][I]: Failed to execute virtualization driver operation: deploy.Fri Sep  7 14:51:25 2012 [VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one/datastores/0/9/deployment.8
>> Fri Sep  7 14:51:25 2012 [DiM][I]: New VM state is FAILED
>>
>> I've tried to create the domain manually in the host but I've obtained
>> the same error:
>>
>> $ virsh -d 0 create /var/lib/one/datastores/0/9/deployment.8
>> create: file(optdata): /var/lib/one/datastores/0/9/deployment.8
>> error: Failed to create domain from
>> /var/lib/one/datastores/0/9/deployment.8
>> error: An error occurred, but the cause is unknown
>>
>> I've looked the libvirtd.log file in the host, but I haven't found any
>> relevant information about the problem (I've changed the log_level to
>> debug)... Does anyone have any idea about what could be the reason of this
>> error?
>>
>> Thanks in advance.
>>
>> Cheers,
>> Virginia.
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120910/029556a6/attachment-0002.htm>


More information about the Users mailing list