Jean-Pierre Ribeauville
2014-Jul-06 14:45 UTC
[libvirt-users] follow-up to thread : Acces to hypervisor from a KVM guest, ( by the way , how to enter a follow up in a thread ?) Thx
Hi, This is what I tried : Y , how enter an answer in the thread ?) virsh -c qemu+ssh://127.0.0.1:22/system hostname root@127.0.0.1's<mailto:root@127.0.0.1's> password: error: End of file while reading data: : Input/output error error: failed to connect to the hypervisor In another hand ,as we have few information to share , I was thinking to use a virtio channel to dialog between host and guest . Does it fit ? Thx J.P. ? -----Message d'origine----- De : Eric Blake [mailto:eblake@redhat.com] Envoyé : vendredi 4 juillet 2014 15:20 À : Jean-Pierre Ribeauville; libvirt-users@redhat.com<mailto:libvirt-users@redhat.com> Objet : Re: [libvirt-users] Acces to hypervisor from a KVM guest On 07/04/2014 04:23 AM, Jean-Pierre Ribeauville wrote:> Hi,>>>From a KVM guest, I want to retrieve the hostname of the host on which the hypervisor is running.> Before doing that by using libvirt API, I first try via virsh.Well, virsh just uses the libvirt API under the hood. I'd suggest that you try: virsh -c qemu://host/system hostname except that this is a chicken-and-egg situation, because virsh in the guest doesn't know what host to connect to. If you are using the out-of-the-box NAT setup, then you could use qemu://192.168.122.1/system, since your guest will be using an IP address assigned from that subnet from the host. Other than that, libvirt is not really designed for guest-to-host communication, but for host management of guests. You'll have to solve your problem in some other way. Consider the same situation with bare metal hosts - if you are provisioning a cluster, and want machines in the cluster to communicate to a particular controller, but not all machines connect to the same controller, how would you do that? If you can solve that problem, then you can use it to solve your guest provisioning problem.> error: Failed to reconnect to the hypervisor> error: no valid connection> error: internal error Unable to locate libvirtd daemon in /usr/sbin> (to override, set $LIBVIRTD_PATH to the name of the libvirtd binary)This failure is because you did not use -c to connect to a remote daemon, but don't have libvirtd running in the guest. You do not need libvirtd running locally to use virsh for remote connections, but you do need to know where the remote connection lives. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org [cid:image001.png@01CF75CE.35F97F50] Jean-Pierre RIBEAUVILLE Developer Tel: 01 49 11 45 81 Discover Systar's Videos!<https://www.youtube.com/channel/UCvyaJkMXCGFo8_XZYd9rcBw> P Please consider the environment before printing this e-mail
Michal Privoznik
2014-Jul-07 12:05 UTC
Re: [libvirt-users] follow-up to thread : Acces to hypervisor from a KVM guest, ( by the way , how to enter a follow up in a thread ?) Thx
On 06.07.2014 16:45, Jean-Pierre Ribeauville wrote:> Hi, > > This is what I tried : > > Y , how enter an answer in the thread ?) > > virsh -c qemu+ssh://127.0.0.1:22/system hostname root@127.0.0.1's > <mailto:root@127.0.0.1's>password: > > error: End of file while reading data: : Input/output error > > error: failed to connect to the hypervisorThe I/O error seems like either libvirtd or ssh {client,server} died. Do you happen to know/find out which one of these it has been?> > In another hand ,as we have few information to share , I was thinking > to use a virtio channel to dialog between host and guest .Correct. virtio channels are designed just for having a bidirectional pipe into the guest to feed an app running within the guest with some data. Michal
Eric Blake
2014-Jul-07 21:41 UTC
Re: [libvirt-users] follow-up to thread : Acces to hypervisor from a KVM guest, ( by the way , how to enter a follow up in a thread ?) Thx
On 07/06/2014 08:45 AM, Jean-Pierre Ribeauville wrote:> Hi, > > This is what I tried : > > Y , how enter an answer in the thread ?)If you aren't already subscribed to the list, it is possible to use gmane to reply to a conversation while keeping it properly threaded: http://news.gmane.org/gmane.comp.emulators.libvirt.user It is a general shortcoming of the mailman 2 engine that we use for this list, that the mailman web interface does not provide an easy way to request either a correctly-threaded mailto: reply URL, or a way for an older message be resent (mailman3 and the hyperkitty interface are supposedly trying to rectify this, and other things, but they still aren't ready for general use). If you don't have the original mail, but still want your reply to be threaded correctly, the current approach is rather tedious of manually figuring out the correct In-Reply-To: header to add to your mail by browsing the .mbox archives: https://www.redhat.com/archives/libvirt-users/ https://www.redhat.com/archives/libvirt-users/2014-July.txt.gz and if that didn't make any sense to you, then don't worry about it. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org