Bug #1066

Problem with persistent images.

Added by Uli Horn over 9 years ago. Updated over 9 years ago.

Status:ClosedStart date:01/18/2012
Priority:NormalDue date:
Assignee:Ruben S. Montero% Done:

0%

Category:-
Target version:-
Resolution:worksforme Pull request:
Affected Versions:OpenNebula 3.0

Description

Wed Jan 18 15:34:10 2012 [DiM][I]: New VM state is ACTIVE.
Wed Jan 18 15:34:10 2012 [LCM][I]: New VM state is PROLOG.
Wed Jan 18 15:34:10 2012 [VM][I]: Virtual Machine has no context
Wed Jan 18 15:34:10 2012 [TM][I]: tm_ln.sh: Creating directory /var/lib/one//117/images
Wed Jan 18 15:34:10 2012 [TM][I]: tm_ln.sh: Executed "mkdir -p /var/lib/one//117/images".
Wed Jan 18 15:34:10 2012 [TM][I]: tm_ln.sh: Executed "chmod a+w /var/lib/one//117/images".
Wed Jan 18 15:34:10 2012 [TM][I]: tm_ln.sh: Link /var/lib/one/images/ad22ff38a6ff3e5e71bcd751e1144a7e
Wed Jan 18 15:34:10 2012 [TM][I]: tm_ln.sh: Executed "ln -s /var/lib/one/images/ad22ff38a6ff3e5e71bcd751e1144a7e /var/lib/one//117/images/disk.0".
I am running opennebula 3.0 with sunstone server. My hosts have Ubuntu 11.10 as OS. oneadmin:cloud is the administration user.
I get the following error messages when trying to deploy a vm with a persistent images. The same vm works with no persistent image. What is not clear to me is whether 0:0 refers to opennebula's internal ids i.e. oneadmin:oneadmin or to the host OS'. If it refers to opennebulas internal ids which somehow link to the OS user:group oneadmin:oneadmin then it is most probably misleading to suggest that the user set up a oneadmin:cloud account.

Wed Jan 18 15:34:10 2012 [TM][I]: ExitCode: 0
Wed Jan 18 15:34:10 2012 [LCM][I]: New VM state is BOOT
Wed Jan 18 15:34:10 2012 [VMM][I]: Generating deployment file: /var/lib/one/117/deployment.0
Wed Jan 18 15:34:12 2012 [VMM][I]: Command execution fail: 'if [ -x "/var/tmp/one/vmm/kvm/deploy" ]; then /var/tmp/one/vmm/kvm/deploy /var/lib/one//117/images/deployment.0 dl360g7-07-14 117 dl360g7-07-14; else exit 42; fi'
Wed Jan 18 15:34:12 2012 [VMM][I]: error: Failed to create domain from /var/lib/one//117/images/deployment.0
Wed Jan 18 15:34:12 2012 [VMM][I]: error: unable to set user and group to '0:0' on '/var/lib/one//117/images/disk.0': Permission denied
Wed Jan 18 15:34:12 2012 [VMM][E]: Could not create domain from /var/lib/one//117/images/deployment.0
Wed Jan 18 15:34:12 2012 [VMM][I]: ExitCode: 255
Wed Jan 18 15:34:12 2012 [VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one//117/images/deployment.0
Wed Jan 18 15:34:12 2012 [DiM][I]: New VM state is FAILED

History

#1 Updated by Ruben S. Montero over 9 years ago

Hi

This is usually a configuration issue. Could you double check your configuration with the tips in http://www.opennebula.org/documentation:rel3.2:kvmg. Also this may be related to your NFS configuration.

(The ID's refers to the OS)

Cheers

Ruben

#2 Updated by Uli Horn over 9 years ago

Thank you Ruben for pointing this out.

I went through your suggested document above. I had to make changes to dynamic_ownership and user/group changes as per instructions below:

Qemu should be configured to not change file ownership. Modify /etc/libvirt/qemu.conf to include dynamic_ownership = 0. To be able to use the images copied by OpenNebula, change also the user and group under which the libvirtd is run to “oneadmin”.

but now get the following qemu error:

Thu Jan 19 14:30:21 2012 [DiM][I]: New VM state is ACTIVE.
Thu Jan 19 14:30:21 2012 [LCM][I]: New VM state is PROLOG.
Thu Jan 19 14:30:21 2012 [VM][I]: Virtual Machine has no context
Thu Jan 19 14:30:21 2012 [TM][I]: tm_ln.sh: Creating directory /var/lib/one//127/images
Thu Jan 19 14:30:21 2012 [TM][I]: tm_ln.sh: Executed "mkdir -p /var/lib/one//127/images".
Thu Jan 19 14:30:21 2012 [TM][I]: tm_ln.sh: Executed "chmod a+w /var/lib/one//127/images".
Thu Jan 19 14:30:21 2012 [TM][I]: tm_ln.sh: Link /var/lib/one/images/e55c330826044ca0b3dc6f4835677a50
Thu Jan 19 14:30:21 2012 [TM][I]: tm_ln.sh: Executed "ln -s /var/lib/one/images/e55c330826044ca0b3dc6f4835677a50 /var/lib/one//127/images/disk.0".
Thu Jan 19 14:30:21 2012 [TM][I]: ExitCode: 0
Thu Jan 19 14:30:21 2012 [LCM][I]: New VM state is BOOT
Thu Jan 19 14:30:21 2012 [VMM][I]: Generating deployment file: /var/lib/one/127/deployment.0
Thu Jan 19 14:30:23 2012 [VMM][I]: Command execution fail: 'if [ -x "/var/tmp/one/vmm/kvm/deploy" ]; then /var/tmp/one/vmm/kvm/deploy /var/lib/one//127/images/deployment.0 dl360g7-07-14 127 dl360g7-07-14; else exit 42; fi'
Thu Jan 19 14:30:23 2012 [VMM][I]: error: Failed to create domain from /var/lib/one//127/images/deployment.0
Thu Jan 19 14:30:23 2012 [VMM][I]: error: operation failed: failed to retrieve chardev info in qemu with 'info chardev'
Thu Jan 19 14:30:23 2012 [VMM][E]: Could not create domain from /var/lib/one//127/images/deployment.0
Thu Jan 19 14:30:23 2012 [VMM][I]: ExitCode: 255
Thu Jan 19 14:30:23 2012 [VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one//127/images/deployment.0
Thu Jan 19 14:30:23 2012 [DiM][I]: New VM state is FAILED

Thanks
Uli

#3 Updated by Ruben S. Montero over 9 years ago

  • Status changed from New to Closed
  • Assignee set to Ruben S. Montero
  • Resolution set to worksforme

Hi

You may try to keeo dynamic_ownership, but use root to run the qemu processes. Usually that message is a kind of access error (e.g. to /dev/kvm). Alternatively make sure that oneadmin is in kvm and libvirt groups in the host.

I am closing this bug as it is a configuration problem and not related with OpenNebula.

Cheers

Ruben

Also available in: Atom PDF