[libvirt] [PATCH 3/3] qemu: XMLToNative: Parse XML as INACTIVE
Cole Robinson
crobinso at redhat.com
Fri Mar 14 13:22:01 UTC 2014
On 03/13/2014 06:27 PM, Jim Fehlig wrote:
> Cole Robinson wrote:
>> Right now we are parsing the XML as though it's live, which for example
>> will choke on hardcoded XML like:
>>
>> <seclabel type='dynamic' model='selinux' relabel='yes'/>
>>
>> Erroring with:
>>
>> $ sudo virsh domxml-to-native qemu-argv f
>> error: XML error: security label is missing
>> ---
>> src/qemu/qemu_driver.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>> index a01739c..89f443f 100644
>> --- a/src/qemu/qemu_driver.c
>> +++ b/src/qemu/qemu_driver.c
>> @@ -5812,7 +5812,8 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
>> goto cleanup;
>>
>> def = virDomainDefParseString(xmlData, caps, driver->xmlopt,
>> - QEMU_EXPECTED_VIRT_TYPES, 0);
>> + QEMU_EXPECTED_VIRT_TYPES,
>> + VIR_DOMAIN_XML_INACTIVE);
>>
>
> Seems like this would be a good change for other drivers that support
> connectDomainXMLToNative.
>
Good point, I'll fix them all in the next round.
- Cole
More information about the libvir-list
mailing list