virt-install becoming a headache
hi all!!
i want to try virtualization with kvm. i have a server that supports V-Tecnology. i installed all necessary packets so virt-install can work. i have a centOS 5.5 with no graphical interface with kernel 2.6.18-194(default kernel of this distro) , static ip. i have been looking lots of how-to's it seems very simple to do it, but i don't get well along with it, and i'm becoming a little bit feed up of it so i'm writting here.
the kvm % kvm-intel modules load fine.
FIRST QUESTION: in lots of how-to's tells that you need a version 2.6.20 or higher of kernel to have kvm support, but at the kvm-how-to page it tells that it wil work with version 2.6.17 or higher. i supose that if you don't have a friendly kernel kvm it will not work. am i right?
i want to create 3 VM, 2 centos5.2 of 64 & 32 bits, and one fedora of 32b for the coorp i work., each of them in text mode.
with this command:
virt-install -n BXVI \
-r 1024\
--vcpus=1\
--os-type linux\
--accelerate\
--nographics\
-v\
-l /data/dist_img/Centos_5.2_final.iso\ / * if i put instead -cdrom instead of -l it happens the same
--disk patj=/data/images/disk.img
-x "console=ttyS0"
before configuring networks and other things i want to create 1 VM and then i will think of adding network & other stuff.
so once i press enter after putting the command above. it starts the installation of the CentOS in text mode.
first appears the menu to select the language ---> no problem
second appears the menu called "Installation Method" with 5 options "Local CDRom, Hard Drive, NFS image, FTP, HTTP" and i get stuck here
because if i select the option of "Local CDrom" or "Hard drive" it tells me that for the first "it doesn't find the CentOS CD" and for the second tells me that "it seems that i don't have any hard drives on my system", and it asks me if i want to configure an additional device but if i put yes it prints an error telling that it failed to mount driver disk or saying that driver disk is invalid for this release of centos.
if i select http it tells me to configure ipv4 telling if it will be dhcp or manual config. but with this option i supose that i had to add the option of "--network Bridge:default" even with it it does nothing, well if i configure it manually it ask me an IP, Mask, Gateway, DNS. then i put the mirror direction and the path to the centos and it prints me an error
2 QUESTION: why the h__ it shows the second menu of "Installation Method" if i put where was the iso, the virtual disk to install the OS guest...¬ø?¬ø?¬ø
i don't now how to get to the next step of the installation can somebody please help me!!
thanks!!
Comments
-
I'm not sure if this is related, but could possibly be. I've been unable to install CentOS5.5 or 5.6 into VMWare, with similar error messages of being unable to find the CD.
Maybe try your Fedora installation, first, and see if that goes smoother.0 -
I'm a command-line weenie myself, but in this case, I have to ask: why don't you try the graphical interface for creating virt systems?
In Fedora at least, you can runvirt-manager
which belongs to an RPM package of the same name. It launches an app wizard that helps you through all the steps. I'm not saying it'll work better, but maybe it will help you. I haven't done it on CentOS (to my recollection anyway), but I see that the virt-manager package is available for it.
-bill0 -
hi atreyu ,dwclarke & all others!!
its not a thing that i like trying it without GUI but i'm told to do it in text based. the boss rules ;(.
now i will try installing Fedora but i'm not shure that is going to work
i also tried to crearte a br0(bridge). the ip of my server is static is 172.20.1.16 and i'm not shure if putting in the virt-install command --network bridge:br0 will give a network interface to my VM. i followed what was written here(the static part) :
http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=/liaai/kvminstall/liaaikvminstallbridge.htm
that made my host couldn't connect to internet
and then i entered this command:
virt-install -n BXVI\
-r 1024\
--accelerate\
--nographics\
-l http://mirrors.manchester.icecolo.com/centos/5.5/os/x86_64/
-network bridge:br0\
-f /data/images/disk.img
then i could see how it was downloading the necessary files to start the installation. after this it prompted the language menu. the next menu shown is the "Configuration TCP/IP" it shows the ipv4 & ipv6 with the options of automatically configure (dhcp) o manual. i disabled ipv6 because im not using it and did the manual conf of ipv4 i tried diferent ip's but i didn't get nothing.
is a bit wierd that if you attach a network interface to you guest then it shows the configuration TCP/IP when actually the br0 tells the VM how to connect or i'm mistaken¬ø?¬ø?¬ø?¬ø
if something is obvious i'm sorry but i'm a noob
i'm quite lost!!!0 -
okay, i understand. on my CentOS box (ver 5.2) i first made sure i had the following packages installed:
python-virtinst
xen
qemu
libvirt
then I did:service libvirtd start
then, to create a test image, i did:virt-install \ --os-type=linux \ -c /data/iso/Fedora-10-i386-DVD.iso \ -f /data/F10-virt-OS \ -d
it asked me a couple questions (about file size, graphics, etc.) then launched the standard Fedora 10 boot menu you see when installing from the DVD.
in my virt-install command, i did not include a lot of your other parameters, b/c i just wanted to see if i could get an install to start.0 -
hi again atreyu
i did what you posted but i had to add a couple of things like the name of the guest & -file (wich i created with qemu-kvm of type qcow2).
the -d (debug) went fine without any errors
with the large command it showed me:
Starting install ....
Retrieving file .treeinfo....
Rretrieving file vmlinuz....
Retrieving initrd.im ....
creating domain
connected to domain BXVI
and then it enteres the text based installation but i get stuck in a part where i commented in the first post
with the command you put it only prints
Lots of debuging stuff
xml file
Creating domain...
2 debug lines
a big piece of XML
connected to domain BXVI
Escape character is ^]
it gets stuck here
it doesn't appear a text based installation as with the large command i tiped before. even if i add -x "console=ttyS0"
i have all those paquets installed and libvirtd appears to work fine
thanks for your response but i'm not getting further
any other idea¬ø?¬ø?0 -
i was able to replicate your problem on my CentOS box by calling virt-install with the ISO being named using '-l' like you said you did:
-l /data/iso/Fedora-10-i386-DVD.iso
but if i call it with '-c', then it works (for me):
-c /data/iso/Fedora-10-i386-DVD.iso
does that make a difference?0 -
hi atreyu
thanks once again to post.
i have tried with "-c" or "--cdrom" but it just gets stuck at "connected to domain" "Escape character is ^]" i don't know what the heck is going on.
at least with -l or --location it showed the menu installation but as before i don't know when it reaches the part of chossing the "Installation Method" i'm quite lost ;(
what do you guess its going on with my server o whatever so you could execute with -c or --cdrom and i get stuck if i use them.0 -
wikisb wrote:hi atreyu
thanks once again to post.
i have tried with "-c" or "--cdrom" but it just gets stuck at "connected to domain" "Escape character is ^]" i don't know what the heck is going on.
at least with -l or --location it showed the menu installation but as before i don't know when it reaches the part of chossing the "Installation Method" i'm quite lost ;(
what do you guess its going on with my server o whatever so you could execute with -c or --cdrom and i get stuck if i use them.0 -
hi again atreyu it seems that you are the only who is helping here
sorry for posting things a bit late. i'm becoming feed up of it, im becoming frustated
i have tried what you said trying with "--vnc"
as i haven't got SDL libraries neither others of graphical things it prompted this :
"(virt-viewer:9095) Gtk-WARNING **: cannot open display: Domain installation still in progress. You can reconnect to the console to complete the installation process" (the normal thing should be "running server 127.0.0.1 port 5900"???)
i supose that i will have to connect with my server with putty or a similar program. my server si called "fsystem" and has a static ip as i havent put a specific port to vnc the port where is working vnc its 5900.
so i have put in putty the static ip of my server and the port 5900 but it doesn't connect.
with virsh list --all i get the VM running but i can't acces to it to install the OS guest.
also i wanted to try with an xml. i pasted a xml file from one of my VM that i couldn't install(i did destroy & undefine of that VM) and changed some things so it showed the device /dev/cdrom or exactly the path of the iso. i did virsh create or define name.xml but i can't acces to it to begin the installation. if i do virsh list --all i see the VM of the xml running but nothing else
i have done virsh console nameVM and it connects to domain but it only prints Espace character is ^] and it doesn't do nothing else.0 -
wikisb wrote:hi again atreyu it seems that you are the only who is helping here
sorry for posting things a bit late. i'm becoming feed up of it, im becoming frustated
i have tried what you said trying with "--vnc"
as i haven't got SDL libraries neither others of graphical things it prompted this :
"(virt-viewer:9095) Gtk-WARNING **: cannot open display: Domain installation still in progress. You can reconnect to the console to complete the installation process" (the normal thing should be "running server 127.0.0.1 port 5900"???)
i supose that i will have to connect with my server with putty or a similar program. my server si called "fsystem" and has a static ip as i havent put a specific port to vnc the port where is working vnc its 5900.
so i have put in putty the static ip of my server and the port 5900 but it doesn't connect.
with virsh list --all i get the VM running but i can't acces to it to install the OS guest.
also i wanted to try with an xml. i pasted a xml file from one of my VM that i couldn't install(i did destroy & undefine of that VM) and changed some things so it showed the device /dev/cdrom or exactly the path of the iso. i did virsh create or define name.xml but i can't acces to it to begin the installation. if i do virsh list --all i see the VM of the xml running but nothing else
i have done virsh console nameVM and it connects to domain but it only prints Espace character is ^] and it doesn't do nothing else.0 -
I am sorry that I have been offline and haven't been able to help, I have been working on system upgrades. It is good to see that you have gotten some of your issues resolved.
It sounds like your no-hui option is blocking the GUI based installers from completing, removing the no-gui option as atreyu stated for the basic installation and adding it for future boots sounds like the best option for your problems.
I will jump into your problem this evening following all of your posts and will reply with the exact steps I have taken and any solutions I may find.0 -
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...0 -
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 nothing0 -
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!!0 -
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).0 -
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 !!0 -
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 !!
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...0 -
hi atreyu
now i will try xming and try what you told me.
also i wrote to libvirt team and they told me this:
"Using --location with a CDROM doesn't really work all that well. The easiest
thing to do is mount that ISO somewhere and export the directory over HTTP,
then use --location http://localhost/path/to/the/mounted/iso and it should all
work"
but i don't know how to export the mounted iso over HTTP i have searched a bit but...i have seen a side for client and another for server, but i guess that maybe there is a way to export it at server(my host) and with virt-install(the same host) puting -l http://localhost/PATH/to/mounted/ISO. or i am saying a stupid thing¬ø?0 -
wikisb wrote:hi atreyu
now i will try xming and try what you told me.
also i wrote to libvirt team and they told me this:
"Using --location with a CDROM doesn't really work all that well. The easiest
thing to do is mount that ISO somewhere and export the directory over HTTP,
then use --location http://localhost/path/to/the/mounted/iso and it should all
work"
but i don't know how to export the mounted iso over HTTP i have searched a bit but...i have seen a side for client and another for server, but i guess that maybe there is a way to export it at server(my host) and with virt-install(the same host) puting -l http://localhost/PATH/to/mounted/ISO. or i am saying a stupid thing¬ø?
Good idea contacting the libvirt team.
Doing the exporting over HTTP thing is not too hard to do, but I don't think that is your problem. Let's tackle Xming first.
But to get you prepped for the exporting thing, you'll need Apache running on the CentOS box - can you install it, or is it already installed? The package is called httpd. Check if installed with:rpm -qv httpd
See if running with:service httpd status
0 -
yes you are right it is a bit of a mess having a linux VM conected via ssh to my server to create VM. but my first intention was to create all the VM manually in the server without any other pc's or VM0
-
wikisb wrote:yes you are right it is a bit of a mess having a linux VM conected via ssh to my server to create VM. but my first intention was to create all the VM manually in the server without any other pc's or VM
btw, that reminds me: if you had a kickstart file (they are popular with PXE/network installs) that was 100% correct and contained all the required parameters to enable the install to run completely automated - you wouldn't even need a console/window to walk thru the install. but that is for another day...0 -
im with Xming
im sorry but im a little bit dumb with it. it suposes to run the graphical interface of programs of remote pc's ? well i'm not getting it.
i do XLaunch then i select option "multiple window"->start_client-> start_program=xterm(no options to chose) Run remote using putty ip of my server , user root & pasword empty clipboard enabled -> Additional parameters i have it empty-> Finish
then apears a putty window to put the password i put it but then it seems that nothing happens although putty its running in background it seems.
i don't know if i'm suposed to do this or what0 -
wikisb wrote:im with Xming
im sorry but im a little bit dumb with it. it suposes to run the graphical interface of programs of remote pc's ? well i'm not getting it.
i do XLaunch then i select option "multiple window"->start_client-> start_program=xterm(no options to chose) Run remote using putty ip of my server , user root & pasword empty clipboard enabled -> Additional parameters i have it empty-> Finish
then apears a putty window to put the password i put it but then it seems that nothing happens although putty its running in background it seems.
i don't know if i'm suposed to do this or what
this worked for me - download putty from here:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
then:
1. Run putty.exe
2. In the pane on the left, click on Session,
2. In the pane on the right, in the Host name field on the right, type your CentOS ip address
3. In the pane on the left, under Connection, expand SSH and click on X11
4. check the box marked Enable X11 forwarding
5. Click Open button
you may get a warning about keys or something, just click ok or whatever.
you should get a black terminal window pop up, prompting you to log in. Log in as root w/root's password. Now echo $DISPLAY, you should get something back. Now try virt-install...
make sure you have Xming started first, though - you should see the little black X icon in your system tray.0 -
thanks alot for helping me atreyu
i'm friendly with putty
i have done what you told me connect to my server with putty enabling X11 forwarding.
doing echo $DISPLAY it print me a blank line.
then doing virt-install again it happens the same thing as before when it enters "Installation Method" i can't do nothing.
i have Xming in my system tray but it seems it does nothing. if i right click on it and enable root window it appears a full window white and black pixeled and nothing more0 -
wikisb wrote:thanks alot for helping me atreyu
i'm friendly with putty
i have done what you told me connect to my server with putty enabling X11 forwarding.
doing echo $DISPLAY it print me a blank line.
then doing virt-install again it happens the same thing as before when it enters "Installation Method" i can't do nothing.
i have Xming in my system tray but it seems it does nothing. if i right click on it and enable root window it appears a full window white and black pixeled and nothing more
/etc/ssh/sshd_config
It should be set to yes, but might default to no. If you do have to change it, restart the SSH daemon when you're done:service sshd restart
If it is already enabled, it must be something else...
EDIT: You might also need to make sure that the package xorg-x11-xauth is installed on your CentOS server.
EDIT2: On your CentOS server, keep a tail running of your messages and secure logs, to give you any additional clues, e.g.:tail -f /var/log/messages tail -f /var/log/secure
0 -
And you must make sure your X server listens on TCP connetions0
-
marc wrote:And you must make sure your X server listens on TCP connetions
I thought the exact same thing, but I double-checked how X was launched on my Linux workstation and it was called with the -nolisten tcp flag, and yet it worked. Or is it some other setting?0 -
Hi All,
You may wish to try building out a logical volume in order to get virt-install working. This may solve your blank "black screen" issues.
Cheers,
PB0 -
atreyu wrote:marc wrote:And you must make sure your X server listens on TCP connetions
I thought the exact same thing, but I double-checked how X was launched on my Linux workstation and it was called with the -nolisten tcp flag, and yet it worked. Or is it some other setting?
There probably is if you are using a session manager like KDM or GDM.
In fact, this is one of the few things I do not like in KDE software: kdm launches X reading options from a different place from the defaults...
Regards0 -
yes you are right it is a bit of a mess having a linux VM conected via ssh to my server to create VM. but my first intention was to create all the VM manually in the server without any other pc's or VM
The Synapses0
Categories
- All Categories
- 167 LFX Mentorship
- 219 LFX Mentorship: Linux Kernel
- 795 Linux Foundation IT Professional Programs
- 355 Cloud Engineer IT Professional Program
- 179 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 127 Cloud Native Developer IT Professional Program
- 112 Express Training Courses
- 112 Express Courses - Discussion Forum
- 6.2K Training Courses
- 48 LFC110 Class Forum - Discontinued
- 17 LFC131 Class Forum
- 35 LFD102 Class Forum
- 227 LFD103 Class Forum
- 14 LFD110 Class Forum
- 39 LFD121 Class Forum
- 15 LFD133 Class Forum
- 7 LFD134 Class Forum
- 17 LFD137 Class Forum
- 63 LFD201 Class Forum
- 3 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 1 LFD233 Class Forum
- 2 LFD237 Class Forum
- 23 LFD254 Class Forum
- 697 LFD259 Class Forum
- 109 LFD272 Class Forum
- 3 LFD272-JP クラス フォーラム
- 10 LFD273 Class Forum
- 152 LFS101 Class Forum
- 1 LFS111 Class Forum
- 1 LFS112 Class Forum
- 1 LFS116 Class Forum
- 1 LFS118 Class Forum
- LFS120 Class Forum
- 7 LFS142 Class Forum
- 7 LFS144 Class Forum
- 3 LFS145 Class Forum
- 1 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 1 LFS157 Class Forum
- 33 LFS158 Class Forum
- 8 LFS162 Class Forum
- 1 LFS166 Class Forum
- 1 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 1 LFS178 Class Forum
- 1 LFS180 Class Forum
- 1 LFS182 Class Forum
- 1 LFS183 Class Forum
- 29 LFS200 Class Forum
- 736 LFS201 Class Forum - Discontinued
- 2 LFS201-JP クラス フォーラム
- 14 LFS203 Class Forum
- 102 LFS207 Class Forum
- 1 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 301 LFS211 Class Forum
- 55 LFS216 Class Forum
- 48 LFS241 Class Forum
- 42 LFS242 Class Forum
- 37 LFS243 Class Forum
- 15 LFS244 Class Forum
- LFS245 Class Forum
- LFS246 Class Forum
- 50 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 154 LFS253 Class Forum
- LFS254 Class Forum
- LFS255 Class Forum
- 5 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.3K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 111 LFS260 Class Forum
- 159 LFS261 Class Forum
- 41 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 20 LFS267 Class Forum
- 24 LFS268 Class Forum
- 29 LFS269 Class Forum
- 1 LFS270 Class Forum
- 199 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- 3 LFS281 Class Forum
- 9 LFW111 Class Forum
- 260 LFW211 Class Forum
- 182 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 782 Hardware
- 198 Drivers
- 68 I/O Devices
- 37 Monitors
- 96 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 83 Storage
- 743 Linux Distributions
- 80 Debian
- 67 Fedora
- 15 Linux Mint
- 13 Mageia
- 23 openSUSE
- 143 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 348 Ubuntu
- 461 Linux System Administration
- 39 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 90 Linux Security
- 77 Network Management
- 101 System Management
- 46 Web Management
- 64 Mobile Computing
- 17 Android
- 34 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 19 Study Material
- 507 Programming and Development
- 285 Kernel Development
- 204 Software Development
- 1.8K Software
- 211 Applications
- 180 Command Line
- 3 Compiling/Installing
- 405 Games
- 309 Installation
- 97 All In Program
- 97 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)