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-changelog

[Xen-changelog] [xen-unstable] xend: Allow vtpm instance uuid to be spec

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Allow vtpm instance uuid to be specified on domain creation
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 Aug 2009 00:30:31 -0700
Delivery-date: Mon, 24 Aug 2009 00:31:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1251097546 -3600
# Node ID dde06d43143b71a72d979d8040a887534e321b32
# Parent  3a6aaadaa035fcce2ea8b6cef2e282d9cec672d1
xend: Allow vtpm instance uuid to be specified on domain creation

Right now xen will create a new vtpm instance everytime you start up a
domU, even if you specify the instance parameter in your config file.
Each vtpm instance is then given a uuid and the vtpm.db file maps
instance numbers to uuid numbers.

This patch is a hack that lets you explicitly set the uuid of your
vtpm instance. Everytime you boot up your domU now the vtpm will get
that uuid and thus it will always get the same vtpm instance number
instead of being generated a new one.

So for example, in your config file you would do something like this
vtpm = [ 'backend=0,uuid=dcdb124b-9fed-4040-b149-dd2dfd8d094c' ]

Signed-off-by: Matt Fioravante <Matthew.Fioravante@xxxxxxxxxx>
---
 tools/python/xen/xm/create.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -r 3a6aaadaa035 -r dde06d43143b tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Mon Aug 24 08:03:46 2009 +0100
+++ b/tools/python/xen/xm/create.py     Mon Aug 24 08:05:46 2009 +0100
@@ -890,6 +890,7 @@ def configure_vtpm(config_devs, vals):
     if len(vtpm) > 0:
         d = vtpm[0]
         instance = d.get('instance')
+        uuid = d.get('uuid')
         if instance == "VTPMD":
             instance = "0"
         else:
@@ -908,6 +909,8 @@ def configure_vtpm(config_devs, vals):
             config_vtpm.append(['backend', backend])
         if typ:
             config_vtpm.append(['type', type])
+        if uuid:
+            config_vtpm.append(['uuid', type])
         config_devs.append(['device', config_vtpm])
 
 
@@ -1147,7 +1150,7 @@ def preprocess_vtpm(vals):
             (k, v) = b.strip().split('=', 1)
             k = k.strip()
             v = v.strip()
-            if k not in ['backend', 'instance']:
+            if k not in ['backend', 'instance', 'uuid']:
                 err('Invalid vtpm specifier: ' + vtpm)
             d[k] = v
         vtpms.append(d)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: Allow vtpm instance uuid to be specified on domain creation, Xen patchbot-unstable <=