Red Hat Bugzilla – Bug 639602
""virt-list-filesystems" fails to parse the command line argument if the domain name is "#".
Last modified: 2015-09-27 22:06:42 EDT
Description of problem:
"virt-list-filesystems" failed to parse command line argument if the domain name is
Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux release 6.0 Beta (Santiago)
Kernel : 2.6.32-44.2.el6.x86_64
Arch : x86_64
Steps to Reproduce:
1. Start a guest which has name "#"
2. Make sure that guest is running.
[root@dhcp210-84 ~]# virsh list
Id Name State
4 RHEL6-64 running
6 # running
3. Verify the domain name with the below command
[root@dhcp210-84 ~]# virsh domname 6
4. Run #virt-list-filesystems command as shown below
[root@dhcp210-84 ~]# virt-list-filesystems -l # /root
virt-ls: no image, VM names or directory to list given
virt-ls [--options] domname directory
virt-ls [--options] disk.img [disk.img ...] directory
It failed to parse domain name even-though virsh was able to start the guest
with the same name.
There should not be any error.
Requested comments from libvirt developers:
Created attachment 451243 [details]
To check the syntax of the vm name
This is actually not a bug. You need to escape
the parameter on the command line, eg:
However this lead to a very interesting thread on
the upstream mailing list, and there are undoubtedly
other bugs in this area.
Hugh, dev-ack+ (for 6.1) too.
Fixed in man pages.
Tested with libguestfs-1.7.17-10.el6:
Have checked all the virt-* tools manual pages, including:
All the manual pages have the "SHELL QUOTING" content mentioned in bug 639601 comment 7.
According to the result above, move to VERIFIED.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
libguestfs documentation did not specify that special characters should be surrounded by quotes or otherwise "escaped" when used with the virt-list-filesystems command at the command line. The following has been added to the libguestfs documentation:
Libvirt guest names can contain arbitrary characters, some of which have meaning to the shell such as # and space. You may need to quote or escape these characters on the command line. See the shell manual page sh(1) for details.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.