Running virt-install without X

View: New views
5 Messages — Rating Filter:   Alert me  

Running virt-install without X

by Keith Edmunds-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

New to list. I couldn't find a searchable archive of this ML, so
apologies if this has been asked before (feel free to flame me, but
please include a pointer to where I can find the answer).

I've been looking at KVM virtualisation recently. I want to use it on a
hosted server without X installed, and I want to be able to create new
(Linux) guests from the command line.

virt-install lets me kick off an installation, but everything I've tried
so far needs a graphical terminal of some sort to carry out the
text-based (Debian Lenny) installation. Once the installation is
complete, I can use 'virsh' to connect to the serial console and that
works fine.

I suspect the key is in virt-install's '--nographics' option, but I
can't seem to connect to the console to carry out the installation
after using that option. Can anyone shed some light?

(Just to be clear: I want to do everything via an ssh session, so no
VNC, etc).

Thanks,
Keith

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Parent Message unknown Re: Running virt-install without X

by bodhi zazen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You have several options.

First is virsh

Second is to run kvm directly from the command line. You then use the option -vnc :0

Third is to use one of several web interfaces (Personally I advise Proxmox, there are others).

On Fri, Jul 17, 2009 at 10:31 PM, Bodhi Zazen <bodhi.zazen@...> wrote:

----- Forwarded Message -----
From: "Keith Edmunds" <kae@...>
To: et-mgmt-tools@...
Sent: Friday, July 17, 2009 3:44:18 PM GMT -07:00 US/Canada Mountain
Subject: [et-mgmt-tools] Running virt-install without X

New to list. I couldn't find a searchable archive of this ML, so
apologies if this has been asked before (feel free to flame me, but
please include a pointer to where I can find the answer).

I've been looking at KVM virtualisation recently. I want to use it on a
hosted server without X installed, and I want to be able to create new
(Linux) guests from the command line.

virt-install lets me kick off an installation, but everything I've tried
so far needs a graphical terminal of some sort to carry out the
text-based (Debian Lenny) installation. Once the installation is
complete, I can use 'virsh' to connect to the serial console and that
works fine.

I suspect the key is in virt-install's '--nographics' option, but I
can't seem to connect to the console to carry out the installation
after using that option. Can anyone shed some light?

(Just to be clear: I want to do everything via an ssh session, so no
VNC, etc).

Thanks,
Keith

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools


_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Re: Running virt-install without X

by Keith Edmunds-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

bodhi zazen <bodhi.zazen@...> wrote:

> First is virsh

I didn't realise I could create a new guest from virsh, so that may be
helpful: thank you. Could you give me a sample command line that will boot
from an ISO image and start the guest installation?

> Second is to run kvm directly from the command line. You then use the
> option -vnc :0

I explicitly stated that I didn't want to use X anywhere, including vnc,
so that option won't work.

> Third is to use one of several web interfaces (Personally I advise
> Proxmox, there are others).

Thanks again. I Googled Proxmox: it seems to be some kind of
commercial anti-spam gateway with a "free" "lite" version. Not sure how
that fits in to creating new guests on a KVM server. Also, it would seem
to require X as it requires a web interface. Yes, I'm aware of links et
al, but I don't really need them to install Linux.

I don't think I've explained what I'm looking for very clearly, for which
I apologise. Let me give a practical example. I'd like to ssh to a remote
host, not running X, and download the latest Debian installer .iso. Debian
has a text-mode installer. I'd like to create a new KVM guest on that
server and "boot" the Debian iso and have the text-mode installation
output come up in the ssh session, or at least have it accessible from the
ssh session. Once the installation is complete, I can boot the guest into
Debian proper.

I can do almost all of that today; however, I use virt-install and it pops
up a window containing the text-mode, character-based installation. I just
need to redirect that so that instead of going to a separate window, the
text mode installation is accessible directly from the ssh session. My
suspicion was that virt-install's '--nographics' mode would be the clue to
achieve what I want, but I've not been successful.

Thanks for taking the time to make suggestions.

Keith

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Parent Message unknown Re: Running virt-install without X

by bodhi zazen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Umm ... I think virsh is what you want, slthough I do not think you understand what I told you about KVM.

You will need to connect to the Debian installer somehow if you go that route, I am not familiar with it and I am not sure if you can simply boot the iso and then connect to the guest via ssh.

For virsh, since I see your google is broken =)

http://linux.die.net/man/1/virsh

http://prefetch.net/blog/index.php/2009/06/15/migrating-kvm-hosts-with-virsh/

http://docs.sun.com/app/docs/doc/819-2450/6n4o5me9j?a=view

http://www.howtoforge.com/virtualization-with-kvm-on-ubuntu-9.04-p3

https://help.ubuntu.com/community/KVM/Managing

That should certainly get you started.

As far as running KVM without X I suggest you read man qemu

Or try this blog :

http://blog.bodhizazen.net/linux/how-to-run-kvm-without-x/

with the -vnc flag you can run without X

-vnc none

or , since you are installing from an iso, -vnc :0 (or what have you) so you may connect to the installer from remote.

Neither -vnc none or -vnc :0 require X at all on the (host) server or guest (you can connect via vnc to a minimal guest with no X installed on either host or guest).

Happy reading =)



On Fri, Jul 17, 2009 at 10:31 PM, Bodhi Zazen <bodhi.zazen@...> wrote:

----- Forwarded Message -----
From: "Keith Edmunds" <kae@...>
To: et-mgmt-tools@...
Sent: Friday, July 17, 2009 3:44:18 PM GMT -07:00 US/Canada Mountain
Subject: [et-mgmt-tools] Running virt-install without X

New to list. I couldn't find a searchable archive of this ML, so
apologies if this has been asked before (feel free to flame me, but
please include a pointer to where I can find the answer).

I've been looking at KVM virtualisation recently. I want to use it on a
hosted server without X installed, and I want to be able to create new
(Linux) guests from the command line.

virt-install lets me kick off an installation, but everything I've tried
so far needs a graphical terminal of some sort to carry out the
text-based (Debian Lenny) installation. Once the installation is
complete, I can use 'virsh' to connect to the serial console and that
works fine.

I suspect the key is in virt-install's '--nographics' option, but I
can't seem to connect to the console to carry out the installation
after using that option. Can anyone shed some light?

(Just to be clear: I want to do everything via an ssh session, so no
VNC, etc).

Thanks,
Keith

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools


_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Re: Running virt-install without X

by Cole Robinson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

(cc'ing virt-tools-list, since et-mgmt-tools is being discontinued)

Keith Edmunds wrote:

> New to list. I couldn't find a searchable archive of this ML, so
> apologies if this has been asked before (feel free to flame me, but
> please include a pointer to where I can find the answer).
>
> I've been looking at KVM virtualisation recently. I want to use it on a
> hosted server without X installed, and I want to be able to create new
> (Linux) guests from the command line.
>
> virt-install lets me kick off an installation, but everything I've tried
> so far needs a graphical terminal of some sort to carry out the
> text-based (Debian Lenny) installation. Once the installation is
> complete, I can use 'virsh' to connect to the serial console and that
> works fine.
>
> I suspect the key is in virt-install's '--nographics' option, but I
> can't seem to connect to the console to carry out the installation
> after using that option. Can anyone shed some light?
>

You need to set up the install to go over serial console. The easiest way to
do this is to install from URL (or mount an install dvd and point to the
directory) with --location. You can then use the --extra-args parameter to
pass arguments to the boot kernel: something like console=ttyS0 should set up
a text console.

Not sure if the debian installer needs extra args to force it into text mode,
might want to check out:

http://www.debian.org/releases/stable/i386/ch05s03.html.en#installer-args

> (Just to be clear: I want to do everything via an ssh session, so no
> VNC, etc).

Well, you can do ssh with X forwarding, but my guess is that's not what you meant.

- Cole

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools