All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhigang Wang <zhigang.x.wang@oracle.com>
To: xen-devel <xen-devel@lists.xen.org>, Wei Liu <wei.liu2@citrix.com>
Subject: domain uuid always change in xl list -l if no uuid in vm.cfg
Date: Thu, 15 May 2014 16:00:31 -0400	[thread overview]
Message-ID: <53751CDF.4000207@oracle.com> (raw)

Hi,

`xl list --long` will return a random domain UUID if no UUID is specified in vm.cfg::

    # xl list -l |grep uuid
                "uuid": "bbf0c18e-3325-4fe9-b303-5fa1ef0751c5",
    # xl list -l |grep uuid
                "uuid": "4982f6e2-0e17-4c88-8fa1-1d333d9f1f6e",

In this case, the domain handle (uuid) is set as `ffc51cf9-2fb2-4838-b757-bcd65ace42b6` and will not change.

I think we may need always return the domain handle as shown in xenstore::

    # xenstore-read /local/domain/1/vm
    /vm/ffc51cf9-2fb2-4838-b757-bcd65ace42b6

Related code tool/libxl/xl_cmdimpl.c:

static void parse_config_data(...

    if (!xlu_cfg_get_string (config, "uuid", &buf, 0) ) {
        if ( libxl_uuid_from_string(&c_info->uuid, buf) ) {
            fprintf(stderr, "Failed to parse UUID: %s\n", buf);
            exit(1);
        }
    }else{
        libxl_uuid_generate(&c_info->uuid);
    }

I don't think it's right to just get the domain handle here. We may need to refactor the logic a little.

If Wei or anyone else is working on related staff, please consider this.

Thanks,

Zhigang

             reply	other threads:[~2014-05-15 20:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15 20:00 Zhigang Wang [this message]
2014-05-15 21:22 ` domain uuid always change in xl list -l if no uuid in vm.cfg Wei Liu
2014-05-15 21:30   ` Zhigang Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53751CDF.4000207@oracle.com \
    --to=zhigang.x.wang@oracle.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.