From: Ian Campbell Subject: Re: [PATCH 5/6] libxl: allow a generation ID to be specified at domain creation Date: Tue, 10 Jun 2014 15:18:57 +0100 Message-ID: <1402409937.1250.147.camel@kazak.uk.xensource.com> References: <1401801340-6196-1-git-send-email-david.vrabel@citrix.com> <1401801340-6196-6-git-send-email-david.vrabel@citrix.com> <1402398065.1250.36.camel@kazak.uk.xensource.com> <5396FB76.5010305@citrix.com> <1402407437.1250.128.camel@kazak.uk.xensource.com> <53970B1F.2040200@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WuMtc-0003uT-6r for xen-devel@lists.xenproject.org; Tue, 10 Jun 2014 14:19:28 +0000 In-Reply-To: <53970B1F.2040200@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: xen-devel@lists.xenproject.org, Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 2014-06-10 at 14:41 +0100, David Vrabel wrote: > On 10/06/14 14:37, Ian Campbell wrote: > > On Tue, 2014-06-10 at 13:35 +0100, David Vrabel wrote: > >> On 10/06/14 12:01, Ian Campbell wrote: > >>> On Tue, 2014-06-03 at 14:15 +0100, David Vrabel wrote: > >>>> Toolstacks may specify a VM generation ID using the > >>>> u.hvm.generation_id field into libxl_domain_build_info structure, when > >>>> creating a domain. > >>>> > >>>> The toolstack is responsible for providing the correct generation ID > >>>> according to the Microsoft specification (e.g., generating new random > >>>> ones as appropriate when restoring). > >>> > >>> Any reason not to make the libxl interface a (def)bool and have libxl > >>> generate a suitable ID internally? Does anything ever care about the > >>> specific UUID? > >> > >> Other toolstacks (like xapi) have a better idea of the life-cycle of a > >> VM than xl does and thus need only use a new ID for snapshots -- they > >> can retain the same ID if the domain is just rebooted/migrated. > > > > They should set the field to false then and libxl won't regenerate it. > > They still need an interface to specify the ID. Oh, because of the reboot case. That makes sense. > I don't see any value in adding a use_random_genid field just to avoid a > single libxl_uuid_generate() call in the toolstack. The point is to get as much common stuff into the library as we can, but as you've now made clear this isn't common. Ian.