Bug 801036 - libvirt with QEmu does not support disk filenames with comma
libvirt with QEmu does not support disk filenames with comma
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Eric Blake
:
Depends On:
Blocks: 801970
  Show dependency treegraph
 
Reported: 2012-03-07 09:46 EST by Crístian Viana
Modified: 2013-01-24 16:18 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 801970 (view as bug list)
Environment:
Last Closed: 2013-01-24 16:18:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
IBM Linux Technology Center 79568 None None None Never

  None (edit)
Description Crístian Viana 2012-03-07 09:46:00 EST
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.
Comment 1 Dave Allan 2012-03-07 11:28:44 EST
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?
Comment 2 Crístian Viana 2012-03-07 12:22:11 EST
Yes, I'll work on a patch for it.
Comment 3 Dave Allan 2012-03-07 12:55:58 EST
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.
Comment 4 IBM Bug Proxy 2012-03-07 14:31:04 EST
------- Comment From sglass@us.ibm.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---
Comment 5 Eric Blake 2012-03-09 19:43:19 EST
Upstream patch awaiting review: https://www.redhat.com/archives/libvir-list/2012-March/msg00420.html
Comment 6 IBM Bug Proxy 2013-01-24 11:40:38 EST
Closing this as it's been verified as fixed in RHEL 6.3.
Comment 7 Cole Robinson 2013-01-24 16:18:49 EST
If it's fixed in RHEL it's fixed upstream, so closing.

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