From: "Andrew D. Ball" Subject: [PATCH] [RESEND] allow UUID to be set in domU config Date: Wed, 25 Jan 2006 10:24:05 -0500 Message-ID: <1138202645.10386.4.camel@localhost.localdomain> Reply-To: aball@us.ibm.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-iivY9VnQUkD0/JmLR1BR" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --=-iivY9VnQUkD0/JmLR1BR Content-Type: text/plain Content-Transfer-Encoding: 7bit Treat xenstore UUID for domU's like MAC addresses for virtual network interfaces -- can be set by user in domU configuration, but is generated randomly by default. xm-test results: http://xmtest.dague.org/cgi-bin/display?view=single&testid=1228 [These are for pristine changeset 8627. I see no difference between these and the results for changeset 8627 with this patch applied.] Signed-off-by: Andrew D. Ball diff -r 9efe7eb108e1 -r 97aea0094880 tools/python/xen/xm/create.py --- a/tools/python/xen/xm/create.py Wed Jan 4 17:51:38 2006 +++ b/tools/python/xen/xm/create.py Wed Jan 11 16:10:45 2006 @@ -395,6 +395,13 @@ gopts.var('xauthority', val='XAUTHORITY', fn=set_value, default=None, use="X11 Authority to use") + +gopts.var('uuid', val='', + fn=set_value, default=None, + use="""xenstore UUID (universally unique identifier) to use. One + will be randomly generated if this option is not set, just like MAC + addresses for virtual network interfaces. This must be a unique + value across the entire cluster.""") def err(msg): @@ -566,6 +573,8 @@ map(add_conf, ['name', 'memory', 'ssidref', 'maxmem', 'restart', 'on_poweroff', 'on_reboot', 'on_crash', 'vcpus']) + if vals.uuid is not None: + config.append(['uuid', vals.uuid]) if vals.cpu is not None: config.append(['cpu', vals.cpu]) if vals.cpus is not None: --=-iivY9VnQUkD0/JmLR1BR Content-Disposition: attachment; filename=uuid_option.patch Content-Type: text/x-patch; name=uuid_option.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit Treat xenstore UUID for domU's like MAC addresses for virtual network interfaces -- can be set by user in domU configuration, but is generated randomly by default. xm-test results: http://xmtest.dague.org/cgi-bin/display?view=single&testid=1228 [These are for pristine changeset 8627. I see no difference between these and the results for changeset 8627 with this patch applied.] Signed-off-by: Andrew D. Ball diff -r 9efe7eb108e1 -r 97aea0094880 tools/python/xen/xm/create.py --- a/tools/python/xen/xm/create.py Wed Jan 4 17:51:38 2006 +++ b/tools/python/xen/xm/create.py Wed Jan 11 16:10:45 2006 @@ -395,6 +395,13 @@ gopts.var('xauthority', val='XAUTHORITY', fn=set_value, default=None, use="X11 Authority to use") + +gopts.var('uuid', val='', + fn=set_value, default=None, + use="""xenstore UUID (universally unique identifier) to use. One + will be randomly generated if this option is not set, just like MAC + addresses for virtual network interfaces. This must be a unique + value across the entire cluster.""") def err(msg): @@ -566,6 +573,8 @@ map(add_conf, ['name', 'memory', 'ssidref', 'maxmem', 'restart', 'on_poweroff', 'on_reboot', 'on_crash', 'vcpus']) + if vals.uuid is not None: + config.append(['uuid', vals.uuid]) if vals.cpu is not None: config.append(['cpu', vals.cpu]) if vals.cpus is not None: --=-iivY9VnQUkD0/JmLR1BR Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-iivY9VnQUkD0/JmLR1BR--