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 801970 - libvirt with QEmu does not support disk filenames with comma
Summary: libvirt with QEmu does not support disk filenames with comma
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 801036
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-10 00:44 UTC by Eric Blake
Modified: 2012-06-20 06:49 UTC (History)
15 users (show)

Fixed In Version: libvirt-0.9.10-5.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 801036
Environment:
Last Closed: 2012-06-20 06:49:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Description Eric Blake 2012-03-10 00:44:00 UTC
Cloning to RHEL

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

There's no way to specify a disk filename with comma on libvirt with QEmu.

QEmu supports filenames with comma by using a double comma (e.g. "file=virtual,,disk.img" is parsed by QEmu as the file virtual,disk.img). However this does not happen with libvirt. If you specify <source file="virtual,disk.img" />, libvirt will pass the exact name to QEmu, which is an error to QEmu; if you specify <source file="virtual,,disk.img" />, libvirt interprets as a literal name and reports a "no such file" error even before talking to QEmu.

Tested on libvirt-0.8.7-18.el6_1.4.x86_64.

How reproducible:
Always.

Steps to Reproduce:
1. Create an image file with a comma in the name (e.g. virtual,disk.img).
2. Create a QEmu VM with libvirt specifying that file as the disk.
3. Start the VM.
  
Actual results:
The file cannot be found.

Expected results:
The file should be found because it exists and QEmu supports that.

--- Additional comment from dallan on 2012-03-07 09:28:44 MST ---

TBH, this capability isn't something that I've seen a lot of people asking for, but if you need it and are willing to put together a patch, I doubt it would be controversial upstream, and the code probably isn't too complex.  Is that something that you'd be willing to take on?

--- Additional comment from vianac.ibm.com on 2012-03-07 10:22:11 MST ---

Yes, I'll work on a patch for it.

--- Additional comment from dallan on 2012-03-07 10:55:58 MST ---

Great, thank you.  If you haven't already, have a look at http://libvirt.org/hacking.html as there is some good advice there that can potentially save you a lot of time/work.

--- Additional comment from bugproxy.com on 2012-03-07 12:31:04 MST ---

------- Comment From sglass.com 2012-03-07 14:21 EDT-------
---Problem Description---

QEmu supports filenames with comma by using a double comma (e.g.
"file=virtual,,disk.img" is parsed by QEmu as the file virtual,disk.img).
However this does not happen with libvirt. If you specify <source
file="virtual,disk.img" />, libvirt will pass the exact name to QEmu, which is
an error to QEmu; if you specify <source file="virtual,,disk.img" />, libvirt
interprets as a literal name and reports a "no such file" error even before
talking to QEmu.

Contact Information = Anthony Liguori

---uname output---
n/a

Machine Type = n/a

---Debugger---
A debugger is not configured

---KVM Component Data---

--- Additional comment from eblake on 2012-03-09 17:43:19 MST ---

Upstream patch awaiting review: https://www.redhat.com/archives/libvir-list/2012-March/msg00420.html

Comment 4 weizhang 2012-03-14 07:29:46 UTC
Verify pass on
kernel-2.6.32-250.el6.x86_64
qemu-kvm-0.12.1.2-2.246.el6.x86_64
libvirt-0.9.10-5.el6.x86_64

Start a guest with
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/var/lib/libvirt/images/tt,tt.img'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

Domain started without error
qemu-kvm command
-drive file=/var/lib/libvirt/images/tt,,tt.img,if=none,id=drive-ide0-0-0,format=raw,cache=none 

Can reproduce on libvirt-0.9.10-4.el6.x86_64
Start guest will report error
error: Failed to start domain guest
error: internal error process exited while connecting to monitor: qemu-kvm: -drive file=/var/lib/libvirt/images/tt,tt.img,if=none,id=drive-ide0-0-0,format=raw,cache=none: Invalid parameter 'tt.img

Comment 6 errata-xmlrpc 2012-06-20 06:49:54 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-2012-0748.html


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