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
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to