Bug #131

KVM driver checkpoints files as root

Added by Tino Vázquez almost 12 years ago. Updated over 11 years ago.

Status:ClosedStart date:07/31/2009
Priority:NormalDue date:
Assignee:Jaime Melis% Done:

20%

Category:Drivers - Auth
Target version:Release 1.4
Resolution:fixed Pull request:
Affected Versions:

Description

In many linux distributions, virsh uses qemu:///system as the connection uri. This causes libvirtd to perform operations as root.
The problem comes in the epilog state, the delete fails as the checkpoint file (if it exists) is owned by root.

A workaround

A possible patch is to enable the KVM drivers to choose the virsh URI with a variable (VIRSH_URI).

Associated revisions

Revision f8252cfe
Added by Ruben S. Montero almost 12 years ago

#131: Generate VM state files as oneadmin. Use custom LIBVIRT_URI, defaults
to system

git-svn-id: http://svn.opennebula.org/one/trunk@809 3034c82b-c49b-4eb3-8279-a7acafdc01c0

History

#1 Updated by Ruben S. Montero almost 12 years ago

  • Target version set to Release 1.4

#2 Updated by Ruben S. Montero almost 12 years ago

Also the emulator path differ across the linux distributions, a EMULATOR variable should be also available to specify different locations. The libvirtdriver.cc would then use this value.

This has been reported by Harsha Buggi in the mailing list.

#3 Updated by Ruben S. Montero almost 12 years ago

  • Assignee changed from Tino Vázquez to Ruben S. Montero

#4 Updated by Marlon Nerling almost 12 years ago

My fifthy cents:
add the one user to the libvirtd group on the hosts.

#5 Updated by Ruben S. Montero almost 12 years ago

  • Assignee changed from Ruben S. Montero to Jaime Melis

#6 Updated by Ruben S. Montero almost 12 years ago

  • % Done changed from 0 to 20

Added custom libvirt connection uri, and a workaround to generate a non-root checkpoint file. Needs testing

#7 Updated by Jaime Melis almost 12 years ago

  • Status changed from New to Assigned

#8 Updated by Ruben S. Montero over 11 years ago

  • Status changed from Assigned to Closed
  • Resolution set to fixed

The solution in trunk seems to work, closing this.

Also available in: Atom PDF