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

Cole Robinson crobinso at redhat.com
Fri Sep 3 13:26:41 UTC 2010


On 09/03/2010 08:05 AM, Tomasz Chmielewski wrote:
> 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?
> 
> 

You aren't supposed to edit the XML files directly on disk, you should
use 'virsh edit'. See this libvirt FAQ for more info:

http://wiki.libvirt.org/page/FAQ#What_is_the_.27virsh_edit.27_command_and_how_do_I_use_it.3F

- Cole




More information about the virt-tools-list mailing list