You can specifiy a ifname is you use -netdev tap however if you try and
use the bridge-helper script you get an error. Also looking at the code
of the bridge-helper I can see there is no logic for specificing a name.
I've already modified the helper script to now allow a name to be
passed. I'm just now having difficulty figuring out what sections in the
qemu source need to be modifed to allow this as well.
--
Shaun Reitan
NDCHost.com
------ Original Message ------
From: "Thomas Huth" <th...@redhat.com>
To: "Shaun Reitan" <shaun.rei...@ndchost.com>; qemu-discuss@nongnu.org
Sent: 2018-01-14 11:03:32 PM
Subject: Re: [Qemu-discuss] Setting a interface name with
qemu-bridge-helper?
On 13.01.2018 01:34, Shaun Reitan wrote:
When starting vm's with '-netdev bridge,id=net0,br=br0' each vm is
given
a tapX interface name and from what I can tell, there is no simple way
to figure out which interface belongs to which VM.
I'd like to see a name option added to it which would be passed along
to
the qemu-bridge-helper. Something like '-netdev
bridge,id=net0,br=br0,name=vm1net0' or '-netdev
bridge,id=net0,br=br0,ifname=vm1net0'
Any reason why setting the tap's interface name was left out before I
go
attempting to patch this functionality in? Or maybe is there a fast
and
simple way to get the tap interface of the VM
I think it should be possible to specify the name of the tap interface
via the "ifname=" parameter, e.g.: -netdev tap,ifname=tap2
In case you already started QEMU without that parameter, you can look
up
the tapX name via the "info network" monitor command.
HTH,
Thomas