[Libvir] [PATCH] Allow selection of the NIC model in QEMU/KVM

Daniel Veillard veillard at redhat.com
Tue Apr 8 13:43:37 UTC 2008


On Tue, Apr 08, 2008 at 02:17:56PM +0100, Richard W.M. Jones wrote:
> This patch allows selection of the NIC model for QEMU/KVM domains.
> The selection is done by adding a <model/> element to the XML, as in
> this example:
> 
>     <interface type='user'>
>       <mac address='00:16:3e:33:b8:d3'/>
>       <model type='ne2k_pci'/>
>     </interface>
> 
> The model type string is only checked to make sure it's a short
> alpha-numeric + underscore, since it seems impractical to extract the
> actual list of supported models.
> 
> If you choose a supported model then QEMU starts up with this extra
> -nic parameter:
> 
>   /usr/bin/qemu-kvm -M pc -m 500 -smp 1 -monitor pty \
>     -boot c -hda /var/lib/xen/images/rhel51x32kvm.img \
>     -net nic,macaddr=00:16:3e:33:b8:d3,vlan=0,model=ne2k_pci -net user,vlan=0 \
>     -usb -vnc 127.0.0.1:0
> 
> If you choose a non-existant model then you get the error:
> 
>   libvir: QEMU error : internal error QEMU quit during monitor startup

  The patch looks fine by me, +1

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/




More information about the libvir-list mailing list