public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
To: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Tomasz Chmielewski <mangoo-Nem3ZqsbT/g@public.gmane.org>
Subject: Re: scripted migration (without Alt-Ctrl-2 / qemu-monitor) - possible?
Date: Thu, 05 Apr 2007 09:57:37 -0500	[thread overview]
Message-ID: <46150E61.1070802@codemonkey.ws> (raw)
In-Reply-To: <4614CED8.20209-atKUWr5tajBWk0Htik3J/w@public.gmane.org>

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

      parent reply	other threads:[~2007-04-05 14:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46150E61.1070802@codemonkey.ws \
    --to=anthony-rdkfgonbjusknkdkm+me6a@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=mangoo-Nem3ZqsbT/g@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox