Re: [PATCHv2 1/2] virDomainSaveXML: Reject domains which name contain '/'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Blake wrote:
> On 02/08/2013 11:44 AM, Jim Fehlig wrote:
>
>   
>>> Seems this should be in a more "general" location. Would the same rules apply to
>>> other objects (networks, storage, etc.)?  What other characters should be avoided? 
>>> Having a comma, semi-colon, colon, etc. could have interesting results.
>>>       
>> Yeah, comma is an interesting one for qemu since that delimits option
>> subarguments.  E.g. trying to start a qemu instance with name 'foo,bar'
>> results in
>>
>> $ virsh start "foo,bar"
>> error: Failed to start domain foo,bar
>> error: internal error process exited while connecting to monitor:
>> Unknown subargument bar to -name
>>     
>
> That's an independent bug - we already have a function for properly
> quoting commas when passing to qemu; if we would use that function
> properly, the command line would be -name foo,,bar, at which point qemu
> would be using 'foo,bar' internally anywhere the name is needed.
>   

I hacked up a patch to quote the comma and qemu still rejects it

virsh start "foo,bar"
error: Failed to start domain foo,bar
error: internal error process exited while connecting to monitor:
qemu-kvm: -name foo,,bar: invalid option

I should have first tried invoking qemu directly instead of fiddling
with a patch

qemu-kvm -name foo,,bar
Unknown subargument ,bar to -name

This is with 1.4 rc1 btw.

Regards,
Jim

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]