You are not logged in.

#1 2014-05-24 02:15:35

emasculateur
Member
Registered: 2014-03-28
Posts: 2

[solved] [Qemu+libvirt] Can't emulate e1000 NIC cards

Hi,

I want to emulate 2 e1000 NIC cards. I'm using a virsh template file. I've tried several variantes of the following :

        <interface type='bridge'>
            <source bridge='br0'/>
            <target dev='veth0'/>
            <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
        </interface>
        <interface type='bridge'>
            <source bridge='br1'/>
            <target dev='veth1'/>
            <model type='e1000'/>
            <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
        </interface>

I created myself veth0 and veth1 with :

# ip link add type veth (this create veth0 and veth1 in one cmd, kind of weird)
# ip link set veth0 up
# ip link set veth1 up

I also edited /etc/qemu/bridge.conf :

allow br0
allow br1

But then :

$ virsh define vm.xml
$ virsh start myvm
error: Failed to start domain myvm
error: failed to retrieve file descriptor for interface: Transport endpoint is not connected

I also tried to create myseld br0 and br1, and then attach veth0 to br0 and veth1 to br1. Same results. What's wrong in my conf ?

EDIT : changed title according to WonderWoofy suggestion.

Last edited by emasculateur (2014-05-25 20:44:24)

Offline

#2 2014-05-24 06:54:37

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] [Qemu+libvirt] Can't emulate e1000 NIC cards

I think you should modify your title to specify that you are using libvirt with qemu.  Unfortunately, I know nothing about libvirt.

Offline

#3 2014-05-25 20:44:00

emasculateur
Member
Registered: 2014-03-28
Posts: 2

Re: [solved] [Qemu+libvirt] Can't emulate e1000 NIC cards

So I finally solved it really easily.
Instead of :

$ virsh connect qemu://system
$ virsh start myvm

I actually did :

$ virsh -c qemu:///system

This gives you a virsh CLI from which I was able to start my VM :

virsh # start myvm

I just wonder why virsh -c <domain> and virsh connect <domain> are doing two different things.

Offline

Board footer

Powered by FluxBB