[Libvir] <model>e1000</model> - Specifying model in XML Configs

Jim Paris jim at jtan.com
Wed Apr 9 00:05:52 UTC 2008


Henri Cook wrote:
> Hi guys,
> 
> I just tried to port a few customers over to this libvirt setup i'm
> hoping to run and I couldn't get their machines started because there's
> no mechanism to specify a model in the XML!
> 
> I know redhat have changed KVM's default driver to e1000, which I think
> is the one I like the most and almost if not all of my VMs use. Ubuntu
> haven't done that yet however!
> 
> Is there a model directive in the latest version? In the works? Just so
> I know which solution I should pursue (updating libvirt or harassing
> ubuntu to change the default)

Hi,

I posted a series of patches to do this last year:
  http://www.mail-archive.com/libvir-list@redhat.com/msg03554.html
It generated some discussion but AFAIK didn't go anywhere.

Henri, if you want a quick hack to add specific options to kvm, you
can just specify a script as the KVM binary and have it add or modify
arguments as you wish.  For example, I used:

  #!/bin/bash
  i=0
  ARGV=("$@")
  while [ $i -lt $# ] ; do
      # Use rtl8139 network card instead of default ne2k_pci
      ARGV[$i]=${ARGV[$i]/#nic/nic,model=rtl8139}
      i=$((i+1))
  done
  exec /usr/bin/kvm ${ARGV[@]}


-jim




More information about the libvir-list mailing list