libvirt: virsh -c qemu+ssh://host.example.com/session connects to 'system', not session

Bug #195480 reported by Jamie Strandboge
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Medium
Serge Hallyn
Declined for Lucid by Mathias Gug

Bug Description

On the libvirt host that has virtual machines:

$ virsh -c qemu:///session list --all
 Id Name State
------------------------------

But logging in remotely yields:
$ virsh -c qemu+ssh://host.example.com/session list --all
 Id Name State
----------------------------------
  - Ubuntu 6.06 (Dapper) shut off
  - Ubuntu 6.10 (Edgy) shut off
  - Ubuntu 7.04 (Feisty) shut off
  - Ubuntu 7.10 (Gutsy) shut off
  - Ubuntu 8.04 (Hardy) shut off

What is happening is that qemu+ssh://host.example.com/session is listing the machines in qemu+ssh://host.example.com/system instead. This is both unexpected and wrong, because machines actually in 'session' are not accessible.

Revision history for this message
Jamie Strandboge (jdstrand) wrote : Re: libvirt: virsh -c qemu+ssh://severus/session connects to 'system', not session

Marking confirmed, as it is easily reproducible, and I have done it in different installations. This also is still a problem on Jaunty.

description: updated
summary: - libvirt: qemu+ssh session works when it shouldn't
+ libvirt: virsh -c qemu+ssh://severus/session connects to 'system', not
+ session
Changed in libvirt (Ubuntu):
status: New → Confirmed
summary: - libvirt: virsh -c qemu+ssh://severus/session connects to 'system', not
- session
+ libvirt: virsh -c qemu+ssh://host.example.com/session connects to
+ 'system', not session
Changed in libvirt (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Confirmed in Lucid.

Revision history for this message
Qiao Liyong (qiaoly) wrote :

I run virsh -c qemu:///session list --all and virsh -c qemu:///system list --all

when run virsh -c qemu:///session list , it run a temp libvirtd --timeout 30 by non-root model

virsh -c qemu:///system list --all ,it access root model libvirtd

when run virsh -c qemu://127.0.0.1/session list --all

it run a ssh like this:

ssh 127.0.0.1 sh -c 'nc -q 2>&1 | grep -q "requires an argument";if [ $? -eq 0 ] ; then CMD="nc -q 0 -U /var/run/libvirt/libvirt-sock";else CMD="nc -U /var/run/libvirt/libvirt-sock";fi;eval "$CMD";'

so ,does it use a root model libvirtd ??

is here a mistake ?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

What do you mean by 'a root model libvirtd'?

If you change it to 'virsh -c qemu://127.0.0.1/system -list --all', does it become 'nc -q 0 -U /var/run/libvirt/libvirt-sock-ro' ?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Interestingly,

virsh -c qemu+ssh://localhost/system list
versus
virsh -c qemu+ssh://localhost/session list

works correctly. But using just 'qemu:///session list' does inded show system entries.

Changed in libvirt (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

No, I was misreading the results.

0 ✓ serge@sl ~ $ virsh -c qemu:///system list --all
 Id Name State
----------------------------------------------------
 - fedora20 shut off
 - p9-p shut off
 - ubuntuprecise shut off
 - wily1 shut off
 - wily1-cgmu shut off
 - wily1-clone shut off
 - wily1-lxc1 shut off
 - wily1-lxd1 shut off
 - win2k8 shut off
0 ✓ serge@sl ~ $ !!:s/system/session/
virsh -c qemu:///session list --all
 Id Name State
----------------------------------------------------

This appears to be fixed.

Changed in libvirt (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.