public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Live migration without SDL
@ 2008-07-10 20:51 Ty! Boyack
  2008-07-10 21:37 ` Anthony Liguori
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ty! Boyack @ 2008-07-10 20:51 UTC (permalink / raw)
  To: kvm

Folks,

I'm afraid I'm missing something very basic here.  I'm looking to try 
out the live migration facility, and all the documentation I'm seeing 
shows to initiate the migration by going to the qemu monitor from the 
SDL windows (alt-ctrl-2).  However, I'd like to run my VMs with a VNC 
"head," so I'm not sure where the interface is to initiate the migration 
without the SDL layer in place. 

Is the qemu monitor available through some other mechanism?

This would be most helpful if the mechanism was reachable (and 
scriptable) from the HOST os, so that the HOST (in cooperation with 
another HOST) could initiate a migration of one or more GUEST VMs.

If anyone could point me in the right direction, I would sure appreciate it.

I have not subscribed to the list, so e-mail replies would be appreciated.

-Ty!



-- 
-===========================-
  Ty! Boyack
  NREL Unix Network Manager
  ty@nrel.colostate.edu
  (970) 491-1186
-===========================-


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

* Re: Live migration without SDL
  2008-07-10 20:51 Live migration without SDL Ty! Boyack
@ 2008-07-10 21:37 ` Anthony Liguori
  2008-07-10 21:39 ` Brian Jackson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2008-07-10 21:37 UTC (permalink / raw)
  To: Ty! Boyack; +Cc: kvm

Ty! Boyack wrote:
> Folks,
>
> I'm afraid I'm missing something very basic here.  I'm looking to try 
> out the live migration facility, and all the documentation I'm seeing 
> shows to initiate the migration by going to the qemu monitor from the 
> SDL windows (alt-ctrl-2).  However, I'd like to run my VMs with a VNC 
> "head," so I'm not sure where the interface is to initiate the 
> migration without the SDL layer in place.
> Is the qemu monitor available through some other mechanism?

It's available through VNC fwiw, but you can also redirect it to 
somethign else with the -monitor option.

Regards,

Anthony Liguori

> This would be most helpful if the mechanism was reachable (and 
> scriptable) from the HOST os, so that the HOST (in cooperation with 
> another HOST) could initiate a migration of one or more GUEST VMs.
>
> If anyone could point me in the right direction, I would sure 
> appreciate it.
>
> I have not subscribed to the list, so e-mail replies would be 
> appreciated.
>
> -Ty!
>
>
>


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

* Re: Live migration without SDL
  2008-07-10 20:51 Live migration without SDL Ty! Boyack
  2008-07-10 21:37 ` Anthony Liguori
@ 2008-07-10 21:39 ` Brian Jackson
  2008-07-10 22:03 ` David Mair
  2008-07-11  5:49 ` Thomas Mueller
  3 siblings, 0 replies; 6+ messages in thread
From: Brian Jackson @ 2008-07-10 21:39 UTC (permalink / raw)
  To: Ty! Boyack; +Cc: kvm

You can get to the monitor the same way in vnc as you do with the sdl gui.

You can also have the monitor connected to a socket or network port.

See the qemu docs for more info.



On Thursday 10 July 2008 3:51:44 pm Ty! Boyack wrote:
> Folks,
>
> I'm afraid I'm missing something very basic here.  I'm looking to try
> out the live migration facility, and all the documentation I'm seeing
> shows to initiate the migration by going to the qemu monitor from the
> SDL windows (alt-ctrl-2).  However, I'd like to run my VMs with a VNC
> "head," so I'm not sure where the interface is to initiate the migration
> without the SDL layer in place.
>
> Is the qemu monitor available through some other mechanism?
>
> This would be most helpful if the mechanism was reachable (and
> scriptable) from the HOST os, so that the HOST (in cooperation with
> another HOST) could initiate a migration of one or more GUEST VMs.
>
> If anyone could point me in the right direction, I would sure appreciate
> it.
>
> I have not subscribed to the list, so e-mail replies would be appreciated.
>
> -Ty!


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

* Re: Live migration without SDL
  2008-07-10 20:51 Live migration without SDL Ty! Boyack
  2008-07-10 21:37 ` Anthony Liguori
  2008-07-10 21:39 ` Brian Jackson
@ 2008-07-10 22:03 ` David Mair
       [not found]   ` <20080711083156.GA15083@redhat.com>
  2008-07-11  5:49 ` Thomas Mueller
  3 siblings, 1 reply; 6+ messages in thread
From: David Mair @ 2008-07-10 22:03 UTC (permalink / raw)
  To: Ty! Boyack; +Cc: kvm

Ty! Boyack wrote:
 > Folks,
 >
 > I'm afraid I'm missing something very basic here.  I'm looking to try
 > out the live migration facility, and all the documentation I'm seeing
 > shows to initiate the migration by going to the qemu monitor from the
 > SDL windows (alt-ctrl-2).  However, I'd like to run my VMs with a VNC
 > "head," so I'm not sure where the interface is to initiate the migration
 > without the SDL layer in place.

I have no trouble switching to the monitor for a VM with a VNC head: alt-ctrl-2 
works as expected in the VNC client.

 > Is the qemu monitor available through some other mechanism?

You can configure qemu to expose the monitor console via any of the serial port 
configuration types. That lets you make the monitor available at a udp or tcp port, 
e.g.:

# qemu-system-x86_64 <other options> -monitor tcp::4444

The double colon is intended. There are lots of additional features beyond that example.

 > This would be most helpful if the mechanism was reachable (and
 > scriptable) from the HOST os, so that the HOST (in cooperation with
 > another HOST) could initiate a migration of one or more GUEST VMs.

That would be the "monitor" command line option then.

<snip>

-- 
David.

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

* Re: Live migration without SDL
  2008-07-10 20:51 Live migration without SDL Ty! Boyack
                   ` (2 preceding siblings ...)
  2008-07-10 22:03 ` David Mair
@ 2008-07-11  5:49 ` Thomas Mueller
  3 siblings, 0 replies; 6+ messages in thread
From: Thomas Mueller @ 2008-07-11  5:49 UTC (permalink / raw)
  To: kvm

On Thu, 10 Jul 2008 14:51:44 -0600, Ty! Boyack wrote:

> Folks,
> 
> I'm afraid I'm missing something very basic here.  I'm looking to try
> out the live migration facility, and all the documentation I'm seeing
> shows to initiate the migration by going to the qemu monitor from the
> SDL windows (alt-ctrl-2).  However, I'd like to run my VMs with a VNC
> "head," so I'm not sure where the interface is to initiate the migration
> without the SDL layer in place.
> 
> Is the qemu monitor available through some other mechanism?
> 

as others also stated, qemu monitor is also available through vnc. maybe 
your vnc client blocks ALT. i have to click on the titlebar and choose 
"Alt" (realvnc). 

but mostly i do redirect montior to a socket. with this command line 
switches:  -monitor unix:/var/run/kvm-<vm-name>,server,nowait

i then connect  with a tool called socat (socat stdio /var/run/kvm-<vm-
name>).

don't try to exit the console with "quit". :)

- Thomas



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

* Re: Live migration without SDL
       [not found]   ` <20080711083156.GA15083@redhat.com>
@ 2008-07-11 16:47     ` Ty! Boyack
  0 siblings, 0 replies; 6+ messages in thread
From: Ty! Boyack @ 2008-07-11 16:47 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: David Mair, kvm

Great point.  I'm hoping to get control of all the VMs on multiple 
hosts, but I plan to have a distributed application across all the hosts 
that talks over secure channels, but then the app on each host would 
connect to the individual monitors via a local socket. 

FWIW, the goal is to have a tool that can (based on rules/policies) 
perform live migration of VMs to dynamically balance the loads and 
reduce total power consumption by powering down/up the hosts 
automatically.  Do you know of any such project in the works already to 
which I should be looking to contribute, rather than starting from scratch?

And as long as I'm jumping topics all over on this thread (sorry), do 
you happen to have any idea why my live migration is failing on F9's 
qemu-kvm (kvm 65, qemu 0.9.1) with the following error:
qemu: warning: instance 0x38313339 of device '' not present in current VM

My startup line for both VMs is:
source:
/usr/bin/qemu-kvm -M pc -m 512 -smp 1 -name f9test -monitor 
tcp:127.0.0.1:4444,server,nowait -boot c -drive 
file=/VirtGuestRoots/F9test.img,if=ide,index=0,boot=on -net 
nic,macaddr=de:ad:be:ef:74:00,vlan=0 -net 
tap,script=/root/qemu-ifup,vlan=0,ifname=vnet0 -parallel none -vnc 
127.0.0.1:0 -k en-us
destination:
/usr/bin/qemu-kvm -M pc -m 512 -smp 1 -name f9test -monitor 
tcp:127.0.0.1:4444,server,nowait -boot c -drive 
file=/VirtGuestRoots/F9test.img,if=ide,index=0,boot=on -net 
nic,macaddr=de:ad:be:ef:74:00,vlan=0 -net 
tap,script=/root/qemu-ifup,vlan=0,ifname=vnet0 -parallel none -vnc 
127.0.0.1:0 -k en-us -incoming tcp://0:636

And initiating the migration from the source's monitor via:
migrate -d tcp://destination:636

I had set serial to pty and enabled USB, but I pulled those options off 
thinking they might be causing the missing device.  But still no luck.  
The disk image file is on a GFS share, and I have not yet looked to see 
if there is a locking issue with multiple hosts trying to open that 
image file at the same time.  I don't think that is the case since I get 
the same error with offline migration where I stop the source VM, copy 
the image file to a new image file, start the destination VM in incoming 
mode with the new copy of the image file, and then initiate the 
migration.  So it looks to me like somehow I'm getting a different 
device setup on the two systems.

Thanks again for all the help!

-Ty!



> Please be aware of the security implications of allowing the monitor
> to be accessed via VNC, or any other channel which does not require
> strong authentication. If you have access to the monitor & guest, 
> then in effect you have access to any file on the host machine that
> is readable by the user running QEMU, since you can use the monitor
> to map any files into the guest as disks.
>
>   
>
> This is totally unauthenticated so anyone on your network can 
> connect to it. I'd recommend using only the local-access methods
> for the monitor - UNIX socket, PIPE, PTY or STDIO, so that anyone
> accessing it has to first login via secure channel like SSH.
>
> Daniel
>   


-- 
-===========================-
  Ty! Boyack
  NREL Unix Network Manager
  ty@nrel.colostate.edu
  (970) 491-1186
-===========================-


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

end of thread, other threads:[~2008-07-11 16:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-10 20:51 Live migration without SDL Ty! Boyack
2008-07-10 21:37 ` Anthony Liguori
2008-07-10 21:39 ` Brian Jackson
2008-07-10 22:03 ` David Mair
     [not found]   ` <20080711083156.GA15083@redhat.com>
2008-07-11 16:47     ` Ty! Boyack
2008-07-11  5:49 ` Thomas Mueller

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