qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] How to set the network card for qemu to use?


From: Aleksei
Subject: Re: [Qemu-discuss] How to set the network card for qemu to use?
Date: Fri, 14 Oct 2016 12:11:23 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

This is not the right mailing list to ask about persistent NIC naming on your host system.

Assuming you've solved that and trying to get a VM working with eth1, do the following:

1) Set up a bridge on the host (let's say it's bridge0) with eth1 as a slave. bridge0 is configured to auto-get IPv4 address via DHCP. Different methods are described here https://wiki.archlinux.org/index.php/Network_bridge.

2) Include the following to your Qemu command line. You don't need to manually create tap devices on the host, qemu-bridge-helper script does this for you.
    -device virtio-net,netdev=internet \
    -netdev bridge,br=bridge0,id=internet,helper=/usr/lib/qemu/qemu-bridge-helper

3) Start VM, post results. Please try to be concise ;) and post what you are trying to do and actual error messages. Also provide your Qemu version.
    
--Regards, Aleksei



From: Miroslav Rovis
Sent: Friday, October 14, 2016 7:47AM
To: Qemu-discuss
Subject: Re: [Qemu-discuss] How to set the network card for qemu to use?
On 161014-03:11+0200, Miroslav Rovis wrote:
...
Concrete setup is three NIC cards:
eth0
eth1
eth2

And the question is simple: what -netdev options (or is there some other
way?) do I use to get qemu to use eth2?
And that proved, to me, impossible.
I think I should try and maybe get the NIC that I connect to internet
with to get the name eth0 instead of the above.
...
And I thought of adding this line to kernel command line in grub.cnf :
netdev=21,,0x000000000001d000,,eth0

(and report back if that was, by some odd chance, successful)

Here's the way I gone through, it has concluded, you'll see why I'm
posting it. Following is a text already previously written, all is
over by now here....

---
One unsuccessful attempt, similar to mine, that I found:

https://lkml.org/lkml/2005/3/10/213
(notice it's a company, and nobody replied)

Also I found this old thread:

https://www.mail-archive.com/address@hidden/msg13466.html
(which I, in the end, haven't read, there were other tries there... but
likely the result was similar or same to mine)

Similar solutions offered at:

http://unix.stackexchange.com/a/10260

(
full reqest uri (clean):
http://unix.stackexchange.com/questions/10254/how-to-change-the-order-of-the-network-cards-eth1-eth0-on-linux

It's very much worth noticing that there are some fine explanations there,
but part of those explanations look very much to be obsolete stuff --
year 2011
)

where the suggestion reads:

netdev=irq=2,name=eth0

( of course, changing it to:

netdev=irq=21,name=eth0 )

Maybe that should do.

So instead of what I first thought:
netdev=21,,0x000000000001d000,,eth0
I think I should try:
netdev=irq=21,mem_start=0x000000000001d000,name=eth0

In the end I tried all of the above, and nothing worked. But nothing
nothing nothing. The kernel behaved as if there wasn't that line at all
(other then printing it in the logs).

I said further above: You'll see why I'm posting it. And it's because
this is probably impossible to do, and the kernel-parameters.txt should
probably be revises, at least for some ethernet cards.

It is probably that I have to use a different card, one that is eth0 on
every boot if I want qemu with pass-through.

Curiosity still lives here. If there were any successes in getting those
parameters to work, or if there are more explanations, I'll be glad to
here!

Regards!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]