From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uri Lublin Subject: Re: Automating Live Migration Date: Wed, 27 Aug 2008 10:56:47 +0300 Message-ID: <48B508BF.6020604@il.qumranet.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Sukanto Ghosh Return-path: Received: from il.qumranet.com ([212.179.150.194]:56383 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752601AbYH0H4u (ORCPT ); Wed, 27 Aug 2008 03:56:50 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Sukanto Ghosh wrote: > Hi, > > What needs to be done in case I want to automate the live migration of > the guests (e.g. for load balancing) ? > > I want to have some programs running on multiple nodes, which will > monitor the load on the respective hosts and in case of imbalance can > automatically migrate a guest from one host to another. > > What is the interface by which this migration request/command can be > sent to the particular kvm-userspace (at source host) ? > > Can this be done using userspace programs or we need kernel modules ? > > Getting the destination ready for incoming migration is I guess > straightforward. > > Please take a look at http://kvm.qumranet.com/kvmwiki/Migration Basically you need to be able to send qemu monitor commands to your kvm-qemu. For example redirect the monitor to a unix domain socket (e.g. with -monitor /tmp/vmid.monitor) and connect your program to that socket. When you want to migrate that VM issue a migrate monitor command, and checkout the result (info migration). Uri.