
Solarflare
Server
Adapter
User
Guide
SR
‐
IOV
Virtualization
Using
KVM
Issue
20
©
Solarflare
Communications
2017
345
11
Restart
the
virtual
machine
in
the
host
and
VF
interfaces
will
be
visible
in
the
guest:
#
virsh
start
<vmname>
The
following
(example)
extract
is
from
the
VM
XML
file
after
a
VF
has
been
passed
through
to
the
guest
using
the
procedure
above
(line
numbers
have
been
added
for
ease
of
description):
1.
<interface
type='hostdev'
managed='yes'>
2.
<mac
address='52:54:00:d1:ec:85'/>
<source>
3.
<address
type='pci'
domain='0x0000'
bus='0x03'
slot='0x00'
function='0x5'/>
</source>
4.
<alias
name='hostdev0'/>
5.
<address
type='pci'
domain='0x0000'
bus='0x00'
slot='0x07'
function='0x0'/>
</interface>
XML
Description
1
A
description
of
how
the
VF
interface
is
managed
‐
added
by
user.
When
managed=yes
,
the
VF
is
detached
from
the
host
before
being
passed
to
the
guest
and
the
VF
will
be
automatically
reattached
to
the
host
after
the
guest
exits.
If
managed=no
,
the
user
must
call
virNodeDeviceDetach
(or
use
the
command
virsh
nodedev
‐
detach
)
before
starting
the
guest
or
hot
‐
plugging
the
device
and
call
virNodeDeviceReAttach
(or
use
command
virsh
nodedev
‐
reattach
)
after
hot
‐
unplug
or
after
stopping
the
guest.
2
The
VF
MAC
address.
If
not
specified
by
the
user
this
will
be
automatically
assigned
a
random
MAC
address
by
libvirt
The
user
can
specify
a
MAC
address
when
editing
the
XML
file.
3
The
VF
PCIe
address,
this
is
the
address
of
the
VF
interface
as
it
is
identified
in
the
host.
This
should
be
entered
by
the
user
when
editing
the
XML
file.
4
If
not
specified
by
the
user
the
alias
name
will
be
automatically
assigned
by
libvirt
The
user
can
supply
an
alias
when
editing
the
XML
file.
5
The
VF
PCIe
address
(as
known
by
the
guest)
will
be
added
automatically
by
libvirt.
For
further
information
about
the
hostdev
configuration
and
XML
formats,
refer
to
the
following
link:
http://libvirt.org/formatdomain.html#elementsNICSHostdev