[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: virsh list: korrekte Ausgabe nur als root



Am Montag 28 März 2011, 08:38:19 schrieb Michael Schuerig:
> Bei meinen stolpernden Versuchen mit Virtualisierung bin ich darauf
> gestoßen, dass virsh list --all nur mit root-Rechten die Gäste anzeigt.
> Als normaler Benutzer, der aber der Gruppe libvirt angehört, ist die
> Liste leer.

libvirt verwendet verschiedene URIs. Hier mal ein Unterschied mit KVM:

Als root:

# virsh uri
qemu:///system

# virsh list
 Id Name                 State
----------------------------------
  1 vlenny               running

# virsh list --all
 Id Name                 State
----------------------------------
  1 vlenny               running


Als User:

$ virsh uri
qemu:///session

$ virsh list
 Id Name                 State
----------------------------------

$ virsh list --all
 Id Name                 State
----------------------------------

$ virsh
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # uri
qemu:///session

virsh # list
 Id Name                 State
----------------------------------

virsh # list --all
 Id Name                 State
----------------------------------

virsh # connect qemu:///system

virsh # list
 Id Name                 State
----------------------------------
  1 vlenny               running

virsh # list --all
 Id Name                 State
----------------------------------
  1 vlenny               running


$ virsh -c qemu:///system
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # list
 Id Name                 State
----------------------------------
  1 vlenny               running


$ virsh -c qemu:///system list
 Id Name                 State
----------------------------------
  1 vlenny               running

Als User darfst du also eine URI benutzen.

Gruß Uwe

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: