Bug 639926 - libvirt qemu driver should disallow domain names containing comma
Summary: libvirt qemu driver should disallow domain names containing comma
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2010-10-04 10:45 UTC by Richard W.M. Jones
Modified: 2016-05-16 14:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-05-16 14:35:55 UTC

Attachments (Terms of Use)

Description Richard W.M. Jones 2010-10-04 10:45:01 UTC
Description of problem:

The libvirt qemu driver allows you to create domain names which
contain a ',' (comma) character.

However qemu will not allow these domains to start up.  The
reason is that the qemu -name parameter must not contain a
comma, since that might be used to delimit other suboptions
in future.

The error message you get is:

  error: Failed to start domain ,
  error: internal error process exited while connecting to monitor: Unknown suba
rgument  to -name

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create a qemu or KVM domain where the name contains a comma.

Upstream discussion:


Comment 1 Eric Blake 2012-04-19 23:28:59 UTC
Rather, libvirt should be fixed to borrow ideas from this commit, and use those ideas to properly escape commas in domain names:

commit 6e0ff1d4024ca44fab307a89da1968f7b03cd482
Author: Eric Blake <eblake@redhat.com>
Date:   Fri Mar 9 16:13:30 2012 -0300

    qemu: support disk filenames with comma
    If there is a disk file with a comma in the name, QEmu expects a double
    comma instead of a single one (e.g., the file "virtual,disk.img" needs
    to be specified as "virtual,,disk.img" in QEmu's command line). This
    patch fixes libvirt to work with that feature. Fix RHBZ #801036.
    Based on an initial patch by Crístian Viana.

Comment 2 Cole Robinson 2016-04-22 22:47:57 UTC
Patches sent upstream:


Comment 3 Cole Robinson 2016-05-16 14:35:55 UTC
Upstream now, last patch was:

commit 7dbbc0ca07f0e8f2f3652afe4a3f7d94940bef1e
Author: Cole Robinson <crobinso@redhat.com>
Date:   Fri Apr 22 18:27:44 2016 -0400

    qemu: command: escape commas in chardev socket path
    After this, a default virt-manager VM will startup with a comma
    in the VM name:

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