Boot script
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/
Quoted 1 line · Matthias Pfafferodt
* set up the bridged network at boot
trivially easy. in fact, it's easier to write a script than to do it by hand.
Quoted 1 line
* start all domains at boot time (or restore saved domains)
from trivial to moderate, depending on the disk layout.
Quoted 1 line
* 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.
Quoted 2 lines
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.
Quoted 2 lines
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"
Signature · 6 lines
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/
Quoted 9 lines · Matthias Pfafferodt
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.
Quoted 2 lines
* 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.
Quoted 2 lines
* 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.
Quoted 6 lines
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
Quoted 4 lines
Thanks
Matthias
Quoted 9 lines
-------------------------------------------------------------------------
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 [email protected]
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/