* scripted migration (without Alt-Ctrl-2 / qemu-monitor) - possible?
@ 2007-04-05 10:07 Tomasz Chmielewski
[not found] ` <4614CA6B.2030303-Nem3ZqsbT/g@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Tomasz Chmielewski @ 2007-04-05 10:07 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Is it possible to do a migration (or any other maintenance, like
stopping a guest VM) without qemu-monitor / Alt-Ctrl-2?
For those using Xen, it would be similar to a command line "xm" which
migrates a guest/domain to a different host - just SSH to your server
(or use it in a script etc.), and do:
xm migrate <Domain> <Host>
Similarly, lots of other actions are possible, like pausing, rebooting,
shutting down, saving, restoring etc.
The idea of having to "alt-ctrl-2 on the SDL window" does seem a bit
incompatible with CLI, doesn't it?
--
Tomasz Chmielewski
http://wpkg.org
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <4614CA6B.2030303-Nem3ZqsbT/g@public.gmane.org>]
* Re: scripted migration (without Alt-Ctrl-2 / qemu-monitor) - possible? [not found] ` <4614CA6B.2030303-Nem3ZqsbT/g@public.gmane.org> @ 2007-04-05 10:26 ` Avi Kivity [not found] ` <4614CED8.20209-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Avi Kivity @ 2007-04-05 10:26 UTC (permalink / raw) To: Tomasz Chmielewski; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Tomasz Chmielewski wrote: > Is it possible to do a migration (or any other maintenance, like > stopping a guest VM) without qemu-monitor / Alt-Ctrl-2? > > > For those using Xen, it would be similar to a command line "xm" which > migrates a guest/domain to a different host - just SSH to your server > (or use it in a script etc.), and do: > > xm migrate <Domain> <Host> > > > Similarly, lots of other actions are possible, like pausing, rebooting, > shutting down, saving, restoring etc. > > > The idea of having to "alt-ctrl-2 on the SDL window" does seem a bit > incompatible with CLI, doesn't it? > > Look up the qemu -monitor option. This allows you to redirect the qemu console anywhere you like, including stdio, pipes, tcp sockets, etc. It's wonderfully flexible. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <4614CED8.20209-atKUWr5tajBWk0Htik3J/w@public.gmane.org>]
* Re: scripted migration (without Alt-Ctrl-2 / qemu-monitor) - possible? [not found] ` <4614CED8.20209-atKUWr5tajBWk0Htik3J/w@public.gmane.org> @ 2007-04-05 11:20 ` Tomasz Chmielewski [not found] ` <4614DB87.2060705-Nem3ZqsbT/g@public.gmane.org> 2007-04-05 14:57 ` Anthony Liguori 1 sibling, 1 reply; 6+ messages in thread From: Tomasz Chmielewski @ 2007-04-05 11:20 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Avi Kivity schrieb: > Tomasz Chmielewski wrote: >> Is it possible to do a migration (or any other maintenance, like >> stopping a guest VM) without qemu-monitor / Alt-Ctrl-2? >> >> >> For those using Xen, it would be similar to a command line "xm" which >> migrates a guest/domain to a different host - just SSH to your server >> (or use it in a script etc.), and do: >> >> xm migrate <Domain> <Host> >> >> >> Similarly, lots of other actions are possible, like pausing, >> rebooting, shutting down, saving, restoring etc. >> >> >> The idea of having to "alt-ctrl-2 on the SDL window" does seem a bit >> incompatible with CLI, doesn't it? >> >> > > Look up the qemu -monitor option. This allows you to redirect the qemu > console anywhere you like, including stdio, pipes, tcp sockets, etc. > It's wonderfully flexible. All right - so I see it belongs more to qemu documentation than KVM's (+/- KVM extensions like migration etc.). Not as easy to use and intuitive as "xm" - some instruction here, as Qemu's "-monitor dev" documentation seems a bit incomplete as it mentions only "vc" and "stdio": 1. Make a /tmp/guest socket; then start a guest qemu (...) -monitor unix:/tmp/quest,server,nowait 2. Show qemu-monitor's help: echo 'help' | socat - unix-connect:/tmp/quest The things get more complicated if you run multiple quests - you have to keep track of the pipes etc. Certainly, it is possible to write a powerful backend to that - as you say, if it supports tcp sockets, it would be even possible to support multiple KVM/qemu servers with one program or a script - something that Xen's "xm" can't easily do. Are there any ready solutions for that? Or the wheel still waits to be invented? -- Tomasz Chmielewski http://wpkg.org ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <4614DB87.2060705-Nem3ZqsbT/g@public.gmane.org>]
* Re: scripted migration (without Alt-Ctrl-2 / qemu-monitor) - possible? [not found] ` <4614DB87.2060705-Nem3ZqsbT/g@public.gmane.org> @ 2007-04-05 11:31 ` Avi Kivity [not found] ` <4614DE0E.3070803-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Avi Kivity @ 2007-04-05 11:31 UTC (permalink / raw) To: Tomasz Chmielewski; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Tomasz Chmielewski wrote: >> >> Look up the qemu -monitor option. This allows you to redirect the >> qemu console anywhere you like, including stdio, pipes, tcp sockets, >> etc. It's wonderfully flexible. > > All right - so I see it belongs more to qemu documentation than KVM's > (+/- KVM extensions like migration etc.). > > > Not as easy to use and intuitive as "xm" - some instruction here, as > Qemu's "-monitor dev" documentation seems a bit incomplete as it > mentions only "vc" and "stdio": The various device options are documented under '-serial'. > > > 1. Make a /tmp/guest socket; then start a guest > > qemu (...) -monitor unix:/tmp/quest,server,nowait > > > 2. Show qemu-monitor's help: > > echo 'help' | socat - unix-connect:/tmp/quest > > > The things get more complicated if you run multiple quests - you have > to keep track of the pipes etc. > > > Certainly, it is possible to write a powerful backend to that - as you > say, if it supports tcp sockets, it would be even possible to support > multiple KVM/qemu servers with one program or a script - something > that Xen's "xm" can't easily do. > > > Are there any ready solutions for that? Or the wheel still waits to be > invented? > > http://libvirt.org/ -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <4614DE0E.3070803-atKUWr5tajBWk0Htik3J/w@public.gmane.org>]
* Re: scripted migration (without Alt-Ctrl-2 / qemu-monitor) - possible? [not found] ` <4614DE0E.3070803-atKUWr5tajBWk0Htik3J/w@public.gmane.org> @ 2007-04-05 11:47 ` Dor Laor 0 siblings, 0 replies; 6+ messages in thread From: Dor Laor @ 2007-04-05 11:47 UTC (permalink / raw) To: Avi Kivity, Tomasz Chmielewski; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f >> >> 1. Make a /tmp/guest socket; then start a guest >> >> qemu (...) -monitor unix:/tmp/quest,server,nowait >> >> >> 2. Show qemu-monitor's help: >> >> echo 'help' | socat - unix-connect:/tmp/quest >> You can also try with a tcp device and telnet it. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: scripted migration (without Alt-Ctrl-2 / qemu-monitor) - possible? [not found] ` <4614CED8.20209-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 2007-04-05 11:20 ` Tomasz Chmielewski @ 2007-04-05 14:57 ` Anthony Liguori 1 sibling, 0 replies; 6+ messages in thread From: Anthony Liguori @ 2007-04-05 14:57 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Tomasz Chmielewski Avi Kivity wrote: > Tomasz Chmielewski wrote: > >> Is it possible to do a migration (or any other maintenance, like >> stopping a guest VM) without qemu-monitor / Alt-Ctrl-2? >> >> >> For those using Xen, it would be similar to a command line "xm" which >> migrates a guest/domain to a different host - just SSH to your server >> (or use it in a script etc.), and do: >> >> xm migrate <Domain> <Host> >> >> >> Similarly, lots of other actions are possible, like pausing, rebooting, >> shutting down, saving, restoring etc. >> >> >> The idea of having to "alt-ctrl-2 on the SDL window" does seem a bit >> incompatible with CLI, doesn't it? >> >> >> > > Look up the qemu -monitor option. This allows you to redirect the qemu > console anywhere you like, including stdio, pipes, tcp sockets, etc. > It's wonderfully flexible. > A nice trick is to redirect the monitor to a unix socket and then use: echo 'migrate ssh://foo' | socat stdio unix:/path/to/socket It's pretty easy to write a small program that lets you execute monitor commands externally. I've got a patch in my queue that adds a standard convention for monitor socket paths based on a guest "name" with the idea that you could write something very similar to xm. Just have to figure out how to address some of the lingering issues with it (mostly, how to clean things up reliably on exit). Regards, Anthony Liguori Regards, Anthony Liguori > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-04-05 14:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-05 10:07 scripted migration (without Alt-Ctrl-2 / qemu-monitor) - possible? Tomasz Chmielewski
[not found] ` <4614CA6B.2030303-Nem3ZqsbT/g@public.gmane.org>
2007-04-05 10:26 ` Avi Kivity
[not found] ` <4614CED8.20209-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-04-05 11:20 ` Tomasz Chmielewski
[not found] ` <4614DB87.2060705-Nem3ZqsbT/g@public.gmane.org>
2007-04-05 11:31 ` Avi Kivity
[not found] ` <4614DE0E.3070803-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-04-05 11:47 ` Dor Laor
2007-04-05 14:57 ` Anthony Liguori
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox