Linux.com

virt-install becoming a headache

Link to this post 04 May 11

How about this - can you SSH into your CentOS server (which has no GUI) from another Linux machine that does have a GUI? If so, then make sure the virt-viewer package is installed on your CentOS server then try the following. I just tried this on a Fedora 10 server with no GUI (just the core OS plus the required KVM packages and dependencies) and it worked for me:

1. Log into a Gnome desktop on my Linux workstation
2. SSH to my Fedora 10 server, being sure to enable X11 forwarding ( e.g., ssh -Y <SERVER_IPADDRESS> )
3. start the virt-install command like so:


virt-install \
--os-type=linux \
-c /data/iso/Fedora-10-i386-DVD.iso \
-f /data/F10-virt-OS \
-d \
-nF10test \
-r256 \
--vcpus=1 \
-s1 \
--bridge=virbr0 \
--accelerate \
--vnc

After a bunch of output is spewed to the terminal, a graphical window pops up which has the Fedora install running in it.

If you do not have the ability to SSH into your server from another Linux workstation, let us know and we'll keep digging...

Link to this post 04 May 11

hi atreyu
i have done what you said despite using --vnc instead of using text mode just to try if finally works a VM on my server.
entering the command it printed a warning
Gtk-WARNING **: cannot open display"
i googled and i found something about xhost+localhost but it doesn,t solve nothing

Link to this post 04 May 11

also can someone tell me why during the installation in text mode, after the menu of language selection, the menu "Installation Method" i can't do nothing. i've tried all the options but it doesn't work nothing.
i have seen that in graphical mode the menu "Installation Method" you can put rutes(rute in HD where is Iso, o where is cdrom, among other things) thing that you can't do in text mode
thanks!!

Link to this post 04 May 11

wikisb wrote:

hi atreyu
i have done what you said despite using --vnc instead of using text mode just to try if finally works a VM on my server.
entering the command it printed a warning
Gtk-WARNING **: cannot open display"
i googled and i found something about xhost+localhost but it doesn,t solve nothing

Did you do steps 1) and 2) first? In other words, are you sitting at a Linux PC and logged into a graphical desktop (looks kinda like Windows, Gnome/KDE are likely what you'd be using), opening a terminal (xterm, konsole, gnome-terminal, etc.), then connecting to your CentOS server via SSH, using the '-Y' flag?

I haven't had to use the xhost command in some time, but if you do use it, it should be run on the machine that is hosting the graphical environment, not the CentOS server, and should be run by the user logged into the desktop. You can run it like:

xhost +

Once you've SSH'd into the CentOS server, check the DISPLAY environmental variable like this:

echo $DISPLAY

It should not be empty, and might say something like localhost:10.0

Before running virt-install again, you can test that your DISPLAY is properly getting set by running any graphical program that is installed on your CentOS server (firefox, nedit, xeyes, glxgears, etc.) by just running it - it should just appear on your desktop as if you had launched it locally (from the Linux workstation).

Link to this post 05 May 11

i followed the steps in your previous post. i used a linux VM with GUI on a windows host (not my election, where i work all pcs have win). i did echo $DISPLAY and it printed an empty line.
i haven't run any graphical program because my server it has only what it needs to work without GUI. i haven't had a try because for each program with graphical interface there are lots of dependencies to install that i will not use
i don't know if things change because i am using a linux guest.
i'm wondering if maybe the problem that i have has something to do with the hardware of my server.
thanks once again !!

Link to this post 05 May 11

wikisb wrote:

i followed the steps in your previous post. i used a linux VM with GUI on a windows host (not my election, where i work all pcs have win). i did echo $DISPLAY and it printed an empty line.
i haven't run any graphical program because my server it has only what it needs to work without GUI. i haven't had a try because for each program with graphical interface there are lots of dependencies to install that i will not use
i don't know if things change because i am using a linux guest.
i'm wondering if maybe the problem that i have has something to do with the hardware of my server.
thanks once again !!

So you're in a Linux VM on a Windows PC, trying to create a VM on another PC? I'm not sure how that whole X mess is sorted out there, but can you install apps on the Windows PC? If so, try Xming - it is a free port of the X server for the Windows platform, and is great for people such as yourself, who are forced to use Windows at work.

http://sourceforge.net/projects/xming/

If you can, please try it out, instead of using the Linux VM. It should have SSH included with it, so you can start your X server and then, I think, you'd run putty, to connect to your CentOS server.

If you can't install stuff, or don't want to try that, let us know...

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board