Centos7 - KVM manager with X11

On production servers, I don't want to install X11 but sometimes, we need to give admins a GUI. Some admins are simply better with GUIs while others are better at CLI.

Searching the net for a solution isn't leading me to anything which seems all that simple to install and use so thought I would ask here as I am sure there are others who want a low resource cost GUI solution to manage VMs.
projectsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Duncan RoeSoftware DeveloperCommented:
Providing the network is up, you can use an xterm on a node that doesn't have an X server and specify the DISPLAY to be on a node that does (maybe the VM host). I do this from my firewall and also from  my cygwin installation on a Windows laptop.
I leave xauth enabled on the target display and use an expect script to authorise the system I'm using - can post if you would be interested (it uses rsh but I guess ssh should work)

As well as xterm, you could use any installed X application - I guess that's what your admins want to do?
projectsAuthor Commented:
By node, you mean one of the vms running on the host? Installing X11 on that and using it to manage the vms? The overhead of a vm running X11 would probably end up being even more load on the server than simply installing X on the host?
Duncan RoeSoftware DeveloperCommented:
No I meant install X on the server (what I called the VM host).
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

projectsAuthor Commented:
I'm confused. I'm trying to avoid installing X on a production host, looking for something lighter.
projectsAuthor Commented:
Duncan RoeSoftware DeveloperCommented:
If your admins need a GUI, you will have to install X somewhere. Anywhere will do - a laptop for instance. You just need to ensure that the node running X is visible from all nodes that want to access it.
projectsAuthor Commented:
The host is in a remote data center to us, no local access.
Duncan RoeSoftware DeveloperCommented:
I don't understand why that is a problem. By visible, I meant visible over the network. It would be preferable to have network speed better than dial-up, although dial-up will work.
projectsAuthor Commented:
I didn't say it was a problem, I'm just letting you know that. You said install X anywhere but that doesn't make any sense to me because I don't want X on the host. That is the point of the post, wanting something VERY light on the host to manage vms in a graphical manner.
Duncan RoeSoftware DeveloperCommented:
You have the graphical management software (whatever it is) on the host but you set its DISPLAY environment to point to your laptop (or wherever you have an X server running). There have to be enough X libraries installed on the host to support the GUI: I don't count that as "installing X" - do you?
projectsAuthor Commented:
So you're saying you don't need to run X on the host, just the libraries?
That's an interesting idea. In all the stuff I've read, I've not come across anything like that.
Can you provide any more information?
Duncan RoeSoftware DeveloperCommented:
Nothing to it really. Just ... do it

You could try ldd on the GUI in a regular X environment to see what libraries it needs
projectsAuthor Commented:
Sorry, you're talking in riddles to me. Can you give me a little more details please, this isn't something I've done before. 'try ldd'? Do you mean try running ldd from the command line on a server which has X installed? I don't have one. I've never used gui.
projectsAuthor Commented:
It makes no sense to me. If Linux wants to offer virtualization and give an alternative to VMWare, there must be a tiny footprint, low resource use graphical interface as well as cli methods.

I can't imagine people are installing the whole X11 package just for that. There must be something out there, LAMP based even.

http://www.ovirt.org/Home - Overkill?
Duncan RoeSoftware DeveloperCommented:
Now you've confused me.
You said in the original Q: "sometimes, we need to give admins a GUI". So ... just what do they want to use?
And on which system(s)?
projectsAuthor Commented:
If you are familiar with VMWares ESX web based interface, then that is what I mean. That interface is a small footprint, low resource use tool to manage the host.

I am trying to find something similar for Centos kvm management. There are lots of tools but most seem to require X11 to be installed.
Duncan RoeSoftware DeveloperCommented:
I only ever used the full VMWare workstation GUI.
The X11-dependent tools clearly require (some of) X11 to be installed. On my Slackware systems, X11 Server is a different package from X11 libraries, so on e.g. the router I only install the latter.
By "small footprint", do you mean disk space used (by installed X11 or other packages) or RAM/CPU used by running them?
Even if you had no objection to doing it, how would it help to run an X server on your server that is miles away? You want to run an X server on the PC in front of you. Then you need to do 2 things

1. Tell the remotely running GUI app what is its display server

Either set the DISPLAY environment variable, or include a --display argument on the command line that starts the app

2. Ensure the X server will accept requests from the remote system

xhost + will do it (it disables access control) but you wouldn't want to do that on a system connected to the Internet unless there's a firewall
Or you can use a script like I do that sets up xauth authorization on the remote host
projectsAuthor Commented:
Small footprint meaning low resource (RAM/CPU) use. Disk space is never an issue these days.

Your points 1 and 2 sound like you are saying I don't need to run full X on the host, that I would run X on a local system, connecting to the KVM host. Is this right?

Yes, of course there's a firewall :). I can't imagine putting anything on the net without one, ever.

So yes, the KVM host/server would allow only source IP/s to connect and use the GUI manager.

I've never done this however so if you have any leads, links, information on how to go about it, this is sounding interesting.
Duncan RoeSoftware DeveloperCommented:
If you connect to the server via the public internet, you need to use xauth or filter on source IP/s - for safety you might want to do both in the long term. Opening and filtering will do for now I guess.
First check fundamentals: ssh into the VM server and ensure you can ping the X server.
Once you have that working, make the command telnet xserver 6000 gets a connection. (to break the connection, Control-] (ctrl-right_squre_bracket) to access the telnet command prompt and enter q). This checks you have opened port 6000 (the X server port).
Now you can try starting a GUI app to display on your X server (assumed hostname xserver):
On the X server, verify what is the local DISPLAY
07:38:48$ echo $DISPLAY
:0
07:38:57$ 

Open in new window

(you may instead see e.g. :0.1) On the VM server, enter export DISPLAY=xserver:0 (or whatever you saw in place of :0).
Now you can try an X app: I like to use xterm so enter xterm&. You should get a new xterm on your X display. Commands you type into it are going to your VM server (try echo $DISPLAY).
From that xterm you can start other GUI programs, or you can start them through your SSH connection as you started the xterm.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Virtualization

From novice to tech pro — start learning today.