Narahari Lakshminarayana
2016-May-05 19:58 UTC
[libvirt-users] virt-manager and the alternatives
Friends: I am new to this and don't flame me yet. Here is what I am facing. I installed libvirt stuff and then I run virt-manager to create a vm. When I run the virt-manager I am seeing issue Namespace GtkVnc not available for version 2.0 How do I interact with the console screen so I can hit Enter key and do <ALT + F2> etc., ? Is virt-manager my only choice ? How to use VNC to connect to the virt-manager screen, not the VM's console ? ============ Can I create VM with virsh and then set vnc for that and connect to that with VNC ? -Narahari
On 05/05/2016 03:58 PM, Narahari Lakshminarayana wrote:> Friends: > > I am new to this and don't flame me yet. Here is what I am facing. > > I installed libvirt stuff and then I run virt-manager to create a vm. > > When I run the virt-manager I am seeing issue > Namespace GtkVnc not available for version 2.0 > > How do I interact with the console screen so I can hit Enter key and do > <ALT + F2> etc., ?The display client in virt-manager has a "Send Key" menu that will send alt+Fn for you.> > Is virt-manager my only choice ? > > How to use VNC to connect to the virt-manager screen, not the VM's > console ?Are you saying that you want virt-manager's window (with the list of virtual machines, etc) to be displayed on a different machine? You could do that by installing virt-manager (and the client side of libvirt) on the machine with the display, then running virt-manager and telling it to add a new connection to a remote host (that is an option in the New Connection dialog). Or you could do that by setting up X11 forwarding over ssh from the machine with the display (D) to the machine with KVM + libvirt + virt-manager (K). To forward X11, first login to K and make sure that /etc/ssh/sshd_config has the line "X11Forwarding yes" (you'll need to restart the sshd service if you change this), then from D run "ssh -X K" and run virt-manager at the shell prompt. It will be running on K but displayed on D. If you do this there will probably be authentication problems because it won't be able to find polkit; the way that I found of solving this was to create a new connection in virt-manager once it's open, telling it to connect to the "remote" host at address 127.0.0.1 (pay attention to what it asks for when authenticating - if you've never ssh'ed to localhost on that machine before, it may be asking you to type "yes" or "no" rather than asking for the password!).> > ============> > Can I create VM with virsh and then set vnc for that and connect to > that with VNC ?You could do that, once you know the address/port that qemu's vnc is listening on. Or you could use virt-viewer, which queries libvirt for the info, based on the name of the guest. To learn the address and port of the guest's VNC (or spice!) server, use "virsh domdisplay $guestname". It will give you a URI with all the necessary info, e.g.: spice://127.0.0.1:5908 (This guest is using spice for the display rather than VNC, and is listening on localhost port 5908).
Dominique Ramaekers
2016-May-08 10:52 UTC
Re: [libvirt-users] virt-manager and the alternatives
>Van: libvirt-users-bounces@redhat.com [mailto:libvirt-users-bounces@redhat.com] Namens Narahari Lakshminarayana >Verzonden: donderdag 5 mei 2016 21:59 >Aan: libvirt-users@redhat.com >Onderwerp: [libvirt-users] virt-manager and the alternatives > >Friends: > >I am new to this and don't flame me yet. Here is what I am facing. > >I installed libvirt stuff and then I run virt-manager to create a vm. > >When I run the virt-manager I am seeing issue >Namespace GtkVnc not available for version 2.0 > >How do I interact with the console screen so I can hit Enter key and do ><ALT + F2> etc., ? > >Is virt-manager my only choice ? > >How to use VNC to connect to the virt-manager screen, not the VM's console ? > >============> >Can I create VM with virsh and then set vnc for that and connect to that with VNC ? > >-NarahariHow did you create a VM with virsh? I think bests practice is using virt-install or virt-manager to create VM's. With these methods, the vnc is automatically and correctly set. Anyway, your error ' Namespace GtkVnc not available for version 2.0' can point to the fact that not all of the dependencies are installed. Pleas look at: http://ask.xmodulo.com/compile-virt-manager-debian-ubuntu.html Or, install libvirt from your distribution repositories... Greetings, Dominique.