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.

Bug 916878

Summary: Incorrect error messages showed when --disk parameter contains special characters
Product: Red Hat Enterprise Linux 7 Reporter: tingting zheng <tzheng>
Component: virt-managerAssignee: Martin Kletzander <mkletzan>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: codong, cwei, dallan, lcui, mjenner, mkletzan, mzhan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-0.10.0-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 916875 Environment:
Last Closed: 2014-06-13 10:03:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 883470, 916875    
Bug Blocks:    

Description tingting zheng 2013-03-01 07:56:25 UTC
The bug also exists on rhel7.
version:
python-virtinst-0.600.3-2.el7.noarch
virt-manager-0.9.4-4.el7.noarch
libvirt-1.0.2-1.el7.x86_64

+++ This bug was initially created as a clone of Bug #916875 +++

Description of problem:
Incorrect error messages showed when --disk parameter contains special characters

Version-Release number of selected component (if applicable):
python-virtinst-0.600.0-15.el6.noarch
libvirt-0.10.2-18.el6.x86_64
virt-manager-0.9.0-18.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Add special characters to --disk paramter,eg:"#","%","!"
# virt-install -n test  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/ --disk /var/lib/libvirt/images/test#test.img,size=3G --ram 512 --graphics vnc
ERROR    Error with storage parameters: Size must be specified for non existent volume path '/var/lib/libvirt/images/test'

# virt-install -n test  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/ --disk /var/lib/libvirt/images/test\#test.img,size=3G --ram 512 --graphics vnc
ERROR    Error with storage parameters: Size must be specified for non existent volume path '/var/lib/libvirt/images/test'


# virt-install -n test  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/ --disk /var/lib/libvirt/images/test%test.img,size=3G --ram 512 --graphics vnc
ERROR    Improper value for 'size': invalid literal for float(): 3G


# virt-install -n test  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/ --disk /var/lib/libvirt/images/test!test.img,size=3G --ram 512 --graphics vnc
-bash: !test.img,size=3G: event not found

Actual results:
Incorrect error messages showed when --disk parameter contains special characters

Expected results:
Correct error messages showed,if can not add these special characters on --disk,right prompt showed.

Additional info:

Comment 4 Martin Kletzander 2013-03-11 14:13:50 UTC
(In reply to comment #0)
> # virt-install -n test  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/ --disk /var/lib/libvirt/images/test#test.img,size=3G --ram 512 --graphics vnc
> ERROR    Error with storage parameters: Size must be specified for non existent volume path '/var/lib/libvirt/images/test'
>
> # virt-install -n test  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/ --disk /var/lib/libvirt/images/test\#test.img,size=3G --ram 512 --graphics vnc
> ERROR    Error with storage parameters: Size must be specified for non existent volume path '/var/lib/libvirt/images/test'

These two should be the same as '#' is not used as comment in when there is a non-space character before that.  I'm still not sure where the problem lies, the search continues.

> # virt-install -n test  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/ --disk /var/lib/libvirt/images/test%test.img,size=3G --ram 512 --graphics vnc
> ERROR    Improper value for 'size': invalid literal for float(): 3G

This is expected, size can be only a number, virt-install doesn't support 'B', 'K', 'M', 'G', 'T', etc.  It is in GB by default, see virt-install(1).

> # virt-install -n test  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/ --disk /var/lib/libvirt/images/test!test.img,size=3G --ram 512 --graphics vnc
> -bash: !test.img,size=3G: event not found

This is inappropriately escaped, bash is trying to find previous command in history starting with 'test.img,size=3G'.

Comment 5 Martin Kletzander 2013-03-11 15:09:15 UTC
Moving to POST:

commit 7a18271ff3d2680f6ac7dc0eca1bc7d7fac8cee7
Author: Martin Kletzander <mkletzan>
Date:   Mon Mar 11 15:38:55 2013 +0100

    Don't support comments in parsed parameters

Comment 7 tingting zheng 2013-08-15 08:50:23 UTC
Tested with:
virt-install-0.10.0-2.el7.noarch
virt-manager-0.10.0-2.el7.noarch

# virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22#test.img,size=6 --ram 512 --graphics vnc 
ERROR    Error with storage parameters: Storage object name can only contain alphanumeric, '_', '.', or '-' characters


# virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22\#test.img,size=6 --ram 512 --graphics vnc 
ERROR    Error with storage parameters: Storage object name can only contain alphanumeric, '_', '.', or '-' characters

virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22%test.img,size=6 --ram 512 --graphics vnc 

So move the bug to VERIFIED.

Comment 8 tingting zheng 2013-08-19 07:54:56 UTC
(In reply to tingting zheng from comment #7)
> Tested with:
> virt-install-0.10.0-2.el7.noarch
> virt-manager-0.10.0-2.el7.noarch
> 
> # virt-install -n test1  -l
> http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/
> Server/x86_64/os/ --disk /var/lib/libvirt/images/test22#test.img,size=6
> --ram 512 --graphics vnc 
> ERROR    Error with storage parameters: Storage object name can only contain
> alphanumeric, '_', '.', or '-' characters
> 
> 
> # virt-install -n test1  -l
> http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/
> Server/x86_64/os/ --disk /var/lib/libvirt/images/test22\#test.img,size=6
> --ram 512 --graphics vnc 
> ERROR    Error with storage parameters: Storage object name can only contain
> alphanumeric, '_', '.', or '-' characters
> 
> virt-install -n test1  -l
> http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/
> Server/x86_64/os/ --disk /var/lib/libvirt/images/test22%test.img,size=6
> --ram 512 --graphics vnc 

Missed the results here:
virt-install -n test1  -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/latest-RHEL-6/6.4/Server/x86_64/os/ --disk /var/lib/libvirt/images/test22%test.img,size=6 --ram 512 --graphics vnc 
ERROR    Error with storage parameters: Storage object name can only contain
alphanumeric, '_', '.', or '-' characters

Comment 9 Ludek Smid 2014-06-13 10:03:12 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.