Hi, Been fighting with this for a long time and have narrowed my issues down to one item...
How to use a iso image file to install a guest os with centos6?
I installed centos6 with the virt host package.
According to few obscure sites virt-install cannot use local media iso to install guests. With virt-manager I was able to use the same iso to make a guest, but I do not want the gui on the server.
I tried mounting, umounting it..I tried using dd to bring the bootable iso from the cdrom.
the issue I think, but not sure, is the use of the console directive with virt-install. It appears --extra-args="console=tty0 console=ttyS0,115200" works fine when using --location, but not --cdrom
Unfortunately '--location" will ignore the path provided for the local iso and want to go to a url, an nfs, a virtual hard drive or cdrom....thus not able to install from local media. However, the text installer does come up.
when using "--cdrom" and use location to the different ISO's I added the console will not come up as the --extra-args="console=tty0 console=ttyS0,115200" is ignored I assume.
I cannot believe that the only way to install a guest on my machine is to use the desktop gui or a remote iso only. There has to be a way to install via the local iso...
I have tried about 40 times with different ideas, even playing with the files on the mounted bootable iso. However, the console only works with --location thus unusable.....sigh.
any help appreciated.
here is just a basic example of my attempts virt-install --name test --ram=1024 --vcpus=1 --prompt --nographics --location=/backups/backup1/centos6.iso --extra-args="console=tty0 console=ttyS0,115200"
I do not want VNC since again, that is not part of the normal install and is again asking me to use a remote computer to install on my local one, which is just not right. There must be a way to install on my local computer, from my local computer, from local file, a local guest.... isn't there?
Run virt-manager on a separate machine, and use the COS6 minimal iso for the install. Haven't done this yet myself, but I'd bet it will work.
On 10/26/2011 02:37 PM, Bob Hoffman wrote:
Hi, Been fighting with this for a long time and have narrowed my issues down to one item...
How to use a iso image file to install a guest os with centos6?
I installed centos6 with the virt host package.
According to few obscure sites virt-install cannot use local media iso to install guests. With virt-manager I was able to use the same iso to make a guest, but I do not want the gui on the server.
I tried mounting, umounting it..I tried using dd to bring the bootable iso from the cdrom.
the issue I think, but not sure, is the use of the console directive with virt-install. It appears --extra-args="console=tty0 console=ttyS0,115200" works fine when using --location, but not --cdrom
Unfortunately '--location" will ignore the path provided for the local iso and want to go to a url, an nfs, a virtual hard drive or cdrom....thus not able to install from local media. However, the text installer does come up.
when using "--cdrom" and use location to the different ISO's I added the console will not come up as the --extra-args="console=tty0 console=ttyS0,115200" is ignored I assume.
I cannot believe that the only way to install a guest on my machine is to use the desktop gui or a remote iso only. There has to be a way to install via the local iso...
I have tried about 40 times with different ideas, even playing with the files on the mounted bootable iso. However, the console only works with --location thus unusable.....sigh.
any help appreciated.
here is just a basic example of my attempts virt-install --name test --ram=1024 --vcpus=1 --prompt --nographics --location=/backups/backup1/centos6.iso --extra-args="console=tty0 console=ttyS0,115200"
I do not want VNC since again, that is not part of the normal install and is again asking me to use a remote computer to install on my local one, which is just not right. There must be a way to install on my local computer, from my local computer, from local file, a local guest.... isn't there?
Eric wrote ---------------------
Run virt-manager on a separate machine, and use the COS6 minimal iso for the install. Haven't done this yet myself, but I'd bet it will work. --------------------
From what I understand to do so actually sets up a gui session on the server, thus I would have to install both x windows and gnome desktop...and in that case I would be able to do it locally anyway...
Virt manager can use an iso file. It appears the command line tool virt-install cannot 'out of the box' and something has to be done to allow local iso to be installed.
I was thinking about mounting the file, making it a nfs, turning on nfs and learning how to configure that, then try to use that to install via a local nfs folder containing the mounted iso.
In learning about this issue I know see the thousands of posts online from people having trouble with virt-install in a new light. Local install from local files seems a very big bump in the road.
I wonder what virt-manager does that virt-install does not do to use that local .iso image? it must load it somehow and then 'fake' boot it since virt-install keeps looking for boot.iso when I run it on a mounted cd image.
On 10/26/2011 04:14 PM, Bob Hoffman wrote:
Eric wrote
Run virt-manager on a separate machine, and use the COS6 minimal iso for the install. Haven't done this yet myself, but I'd bet it will work.
From what I understand to do so actually sets up a gui session on the server, thus I would have to install both x windows and gnome desktop...and in that case I would be able to do it locally anyway...
That's not my understanding. I watched someone else follow the procedure here: http://www.howtoforge.com/virtualization-with-kvm-on-a-centos-6.0-server and I believe he started with the minimal installation on the host.
Virt manager can use an iso file. It appears the command line tool virt-install cannot 'out of the box' and something has to be done to allow local iso to be installed.
The howto above shows a .iso file being used with virt-install. I don't know why there would be a problem using either method.
I was thinking about mounting the file, making it a nfs, turning on nfs and learning how to configure that, then try to use that to install via a local nfs folder containing the mounted iso.
In learning about this issue I know see the thousands of posts online from people having trouble with virt-install in a new light. Local install from local files seems a very big bump in the road.
I wonder what virt-manager does that virt-install does not do to use that local .iso image? it must load it somehow and then 'fake' boot it since virt-install keeps looking for boot.iso when I run it on a mounted cd image.
eric wrote
---------------------
That's not my understanding. I watched someone else follow the procedure here: http://www.howtoforge.com/virtualization-with-kvm-on-a-centos-6.0-server and I believe he started with the minimal installation on the host.
--------------------
and then you find he also had installed the desktop on the next page and using virt-manager to view it. I would rather not have the desktop and x installed.
I dunno...been weeks on this with no other option than to install the desktop. Might just have to give up and do the desktop with no other options available.
centos6 too new, kvm too new, not much info out there. sigh.
On 10/26/2011 04:48 PM, Bob Hoffman wrote:
eric wrote
That's not my understanding. I watched someone else follow the procedure here: http://www.howtoforge.com/virtualization-with-kvm-on-a-centos-6.0-server and I believe he started with the minimal installation on the host.
and then you find he also had installed the desktop on the next page and using virt-manager to view it. I would rather not have the desktop and x installed.
That can be on any *other* computer, like a laptop. You don't need (or want) to run virt-manager on the host itself. You can manage your VMs from any workstation/client that's attached to the network.
I dunno...been weeks on this with no other option than to install the desktop. Might just have to give up and do the desktop with no other options available.
centos6 too new, kvm too new, not much info out there. sigh.
eric wrote -------------------
That's not my understanding. I watched someone else follow the procedure here: http://www.howtoforge.com/virtualization-with-kvm-on-a-centos-6.0-server and I believe he started with the minimal installation on the host.
- -------------------
thought I missed something and re-read....his next page says he is using netinstall and ....wait for it.. connecting to remote server to get the media to install the guest..
seems impossible I guess...gonna need to set up a home server for my production server to install guests.. seems like an extraordinary waste of bandwidth to do it that way.
You can do virt-manager remotely. Either connect to libvirt remotely through a locally running instance of virt-manager or via X11 forwarding. I do the 2nd method with no GUI installed on the server. See here for minimal packages needed... http://itscblog.tamu.edu/startup-guide-for-kvm-on-centos-6/ . I do that from a Mac. My home desktop is Linux so for that i only remote connect to libvirt with my user ( not root) account using PolicyKit. Instructions for that also on the link above.
- Trey On Oct 26, 2011 6:56 PM, "Bob Hoffman" bob@bobhoffman.com wrote:
eric wrote
That's not my understanding. I watched someone else follow the procedure here: http://www.howtoforge.com/virtualization-with-kvm-on-a-centos-6.0-server and I believe he started with the minimal installation on the host.
thought I missed something and re-read....his next page says he is using netinstall and ....wait for it.. connecting to remote server to get the media to install the guest..
seems impossible I guess...gonna need to set up a home server for my production server to install guests.. seems like an extraordinary waste of bandwidth to do it that way. _______________________________________________ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
trey wrote ------------------------------
You can do virt-manager remotely. Either connect to libvirt remotely through a locally running instance of virt-manager or via X11 forwarding. I do the 2nd method with no GUI installed on the server. See here for minimal packages needed... http://itscblog.tamu.edu/startup-guide-for-kvm-on-centos-6/ . I do that from a Mac. My home desktop is Linux so for that i only remote connect to libvirt with my user ( not root) account using PolicyKit. Instructions for that also on the link above. ---------------------
Yea, I am afraid going command line only is impossible as suggested by so many. Even you have installed X to make it work.
I was able to do one install where I did the virtual host package first. Then I would install x and desktop. This would allow me to stay in command line and go to desktop by using startx...then ctrl-alt-backspace out of it when done.
According to a few sources, it is impossible to use local install sources through virt-install but virt-manager would work. Locally, not remotely.
Since X seems to HAVE to be installed whether you use virt-viewer, virt-manager, vnc, or just about anything else, I guess I would have to ask redhat why the virtual host package included no gui system at all...
I think that is the way I am going to go, just x and desktop via a startx, then get out when done. I can see no viable local solution available at all.
It seemed to work okay. And it allows a local iso to be used preventing the need for any remote programs added....and allowing me to keep port 22 off, closing the host off completely for security except for my ipmi card. And that is preferred.
thanks for helping all. I guess using command line without x/desktop/etc and being local is not possible for rhel/centos yet. C'est live, must move on and go with what works regardless....whee on to next problem.
On 10/26/2011 07:14 PM, Bob Hoffman wrote:
trey wrote
You can do virt-manager remotely. Either connect to libvirt remotely through a locally running instance of virt-manager or via X11 forwarding. I do the 2nd method with no GUI installed on the server. See here for minimal packages needed... http://itscblog.tamu.edu/startup-guide-for-kvm-on-centos-6/ . I do that from a Mac. My home desktop is Linux so for that i only remote connect to libvirt with my user ( not root) account using PolicyKit. Instructions for that also on the link above.
Yea, I am afraid going command line only is impossible as suggested by so many. Even you have installed X to make it work.
I was able to do one install where I did the virtual host package first. Then I would install x and desktop. This would allow me to stay in command line and go to desktop by using startx...then ctrl-alt-backspace out of it when done.
According to a few sources, it is impossible to use local install sources through virt-install but virt-manager would work. Locally, not remotely.
Since X seems to HAVE to be installed whether you use virt-viewer, virt-manager, vnc, or just about anything else, I guess I would have to ask redhat why the virtual host package included no gui system at all...
This is ABSOLUTELY NOT TRUE! You can run virt-manager on a separate machine, connected via network to the KVM server. The server DOES NOT NEED TO HAVE X INSTALLED AT ALL.
I think that is the way I am going to go, just x and desktop via a startx, then get out when done. I can see no viable local solution available at all.
It seemed to work okay. And it allows a local iso to be used preventing the need for any remote programs added....and allowing me to keep port 22 off, closing the host off completely for security except for my ipmi card. And that is preferred.
thanks for helping all. I guess using command line without x/desktop/etc and being local is not possible for rhel/centos yet.
I just witnessed it being done on Saturday. It is possible, now. This was a CentOS6 host, with minimal install.
C'est live, must move on and go with what works regardless....whee on to next problem.
Eric is right. You can connect remotely without even installing virt-manager on the server. Only needs to have libvird running.
I did a minimal install of CentOS 6 with the 4 virtual package groups. My system as no startx or run level 5. In my case I have to use X11 forwarding but that doesnt require X on the server. At most I have a few font libraries and X libraries but not the X server. X11 is backwards from the standard client/server model. The X server in the case of X11 forwarding is on my local desktop.
- Trey On Oct 26, 2011 10:00 PM, "Eric Shubert" ejs@shubes.net wrote:
On 10/26/2011 07:14 PM, Bob Hoffman wrote:
trey wrote
You can do virt-manager remotely. Either connect to libvirt remotely through a locally running instance of virt-manager or via X11 forwarding.
I
do the 2nd method with no GUI installed on the server. See here for
minimal
packages needed... http://itscblog.tamu.edu/startup-guide-for-kvm-on-centos-6/ . I do
that
from a Mac. My home desktop is Linux so for that i only remote connect
to
libvirt with my user ( not root) account using PolicyKit. Instructions
for
that also on the link above.
Yea, I am afraid going command line only is impossible as suggested by so
many. Even you
have installed X to make it work.
I was able to do one install where I did the virtual host package first. Then I would install x and desktop. This would allow me to stay in
command line
and go to desktop by using startx...then ctrl-alt-backspace out of it
when done.
According to a few sources, it is impossible to use local install sources
through virt-install
but virt-manager would work. Locally, not remotely.
Since X seems to HAVE to be installed whether you use virt-viewer,
virt-manager, vnc, or
just about anything else, I guess I would have to ask redhat why the
virtual host package included
no gui system at all...
This is ABSOLUTELY NOT TRUE! You can run virt-manager on a separate machine, connected via network to the KVM server. The server DOES NOT NEED TO HAVE X INSTALLED AT ALL.
I think that is the way I am going to go, just x and desktop via a
startx, then get out when done.
I can see no viable local solution available at all.
It seemed to work okay. And it allows a local iso to be used preventing
the need for any remote
programs added....and allowing me to keep port 22 off, closing the host
off completely for security
except for my ipmi card. And that is preferred.
thanks for helping all. I guess using command line without x/desktop/etc
and being local is not
possible for rhel/centos yet.
I just witnessed it being done on Saturday. It is possible, now. This was a CentOS6 host, with minimal install.
C'est live, must move on and go with what works regardless....whee on to next problem.
-- -Eric 'shubes'
CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Trey Dockendorf wrote
----------------------------------
Eric is right. You can connect remotely without even installing virt-manager on the server. Only needs to have libvird running.
I did a minimal install of CentOS 6 with the 4 virtual package groups. My system as no startx or run level 5. In my case I have to use X11 forwarding but that doesnt require X on the server. At most I have a few font libraries and X libraries but not the X server. X11 is backwards from the standard client/server model. The X server in the case of X11 forwarding is on my local desktop.
-------------------------
I believe ya guys. However I could not install from a local source media (an iso) no matter what I did. The techs at dell put up some papers that specifically noted that using local media to install is not an ability that can be done with virt-install, whether you access the server remotely or not.
In all cases I have found, the installation starts on the local server (like netinstall or what have you) then it calls out somewhere remotely to actually install.
I could not get virt-manager, the only thing that can use local media to run remotely with initial setup. Not without installing some kind of X server or system. Probably because I ain't all that well versed in it.
With centos6 and kvm together being so new, there is little out there showing the steps with that remote thing.
And honestly, why do I need to do something remotely when I should be able to do it on the host?
I ended up, final install, adding X (which seems to be needed anyway for x forwarding) and a simple desktop. I simply 'startx' to get the gui, add my virt guests, then ctrl-alt-backspace out of it. The pstree shows the kill of the gui gets rid of the whole gui thing.
With the local, I can kill the ability to shell to the system increasing security.
I believe you guys. However, I cannot get it working that way. Not locally, not with local media. There is not one single site or manual that has shown a system where they did a install with local media, not one. All of them, if using command line, access something remotely. sigh.
After a month of this, I think I will stay with what works and go with it. Too much work just to be command line cool.
appreciate the information. I will continue to research a local install from command line....
On 27/10/2011 06:10, Bob Hoffman wrote:
I believe ya guys. However I could not install from a local source media (an iso) no matter what I did. The techs at dell put up some papers that specifically noted that using local media to install is not an ability that can be done with virt-install, whether you access the server remotely or not.
I am sorry but could you list them please? I could really only find http://linux.dell.com/files/whitepapers/KVM_Virtualization_in_RHEL_6_made_ea... which seems to do exactly what you want to do.
I could not get virt-manager, the only thing that can use local media to run remotely with initial setup. Not without installing some kind of X server or system. Probably because I ain't all that well versed in it.
Where are you trying to run virt-manager? On the server or on your desktop?
And honestly, why do I need to do something remotely when I should be able to do it on the host?
I have the feeling that we're at slight odds semantically. What do you actually mean with local/remote? One parsing of your email seems to suggest that you're set with a keyboard and mouse plugged into your server, rather than connected via SSH, perhaps clarify with desktop/local server/remote server?
regards,
roeland wrote
------------------------
I have the feeling that we're at slight odds semantically. What do you actually mean with local/remote? One parsing of your email seems to suggest that you're set with a keyboard and mouse plugged into your server, rather than connected via SSH, perhaps clarify with desktop/local server/remote server?
--------------------
exactly true. I shut off ssh to the server and am solely using the ipmi card interface. It is like sitting at the computer with a keyboard, mouse, and monitor connected. This allows me to access the server from any computer should a need arise (the host that is) and deal with an issue without installing some software on a friends computer. The virtual guests will all have shells (well, the website ones will).
I am not using a remote server for anything. I am using my home computer as a test of remote stuff with ssh still enabled, but it is all local...or trying to be.
If you take a X forward or VNC program...and run it ssh from a remote computer...and are sitting at the server with a monitor+KM plugged in, logged in to the same account you will see what the manuals say is true.. the vnc and x11 forwarding run on the server, export the display remotely, then 'mostly kill' themselves when done.
This precludes having an iso located on the server, using virt-install, to load up guests without using virt-manager. The only other option is to have a remote server (or home server) with the OS for guests, and have your server access it via nfs, ftp, or http. At least for fresh installs. Virt-install cannot use a local iso (meaning on the server). At least not completely, it needs a remote to make it happen.
rhel6 has listed bugs for certain video cards, onboard ones, ati-nvidea-intel are listed. not all, but some. I have one. With these cards some basic things won't work (like the basic x and gnome stuff the virtual host package installs).
To get any kind of x display with these cards you have to install x windows system, run the x configure that will make a x.conf.new file "only for that user", that must be 'somehow' changed for device, mtrr, etc..and add nomodeset to the kernel, etc....just to get a partial ability to use some x...but it still crashes out of it a lot.
The only way I could get any gui with the video card I have is to install a minnimal desktop on top of the x windows i had to install. Red hat is saying that by 6.2 they hope to have fixes for these, but for centos that could mean a year or more before I see them.
Since I had to put more of a full X system and a minimal desktop just to have the ability to remotely display the gui's then I might as well use them locally.
You just 'startx', it runs a small gnome, use virt-manager, get it done, ctrl-alt-backspace out of it.
In all my testing trying remote vnc and x11 with the host, as per the manuals, they only export the display on the host for that user. If the X11 or VNC display crashes out/unable to display on the host, it cannot be transferred out to the remote client.
You can see this is true by simply logging into your server locally, sitting right at it...and then log in remotely with same user and do your remote stuff. You will see how the host actually does run it all and then 'copies/exports' the display.
I wanted to stay pure command line, but without the ability to locally use an iso it demands virt-manager anyway. For my server video card, that means I need x and a small desktop temporarily. Once the systems are set up I will probably just remove both x and desktop anyway.
Virt-install, when trying to use a local iso file, will look for boot.iso and not find it. You cannot make a bootable mounted iso on your harddrive. You would need to use virt-manager (which must do some kind of temporary bootstrap/virtual nfs) or use the local iso with a remote system called to (nfs, ftp, http) like your would with netinstall.
The ipmi card affords me the opportunity to do this as if I was sitting at the server. I prefer this method as I can disable ssh port completely for the host, leaving all incoming ports for the host closed. Leaves just the ipmi card as the fail point, something that would be there anyway.
Once one minimal install is done, you can use virsh and the other tools to simply clone it and play with the networks and no longer need to install anything.
My biggest problem was why the install with virt-install was hanging. Only after reading online and books for a number of weeks did I find a small bit of info on virt-install that specifically states it cannot use a local iso for an install without also going remotely to another server.....
That caused all installs to hang after they started. It caused vnc's and x11's to fail too since it never booted..it just hung. It hangs at connected/use ctrl+] to escape. It presented no error, just hung. I was surprised at this, but once found I learned that virt-manager was the only way to use a local file for full install, loaded x and a little desktop and voila.
Wasn't fun.
Another fun thing I learned, after crashed reboots, is LVM pools that I made in anaconda will work for a guest, but will crash system upon reboot due to them being 'mounted'. This is not quite written out in the manuals. Learned that the hard way. There are hundreds of forums with people complaining about superblock issues with their lvms and guests...now I know why.
learning experience for sure, big hump.
Using startx to start desktop and ctrl-alt-backspace to get out of it seems to be good. It loads its own programs and on exit kills them all. So except for the install, none of the x or desktop stuff is running at all. Ugly, but it works, purely locally with no remote needs.
on to the next hump...bridging and bonding.
On 10/26/2011 04:56 PM, Bob Hoffman wrote:
eric wrote
That's not my understanding. I watched someone else follow the procedure here: http://www.howtoforge.com/virtualization-with-kvm-on-a-centos-6.0-server and I believe he started with the minimal installation on the host.
thought I missed something and re-read....his next page says he is using netinstall and ....wait for it.. connecting to remote server to get the media to install the guest..
seems impossible I guess...gonna need to set up a home server for my production server to install guests.. seems like an extraordinary waste of bandwidth to do it that way.
Wrong. You're making this way more difficult than it is.
Just set up your host as in the directions, and when you get to the point of creating a VM guest, jump to the part about setting up virt-manager, but set that up on a workstation/laptop. On ubuntu for instance, you simply install the virt-manager package. Then create your VM guest using virt-manager. It runs on the workstation, but the VM is created on the server, via a network connection. It's really pretty slick.
You're right to not want to put X on your server. And you don't need to.
On Wed, Oct 26, 2011 at 06:11:02PM -0700, Eric Shubert wrote:
On 10/26/2011 04:56 PM, Bob Hoffman wrote: Wrong. You're making this way more difficult than it is.
Just set up your host as in the directions, and when you get to the point of creating a VM guest, jump to the part about setting up virt-manager, but set that up on a workstation/laptop. On ubuntu for instance, you simply install the virt-manager package. Then create your VM guest using virt-manager. It runs on the workstation, but the VM is created on the server, via a network connection. It's really pretty slick.
You're right to not want to put X on your server. And you don't need to.
It strikes me that OP is trying to do something worth doing -- install from the (apparently broken) command line on the local host from local media.
When some critical infrastructure has broken, I often depend on the ability to work with minimal dependencies. Requiring an operational network plus a 2nd, remote host that has a running X environment seems like too many dependencies for my taste. That it /can/ be accomplished that way does not mean that it /should/ be.
As the OP has so much time invested, the next step could be to get strace, gdb, and the source code and start bug hunting. But one has to pick one's battles.
On 10/30/2011 05:16 PM, Charles Polisher wrote:
On Wed, Oct 26, 2011 at 06:11:02PM -0700, Eric Shubert wrote:
On 10/26/2011 04:56 PM, Bob Hoffman wrote: Wrong. You're making this way more difficult than it is.
Just set up your host as in the directions, and when you get to the point of creating a VM guest, jump to the part about setting up virt-manager, but set that up on a workstation/laptop. On ubuntu for instance, you simply install the virt-manager package. Then create your VM guest using virt-manager. It runs on the workstation, but the VM is created on the server, via a network connection. It's really pretty slick.
You're right to not want to put X on your server. And you don't need to.
It strikes me that OP is trying to do something worth doing -- install from the (apparently broken) command line on the local host from local media.
When some critical infrastructure has broken, I often depend on the ability to work with minimal dependencies. Requiring an operational network plus a 2nd, remote host that has a running X environment seems like too many dependencies for my taste. That it /can/ be accomplished that way does not mean that it /should/ be.
I don't necessarily disagree, in theory. All it takes to connect remotely though is a laptop with a crossover cable. I wouldn't consider that to be too many dependencies. Pretty much just commodity (think crash cart) stuff. My servers are typically all headless, with this sort of access.
Of course, if the CLI command has a bug, we should do what we can to help to get it fixed. In this case though, creating a VM using virt-manager is a good deal easier than using the CLI, so it's just easier to do it that way.
As the OP has so much time invested, the next step could be to get strace, gdb, and the source code and start bug hunting. But one has to pick one's battles.
Agreed.