Re: [libvirt] the guest killed itself

On Thu, May 05, 2011 at 05:35:37PM +0800, guan qin wrote:
Hi, Thanks a lot for your reply sincerely!
some version infoemation: root@shahe26:~# libvirtd --version libvirtd (libvirt) 0.9.0 root@shahe26:~# kvm --version QEMU PC emulator version 0.12.5 (qemu-kvm-0.12.5), Copyright (c) 2003-2008 Fabrice Bellard root@shahe26:~#
Ok, I think the problem is your KVM version. You probably need to make the /etc/libvirt/qemu.conf changes I mentioned, to get it to work.
If you have oldish versions, you might need to edit /etc/libvirt/qemu.conf and set 'clear_emulator_capabilities = 0', and user=0, group=0 to make QEMU run as root with full privileges.
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

yeh,it's working ! I can see that the VM already running and never kill itself now. I appreciate your help very much. but I meet another problem after I upgrade the libvirt version from 0.8.3 to 0.9.0. I find that if I use "virt-viewer -c qemu+ssh://192.168.7.126/systemvt_d_ubuntu", the machine shows a message that "Unable to connect to libvirt with URL qemu+ssh://192.168.7.126/system ". I can't connect the VM running on another machine. I only can use "virt-viewer -c qemu:///system vt_d_ubuntu" to connect the VM running at local machine. when the libvirt version is 0.8.3 , I can use "virt-viewer -c qemu+ssh:// 192.168.7.126/system vt_d_ubuntu"to connect the VM running on the another machine successfully. It makes me confused. I try to find a solution to solve the problem but failed. Do you know some reasons may result it ? thanks. best regards, qinguan 2011/5/5 Daniel P. Berrange <berrange@redhat.com>
On Thu, May 05, 2011 at 05:35:37PM +0800, guan qin wrote:
Hi, Thanks a lot for your reply sincerely!
some version infoemation: root@shahe26:~# libvirtd --version libvirtd (libvirt) 0.9.0 root@shahe26:~# kvm --version QEMU PC emulator version 0.12.5 (qemu-kvm-0.12.5), Copyright (c) 2003-2008 Fabrice Bellard root@shahe26:~#
Ok, I think the problem is your KVM version. You probably need to make the /etc/libvirt/qemu.conf changes I mentioned, to get it to work.
If you have oldish versions, you might need to edit
/etc/libvirt/qemu.conf
and set 'clear_emulator_capabilities = 0', and user=0, group=0 to make QEMU run as root with full privileges.
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/:| |: http://libvirt.org -o- http://virt-manager.org:| |: http://autobuild.org -o- http://search.cpan.org/~danberr/:| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc:|

On Thu, May 05, 2011 at 06:46:32PM +0800, guan qin wrote:
yeh,it's working ! I can see that the VM already running and never kill itself now. I appreciate your help very much.
but I meet another problem after I upgrade the libvirt version from 0.8.3 to 0.9.0. I find that if I use "virt-viewer -c qemu+ssh://192.168.7.126/systemvt_d_ubuntu", the machine shows a message that "Unable to connect to libvirt with URL qemu+ssh://192.168.7.126/system ".
This is ssh'ing as an unprivileged user, and so it likely doesn't have permission for the socket. You can try 'qemu+ssh://root@192.168.7.126/system' instead Also see these pages http://wiki.libvirt.org/page/Main_Page#SSH Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Actually, the machine running VM only has one user : root. I login the machine and run ssh both with the root permission. And I also have a try by using "virt-viewer -c qemu+ssh:// root@192.168.7.126/system vt_c_ubuntu" It still shows the same message . best regards, qinguan 2011/5/5 Daniel P. Berrange <berrange@redhat.com>
On Thu, May 05, 2011 at 06:46:32PM +0800, guan qin wrote:
yeh,it's working ! I can see that the VM already running and never kill itself now. I appreciate your help very much.
but I meet another problem after I upgrade the libvirt version from 0.8.3 to 0.9.0. I find that if I use "virt-viewer -c qemu+ssh://192.168.7.126/systemvt_d_ubuntu", the machine shows a message that "Unable to connect to libvirt with URL qemu+ssh://192.168.7.126/system ".
This is ssh'ing as an unprivileged user, and so it likely doesn't have permission for the socket. You can try 'qemu+ssh:// root@192.168.7.126/system' instead
Also see these pages
http://wiki.libvirt.org/page/Main_Page#SSH
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/:| |: http://libvirt.org -o- http://virt-manager.org:| |: http://autobuild.org -o- http://search.cpan.org/~danberr/:| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc:|

If I use "kvm ubuntu.img -vnc :1" , I can use vncviewer and input the " 192.168.7.126:1" entering the VM successfully. Is there any log file about libvirt that may show some clue? best regards, qinguan 2011/5/5 Daniel P. Berrange <berrange@redhat.com>
On Thu, May 05, 2011 at 06:46:32PM +0800, guan qin wrote:
yeh,it's working ! I can see that the VM already running and never kill itself now. I appreciate your help very much.
but I meet another problem after I upgrade the libvirt version from 0.8.3 to 0.9.0. I find that if I use "virt-viewer -c qemu+ssh://192.168.7.126/systemvt_d_ubuntu", the machine shows a message that "Unable to connect to libvirt with URL qemu+ssh://192.168.7.126/system ".
This is ssh'ing as an unprivileged user, and so it likely doesn't have permission for the socket. You can try 'qemu+ssh:// root@192.168.7.126/system' instead
Also see these pages
http://wiki.libvirt.org/page/Main_Page#SSH
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/:| |: http://libvirt.org -o- http://virt-manager.org:| |: http://autobuild.org -o- http://search.cpan.org/~danberr/:| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc:|

sorry ,I misunderstand your meaning. I try with 'virsh -c qemu+ssh://root@192.168.7.126/system' as follows: root@Optiplex-780:/var/log/apache2# virsh -c qemu+ssh://192.168.7.126/system root@192.168.7.126's password: error:server closed connection: error:连接到管理程序失败(failed to connect to the monitor?) root@Optiplex-780:/var/log/apache2# best regards, qinguan 2011/5/5 Daniel P. Berrange <berrange@redhat.com>
On Thu, May 05, 2011 at 06:46:32PM +0800, guan qin wrote:
yeh,it's working ! I can see that the VM already running and never kill itself now. I appreciate your help very much.
but I meet another problem after I upgrade the libvirt version from 0.8.3 to 0.9.0. I find that if I use "virt-viewer -c qemu+ssh://192.168.7.126/systemvt_d_ubuntu", the machine shows a message that "Unable to connect to libvirt with URL qemu+ssh://192.168.7.126/system ".
This is ssh'ing as an unprivileged user, and so it likely doesn't have permission for the socket. You can try 'qemu+ssh:// root@192.168.7.126/system' instead
Also see these pages
http://wiki.libvirt.org/page/Main_Page#SSH
Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/:| |: http://libvirt.org -o- http://virt-manager.org:| |: http://autobuild.org -o- http://search.cpan.org/~danberr/:| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc:|
participants (2)
-
Daniel P. Berrange
-
guan qin