Bug 1276485

Summary: qemu: VM name can't contain '='
Product: [Community] Virtualization Tools Reporter: Dr. David Alan Gilbert <dgilbert>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: crobinso, fjin, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-16 14:35:29 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:

Description Dr. David Alan Gilbert 2015-10-29 20:07:30 UTC
Description of problem:
(I did this through virt-maanger)
If you create a VM with the name 'debug-threads=on'  it ends up running qemu with
   -name debug-threads=on

  which doesn't set the name, it just turns an option on.
  Using:
   --pool=foo
  ends up with qemu failing to start complaining that --pool is unknown


Version-Release number of selected component (if applicable):
libvirt-daemon-driver-qemu-1.2.18.1-2.fc23.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Use virt-manager to create a vm
2. Give it a name like --pool=foo

Actual results:
qemu doesn't start

Expected results:
Either something rejects the name or it gets passed as -name guest=--pool=foo

Additional info:
  Note that -name foo  is equivalent to -name guest=foo
I added debug-threads=  about a year or so ago, and rewrote -name to use QemuOpts, but it's been able to take:  -name foo,process=bob    for a while before that.

Comment 1 Dr. David Alan Gilbert 2015-10-29 20:08:24 UTC
Oops, forgot to mention bz 1140121 is a request to get libvirt to have an easy way to turn debug-threads on, I just didn't mean this easy :-)

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

http://www.redhat.com/archives/libvir-list/2016-April/msg01594.html

Comment 3 Cole Robinson 2016-05-16 14:35:29 UTC
commit e3a685901965d21aae4def9399474dde1c7b7a89
Author: Cole Robinson <crobinso>
Date:   Fri Apr 22 18:39:09 2016 -0400

    qemu: command: Use -name guest= if available
    
    -name guest= is the explicit parameter for passing a VM name. Using
    it is required to allow a VM with an '=' in the name
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1276485