[virt-tools-list] passing custom parameters to kvm?

Matthias Bolte matthias.bolte at googlemail.com
Fri Sep 3 12:15:40 UTC 2010


2010/9/3 Tomasz Chmielewski <mangoo at wpkg.org>:
> On 03.09.2010 13:50, Matthias Bolte wrote:
>
>>   <domain type='kvm'
>> xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
>>      ...
>>     <qemu:commandline>
>>       <qemu:arg value='-cpu'/>
>>       <qemu:arg value='host'/>
>>     </qemu:commandline>
>>   </domain>
>>
>> in the XML config of the domain using 'virsh edit<domain-name>'.
>>
>> But make sure that you don't add a<cpu>  element to the XML config
>> then, because that would result in two -cpu options in the final
>> commandline.
>
> Seems to work - thanks.
>
> But: how do I change setting in /etc/libvirt/qemu/<guest>.xml file, so that
> libvirt knows about it?
>
> Right now, as I edit it, the guest starts with old values (i.e. <cpu> I
> specified before, but which is already gone from the file).
>
> Restarting libvirtd doesn't seem to be a really proper way, or?
>

When you edit the files in /etc/libvirt/qemu/ directly then you need
to tell libvirtd to reload those files, either by restarting libvirtd,
or sending SIGHUP should also work.

But the recommended way to edit domain configs is via 'virsh edit
<domain-name>'.

Matthias




More information about the virt-tools-list mailing list