WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] XCP: sr driver question wrt vm-migrate

To: YAMAMOTO Takashi <yamamoto@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] XCP: sr driver question wrt vm-migrate
From: Jonathan Ludlam <Jonathan.Ludlam@xxxxxxxxxxxxx>
Date: Mon, 7 Jun 2010 13:29:36 +0100
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 07 Jun 2010 05:30:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100607082656.C686671474@xxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20100607082656.C686671474@xxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcsGPRexnVLnMkrBTba4SXiol2P2ug==
Thread-topic: [Xen-devel] XCP: sr driver question wrt vm-migrate
Yup, vdi activate is the way forward.

If you advertise VDI_ACTIVATE and VDI_DEACTIVATE in the 'get_driver_info' 
response, xapi will call the following during the start-migrate-shutdown 
lifecycle:

VM start:

host A: VDI.attach
host A: VDI.activate

VM migrate:

host B: VDI.attach

  (VM pauses on host A)

host A: VDI.deactivate
host B: VDI.activate

  (VM unpauses on host B)

host A: VDI.detach

VM shutdown:

host B: VDI.deactivate
host B: VDI.detach

so the disk is never activated on both hosts at once, but it does still go 
through a period when it is attached to both hosts at once. So you could, for 
example, check that the disk *could* be attached on the vdi_attach SMAPI call, 
and actually attach it properly on the vdi_activate call.

Hope this helps,

Jon


On 7 Jun 2010, at 09:26, YAMAMOTO Takashi wrote:

> hi,
> 
> on vm-migrate, xapi attaches a vdi on the migrate-to host
> before detaching it on the migrate-from host.
> unfortunately it doesn't work for our product, which doesn't
> provide a way to attach a volume to multiple hosts at the same time.
> is VDI_ACTIVATE something what i can use as a workaround?
> or any other suggestions?
> 
> YAMAMOTO Takashi
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel