RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 824253 - manpage: document limitations on identifying domains with numeric names
Summary: manpage: document limitations on identifying domains with numeric names
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Gunannan Ren
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 851047 881827
TreeView+ depends on / blocked
 
Reported: 2012-05-23 05:23 UTC by dyuan
Modified: 2013-02-21 07:15 UTC (History)
11 users (show)

Fixed In Version: libvirt-0.10.2-10.el6
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:15:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description dyuan 2012-05-23 05:23:20 UTC
Description of problem:
Intend to destroy a domain named "001", but the domain whose id is "1" was destroyed.

Version-Release number of selected component (if applicable):
libvirt-0.9.10-20.el6

How reproducible:
always

Steps to Reproduce:
1. # virsh list --all
 Id    Name                           State
----------------------------------------------------
 1     xp                              running
 2     001                            running

2. # virsh destroy 001
Domain 001 destroyed

3. # virsh list --all
 Id    Name                           State
----------------------------------------------------
 -      xp                              shut off
 2     001                            running
 
4. # virsh destroy 001
Domain 001 destroyed

5. # virsh list --all
 Id    Name                           State
----------------------------------------------------
 -      xp                              shut off
 -     001                             shut off

Actual results:
I can't specify the "001" is for domain name or domain id,
I didn't want to destroy the "xp" but it's destroyed by default.

Expected results:
Can specify the option for command such as "destroy", "shutdown"

Additional info:

Comment 1 Daniel Berrangé 2012-05-23 10:55:43 UTC
This is a known limitation of virsh, which we can't do anything about. If you have named your guests soley using numeric digits, then you can only use ID numbers or UUID to refer to them unambiguously.

Comment 2 Daniel Berrangé 2012-05-23 10:56:11 UTC
We should document this limitation in the man page if it isn't already present.

Comment 3 Dave Allan 2012-10-01 21:05:49 UTC
commit 13c69cd0b446669dc53417cb5207c51167a9c14f
Author: Dave Allan <dallan>
Date:   Mon Oct 1 14:01:36 2012 -0400

    Add note about numeric domain names to manpage
    
    Clarify that domains with numeric names can only be identified by
    their domain id.

Comment 4 Jiri Denemark 2012-10-08 18:16:06 UTC
The last rebase to libvirt-0.10.2 was completed and all patches need
to be explicitly backported and sent to rhvirt-patches for review.
Please, set bugs to POST only after sending the backported patches.

Comment 7 Dave Allan 2012-11-20 01:43:22 UTC
Guannan, does 13c69cd0b446669dc53417cb5207c51167a9c14f backport cleanly?

Comment 11 EricLee 2012-11-28 07:38:34 UTC
Verified this bug in libvirt-0.10.2-10.el6:

# man virsh:
....
       The basic structure of most virsh usage is:

         virsh [OPTION]... <command> <domain> [ARG]...

       Where command is one of the commands listed below; domain is the numeric domain id, or the domain name,
       or the domain UUID; and ARGS are command specific options.  There are a few exceptions to this rule in
       the cases where the command in question acts on all domains, the entire machine, or directly on the xen
       hypervisor.  Those exceptions will be clear for each of those commands.  Note: it is permissible to give
       numeric names to domains, however, doing so will result in a domain that can only be identified by
       domain id. In other words, if a numeric value is supplied it will be interpreted as a domain id, not as
       a name.

       The virsh program can be used either to run one COMMAND by giving the command and its arguments on the
       shell command line, or a COMMAND_STRING which is a single shell argument consisting of multiple COMMAND
....

And can reproduce it with libvirt-0.2-10.9.el6:
# man virsh
...
       The basic structure of most virsh usage is:

         virsh [OPTION]... <command> <domain> [ARG]...

       Where command is one of the commands listed below, domain is the numeric domain id, or the domain name,
       or the domain UUID and ARGS are command specific options.  There are a few exceptions to this rule in
       the cases where the command in question acts on all domains, the entire machine, or directly on the xen
       hypervisor.  Those exceptions will be clear for each of those commands.

       The virsh program can be used either to run one COMMAND by giving the command and its arguments on the
       shell command line, or a COMMAND_STRING which is a single shell argument consisting of multiple COMMAND
...

So changing to VERIFIED.

Comment 12 errata-xmlrpc 2013-02-21 07:15:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0276.html


Note You need to log in before you can comment on or make changes to this bug.