Centos7 - KVM manager with X11

projects
projects used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Duncan RoeSoftware Developer

Commented:
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?

Author

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 Developer

Commented:
No I meant install X on the server (what I called the VM host).
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
I'm confused. I'm trying to avoid installing X on a production host, looking for something lighter.
Duncan RoeSoftware Developer

Commented:
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.

Author

Commented:
The host is in a remote data center to us, no local access.
Duncan RoeSoftware Developer

Commented:
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.

Author

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 Developer

Commented:
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?

Author

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 Developer

Commented:
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

Author

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.

Author

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 Developer

Commented:
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)?

Author

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 Developer

Commented:
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

Author

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.
Software Developer
Commented:
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.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial