Easy remote virt-manager

By jbayer - Last updated: Monday, October 24, 2011 - Save & Share - 3 Comments

First, some background:

We have a number of large hosts which run KVM for virtual machines.  All these machines are remote, as in more than 1000 miles away.  The host systems all run Redhat 5.6.  We access our systems remotely using putty.

The problem is in how to run virt-manager remotely, easily.

 

Solution

First, install putty.  You can download it here

Second, install Xming locally;  you can download it here.  You can either use the included plink.exe or install putty.  plink.exe is a console program, so we install putty on all our systems, and those which need, install Xming.

Finally, when you start putty, before you start  the putty session, go into the Connection->SSH->X11 options and enable X11 forwarding

In order to for virt-manager to be able to access the libvirt management daemon, it has to have root permissions.  We do with using sudo, and use the following alias to both set up the xauth permissions and run the virt-manager:

alias vmanager='xauth list | while read line; do sudo -i xauth add $line; done; sudo -i virt-manager'

Once this alias is set, all you need to do is type:

vmanager

and the virt-manager will start.  If necessary, sudo will ask you for your password.  It will then set up the xauth list and start virt-manager.

Posted in Administration, Virtulization • • Top Of Page
2,973 views

3 Responses to “Easy remote virt-manager”

Comment from Veronica
Time August 14, 2012 at 6:27 pm

hello, sorry for my English, but I can only slightly. I did everything that said in this article, but launched these messages.

stdin: is not a tty
stdin: is not a tty

How I can fix them? thanks for the help

Comment from jbayer
Time August 15, 2012 at 7:42 am

I need a little more information.

Is xauth installed?

Before you try launching vmanager, do this:

echo $DISPLAY

It should show something like:

localhost:10.0

The numbers are unimportant right now. If it doesn’t echo anything, then you don’t have X11 forwarding on.

Is KVM installed?

let me know

Comment from Pratap
Time June 14, 2013 at 5:40 am

Perfect worked for me right away .. 🙂

Write a comment

asd