
Solarflare
Server
Adapter
User
Guide
SR
‐
IOV
Virtualization
Using
KVM
Issue
20
©
Solarflare
Communications
2017
335
5
Associate
the
bridge
with
the
required
Solarflare
PF
(
HWADDDR
)
in
a
config
file
in
/etc/sysconfig/network
‐
scripts/ifcfg
‐
eth4
(this
example
uses
eth4):
DEVICE=eth4
TYPE=Ethernet
HWADDR=00:0F:53:21:00:60
BOOTPROTO=none
ONBOOT=yes
BRIDGE=
br1
6
Bring
up
the
bridge:
#
service
network
restart
7
The
bridge
will
be
visible
in
the
host
using
the
ifconfig
command:
#
ifconfig
‐
a
br1
Link
encap:Ethernet
HWaddr
00:0F:53:21:00:60
inet6
addr:
fe80::20f:53ff:fe21:60/64
Scope:Link
UP
BROADCAST
RUNNING
MULTICAST
MTU:1500
Metric:1
RX
packets:170
errors:0
dropped:0
overruns:0
frame:0
TX
packets:6
errors:0
dropped:0
overruns:0
carrier:0
collisions:0
txqueuelen:0
RX
bytes:55760
(54.4
KiB)
TX
bytes:468
(468.0
b)
8
Define
a
network
in
an
XML
file
i.e.
host
‐
network.xml
:
<network>
<name>host
‐
network</name>
<forward
mode='bridge'/>
<bridge
name="
br1
"/>
</network>
9
Define
and
start
the
network
using
virsh
net
‐
<option>
commands:
#
virsh
net
‐
define
host
‐
network.xml
Network
host
‐
network
defined
from
host
‐
network.xml
#
virsh
net
‐
start
host
‐
network
Network
host
‐
network
started
#
virsh
net
‐
autostart
host
‐
network
Network
host
‐
network
marked
as
autostarted
#
virsh
net
‐
list
‐‐
all
Name
State
Autostart
Persistent
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
default
active
yes
yes
host
‐
network
active
yes
yes
10
On
the
host
machine,
edit
the
VM
XML
file:
#
virsh
edit
<vmname>
11
Add
the
network
component
to
the
VM
XML
file:
<interface
type='network'>
<source
network='host
‐
network'/>
<model
type='virtio'/>
</interface>
12
Restart
the
VM
after
editing
the
XML
file.
#
virsh
start
<vmname>