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

Matthias Bolte matthias.bolte at googlemail.com
Fri Sep 3 11:50:09 UTC 2010


2010/9/2 Tomasz Chmielewski <mangoo at wpkg.org>:
> On 02.09.2010 22:31, Tomasz Chmielewski wrote:
>>
>> How can I pass custom parameters to kvm?
>>
>> I'm trying to pass this simple argument: -host cpu
>
> Of course I meant: -cpu host

You can specify custom QEMU commandline arguments since libvirt 0.8.3.

Try to replace

   <domain type='kvm'>
     ...
   </domain>

by

  <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.

Matthias




More information about the virt-tools-list mailing list