public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Boot script
@ 2008-03-11 21:38 Matthias Pfafferodt
  2008-03-11 21:53 ` Javier Guerra
  2008-03-11 21:56 ` Anthony Liguori
  0 siblings, 2 replies; 3+ messages in thread
From: Matthias Pfafferodt @ 2008-03-11 21:38 UTC (permalink / raw)
  To: kvm-devel

Hello,

my server runs XEN with 5 domains at the moment. I will get new hardware this 
week and I think about trying to do the virtualisation using KVM.

Xen has small scripts which

* set up the bridged network at boot
* start all domains at boot time (or restore saved domains)
* save the domains at shutdown

Are there such scripts for KVM? I would like to have an init script which does 
all the things listed above.

Is this even possible with qemu/kvm (save/restore a domain using shell 
commands)?

Thanks

Matthias

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Boot script
  2008-03-11 21:38 Boot script Matthias Pfafferodt
@ 2008-03-11 21:53 ` Javier Guerra
  2008-03-11 21:56 ` Anthony Liguori
  1 sibling, 0 replies; 3+ messages in thread
From: Javier Guerra @ 2008-03-11 21:53 UTC (permalink / raw)
  To: Matthias Pfafferodt; +Cc: kvm-devel

On Tue, Mar 11, 2008 at 4:38 PM, Matthias Pfafferodt <syntron@web.de> wrote:
>  * set up the bridged network at boot

trivially easy.  in fact, it's easier to write a script than to do it by hand.

>  * start all domains at boot time (or restore saved domains)

from trivial to moderate, depending on the disk layout.

>  * save the domains at shutdown

moderately tricky.  you'd have to put the kvm control console
somewhere your shutdown script could find them, and send the 'savevm'
commands.


>  Are there such scripts for KVM? I would like to have an init script which does
>  all the things listed above.

i haven't seen any one, i feel it should be done for your specific requirements.

>  Is this even possible with qemu/kvm (save/restore a domain using shell
>  commands)?

totally possible.  restore is just a commandline switch (or automatic
if using qcow images).  savevm is a control command, so you'll have to
redirect the control to a pipe; then the script would simply do an
"echo 'savevm;quit' > kvm-xx.pipe"


-- 
Javier

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Boot script
  2008-03-11 21:38 Boot script Matthias Pfafferodt
  2008-03-11 21:53 ` Javier Guerra
@ 2008-03-11 21:56 ` Anthony Liguori
  1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2008-03-11 21:56 UTC (permalink / raw)
  To: Matthias Pfafferodt; +Cc: kvm-devel

Matthias Pfafferodt wrote:
> Hello,
>
> my server runs XEN with 5 domains at the moment. I will get new hardware this 
> week and I think about trying to do the virtualisation using KVM.
>
> Xen has small scripts which
>
> * set up the bridged network at boot
>   

I just manually configure a bridge through my distro's networking 
scripts.  I've got what I do fully documented at 
http://kvm.qumranet.com/kvmwiki/AnthonyLiguori/Networking

You can also use libvirt to manage KVM in which case, it will 
automagically configure networking for you.

> * start all domains at boot time (or restore saved domains)
>   

I just use a script in /etc/init.d/ that I wrote but libvirt will also 
do this for you.

> * save the domains at shutdown
>   

As in, do a save at shutdown?  That seems pretty scary to me.  I don't 
know what libvirt does on shutdown but I'm sure someone can chime in.

> Are there such scripts for KVM? I would like to have an init script which does 
> all the things listed above.
>
> Is this even possible with qemu/kvm (save/restore a domain using shell 
> commands)?
>   

You have two options.  If you use libvirt, you can issue commands via 
virsh.  If you don't use libvirt, you need to have the monitor sit on a 
unix domain socket or on a TCP socket and you can issue commands to the 
monitor via a tool like socat.

libvirt is by far the simplest choice for managing KVM but it's possible 
to do these things without it.

Regards,

Anthony Liguori

> Thanks
>
> Matthias
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-11 21:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-11 21:38 Boot script Matthias Pfafferodt
2008-03-11 21:53 ` Javier Guerra
2008-03-11 21:56 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox