Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
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:
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.
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.
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.
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.
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