[Libvir] Use virsh to monitor qemud

Hey, I jsut installed Fedora 7 and tried to install some guests and it worked like a charm. I use qemu for full virtulization. A couple of minutes later i stumbled across libvirts virtsh. But now I wonder how I cna use virtsh to connect to qemud - all I get is something like: "Can't connect to hyperisor." - fabiand

Fabian Deutsch wrote:
Hey,
I jsut installed Fedora 7 and tried to install some guests and it worked like a charm. I use qemu for full virtulization.
A couple of minutes later i stumbled across libvirts virtsh. But now I wonder how I cna use virtsh to connect to qemud - all I get is something like: "Can't connect to hyperisor."
Fabian, Currently the way things work is that libvirt_qemud needs to be "managing" the qemu instances which are running. It needs to have started them, it needs to be still connected to their consoles. However your error message is a bit different, and seems to indicate that virsh is either trying to connect to the Xen hypervisor or cannot connect to libvirt_qemud. It's hard to know because you need to post a lot more detail about what you're doing -- the exact virsh command you are typing, for example. You could also try stracing the virsh process to see what is failing. Rich. -- Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/ Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 03798903

Hey, Am Sonntag, den 03.06.2007, 14:40 +0100 schrieb Richard W.M. Jones:
Fabian Deutsch wrote:
Hey,
I jsut installed Fedora 7 and tried to install some guests and it worked like a charm. I use qemu for full virtulization.
A couple of minutes later i stumbled across libvirts virtsh. But now I wonder how I cna use virtsh to connect to qemud - all I get is something like: "Can't connect to hyperisor."
Fabian,
Currently the way things work is that libvirt_qemud needs to be "managing" the qemu instances which are running. It needs to have started them, it needs to be still connected to their consoles.
However your error message is a bit different, and seems to indicate that virsh is either trying to connect to the Xen hypervisor or cannot connect to libvirt_qemud. It's hard to know because you need to post a lot more detail about what you're doing -- the exact virsh command you are typing, for example. You could also try stracing the virsh process to see what is failing.
I just typed virtsh -c qemu:// list libvirt_qemud was running. So my only problem was the wrong URI. thanks - fabian

On Sun, Jun 03, 2007 at 02:29:27PM +0200, Fabian Deutsch wrote:
Hey,
I jsut installed Fedora 7 and tried to install some guests and it worked like a charm. I use qemu for full virtulization.
A couple of minutes later i stumbled across libvirts virtsh. But now I wonder how I cna use virtsh to connect to qemud - all I get is something like: "Can't connect to hyperisor."
Make sure you're telling virsh to connect to QEMU instead of Xen. There are two possible connections you can make. One is the system wide instance called qemu:///system - this allows root fully access, and users readonly access. For this use virsh --connect qemu:///system list Or if you're not root virsh --connect qemu:///system --readonly list Alternatively if you don't have root access, there is a per-user instance but you won't get access to any kernel accceleration virsh --connect qemu:///session list You can also set export VIRSH_DEFAULT_CONNECT_URI=qemu:///system If you don't want to type --connect URI every time If you were using virt-manager the title bar will tell you which it connected to. Normally it will be the system instance if you allowed it to run in privileged mode Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

Am Sonntag, den 03.06.2007, 16:28 +0100 schrieb Daniel P. Berrange:
On Sun, Jun 03, 2007 at 02:29:27PM +0200, Fabian Deutsch wrote:
Hey,
I jsut installed Fedora 7 and tried to install some guests and it worked like a charm. I use qemu for full virtulization.
A couple of minutes later i stumbled across libvirts virtsh. But now I wonder how I cna use virtsh to connect to qemud - all I get is something like: "Can't connect to hyperisor."
Make sure you're telling virsh to connect to QEMU instead of Xen. There are two possible connections you can make. One is the system wide instance called qemu:///system - this allows root fully access, and users readonly access. For this use
virsh --connect qemu:///system list
Or if you're not root
virsh --connect qemu:///system --readonly list
Alternatively if you don't have root access, there is a per-user instance but you won't get access to any kernel accceleration
virsh --connect qemu:///session list
You can also set
export VIRSH_DEFAULT_CONNECT_URI=qemu:///system
If you don't want to type --connect URI every time
If you were using virt-manager the title bar will tell you which it connected to. Normally it will be the system instance if you allowed it to run in privileged mode
Regards, Dan.
Thanks a lot. Helped like a torch in the dark :) - fabian
participants (3)
-
Daniel P. Berrange
-
Fabian Deutsch
-
Richard W.M. Jones