* [gentoo-admin] KVM guest system installation
@ 2009-05-15 20:35 Reber, Simon
2009-05-16 7:30 ` Mike Kazantsev
0 siblings, 1 reply; 3+ messages in thread
From: Reber, Simon @ 2009-05-15 20:35 UTC (permalink / raw
To: gentoo-admin
Hi all,
We are running several gentoo systems in our datacenter with a basic
installation of gentoo (kernel version 2.6.28-gentoo-r5)
In the kernel, we also have included KVM module support, which so far
works fine.
But we now coming to the point where we want to install virtual guest
systems to some of the systems.
Since the servers are kept very basically do we not have any X packages
installed, nor do we plant to.
But from documentation and experience point of view, does it look like
that we exactly do require something like that.
So my question is, is there any way to install a guest system using KVM
without having X system packages installed or a monitor plugged on?
Meaning booting up the guest system, connecting from the localhost
using some kind of serial console or something like that to connect to
the particular virtual guest and run the installation task?
Thanks and regards,
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-admin] KVM guest system installation
2009-05-15 20:35 [gentoo-admin] KVM guest system installation Reber, Simon
@ 2009-05-16 7:30 ` Mike Kazantsev
2009-05-19 16:05 ` Reber, Simon
0 siblings, 1 reply; 3+ messages in thread
From: Mike Kazantsev @ 2009-05-16 7:30 UTC (permalink / raw
To: gentoo-admin
[-- Attachment #1: Type: text/plain, Size: 2626 bytes --]
On Fri, 15 May 2009 22:35:12 +0200
"Reber, Simon" <linux@cgi-net.ch> wrote:
> But we now coming to the point where we want to install virtual guest
> systems to some of the systems.
> Since the servers are kept very basically do we not have any X packages
> installed, nor do we plant to.
> But from documentation and experience point of view, does it look like
> that we exactly do require something like that.
>
> So my question is, is there any way to install a guest system using KVM
> without having X system packages installed or a monitor plugged on?
> Meaning booting up the guest system, connecting from the localhost
> using some kind of serial console or something like that to connect to
> the particular virtual guest and run the installation task?
I don't know what kind of documentation you've been reading, but there's
no real need for X (especially X-server) on the machine to deply/use kvm
guests there.
If there's need for a graphical install (like MS Windows), you can use
VNC, otherwise ncurses-based interface should suffice to display both
bios data and text terminal, just append "-curses" flag to kvm line.
Of course, all these features should be enabled via use-flags.
And if you still want X for some reason, you can use sdl-based
graphical output thru X-forwarding, with a few additional libs (and X
flag enabled for ssh/sdl).
Just an example of kvm start:
exec kvm \
-name "$VM" \
-cpu core2duo \
-smp 8 \
-m "$MEM" \
-drive file=/dev/mapper/vm_root-$VM,if=virtio \
-drive file=/dev/mapper/vm_swap-$VM,if=virtio \
-net nic,vlan=0,model=virtio,macaddr="XX:XX:XX:XX:XX:X$SN" \
-net vde,vlan=0,sock=/var/run/vde/vde.ctl \
-localtime \
-kernel /boot/vmlinuz_vm32 \
-append 'root=/dev/vda gentoo=nodevfs' \
-daemonize \
-nographic \
# -monitor "telnet:127.0.0.1:820${SN},server,nowait" \
# -vnc ":$SN" \
# -curses \
vnc or curses lines (or both) here can be swapped w/ "-nographic" option
to enable graphical remote access. And you can control every
non-software aspect of VM via "-monitor" interface.
Of course, you won't need any of it as soon as you'll have sshd running.
And I find it much easier to do the basic deployment by cloning desired
FS (or stage3) to VM partition, chrooting there, doing all the
necessary fine-tuning or compilation then booting VM from there into
fully operational (boot-and-forget) state.
Trick here is not to accidentally mount VM partition if it's (still)
running, since that might cause severe fs corruption.
--
Mike Kazantsev // fraggod.net
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-admin] KVM guest system installation
2009-05-16 7:30 ` Mike Kazantsev
@ 2009-05-19 16:05 ` Reber, Simon
0 siblings, 0 replies; 3+ messages in thread
From: Reber, Simon @ 2009-05-19 16:05 UTC (permalink / raw
To: gentoo-admin
On Sat, 2009-05-16 at 13:30 +0600, Mike Kazantsev wrote:
> On Fri, 15 May 2009 22:35:12 +0200
> "Reber, Simon" <linux@cgi-net.ch> wrote:
>
> > But we now coming to the point where we want to install virtual guest
> > systems to some of the systems.
> > Since the servers are kept very basically do we not have any X packages
> > installed, nor do we plant to.
> > But from documentation and experience point of view, does it look like
> > that we exactly do require something like that.
> >
> > So my question is, is there any way to install a guest system using KVM
> > without having X system packages installed or a monitor plugged on?
> > Meaning booting up the guest system, connecting from the localhost
> > using some kind of serial console or something like that to connect to
> > the particular virtual guest and run the installation task?
>
> I don't know what kind of documentation you've been reading, but there's
> no real need for X (especially X-server) on the machine to deply/use kvm
> guests there.
>
> If there's need for a graphical install (like MS Windows), you can use
> VNC, otherwise ncurses-based interface should suffice to display both
> bios data and text terminal, just append "-curses" flag to kvm line.
>
> Of course, all these features should be enabled via use-flags.
>
> And if you still want X for some reason, you can use sdl-based
> graphical output thru X-forwarding, with a few additional libs (and X
> flag enabled for ssh/sdl).
>
> Just an example of kvm start:
>
> exec kvm \
> -name "$VM" \
> -cpu core2duo \
> -smp 8 \
> -m "$MEM" \
> -drive file=/dev/mapper/vm_root-$VM,if=virtio \
> -drive file=/dev/mapper/vm_swap-$VM,if=virtio \
> -net nic,vlan=0,model=virtio,macaddr="XX:XX:XX:XX:XX:X$SN" \
> -net vde,vlan=0,sock=/var/run/vde/vde.ctl \
> -localtime \
> -kernel /boot/vmlinuz_vm32 \
> -append 'root=/dev/vda gentoo=nodevfs' \
> -daemonize \
> -nographic \
> # -monitor "telnet:127.0.0.1:820${SN},server,nowait" \
> # -vnc ":$SN" \
> # -curses \
>
> vnc or curses lines (or both) here can be swapped w/ "-nographic" option
> to enable graphical remote access. And you can control every
> non-software aspect of VM via "-monitor" interface.
> Of course, you won't need any of it as soon as you'll have sshd running.
>
> And I find it much easier to do the basic deployment by cloning desired
> FS (or stage3) to VM partition, chrooting there, doing all the
> necessary fine-tuning or compilation then booting VM from there into
> fully operational (boot-and-forget) state.
> Trick here is not to accidentally mount VM partition if it's (still)
> running, since that might cause severe fs corruption.
I've read documentations available on the internet (well I've googled
them). But of some reason were all of them related to desktop systems or
server systems with GUI.
Anyway, I've tried your suggestion and it works perfectly fine. I
therefore would like to thank you for the advice.
Thanks again,
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-19 16:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-15 20:35 [gentoo-admin] KVM guest system installation Reber, Simon
2009-05-16 7:30 ` Mike Kazantsev
2009-05-19 16:05 ` Reber, Simon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox