[libvirt] Network not Persistent
laine at laine.org
Mon Feb 20 18:43:23 UTC 2012
On 02/20/2012 12:37 PM, Shradha Shah wrote:
> Hello All,
> I am currently working on patches for PCI-passthrough of SRIOV VF's and I am facing an issue with the network definition not being persistent.
> I am using a new forward mode = hostdev and the network xml is as follows:
> <forward mode="hostdev">
> <pf dev="eth2"/>
> Command line used is:
> # virsh net-define pci_passthrough_network.xml
> The network is defined successfully and I can use it at this point.
> But if I restart libvirt after defining the above network, I lose the network definition.
> After restart libvirt does not possess any knowledge of the above network.
> This does not happen when I use forward mode="bridge".
> I have cross referenced the function call path of networkDefine for both the forwarding modes and I can't seem to find the problem.
> Is there some function I am missing?
You need to add some logic to networkFindActiveConfigs() to determine if
the network is active.
(actually this points out that networkFindActiveConfigs() doesn't have
any code to determine if the macvtap network types are active. It turns
out that there's really no effect to starting one of those types of
network, but I should probably do *something* to allow a restarted
libvirtd to determine if that type of network is started...)
More information about the libvir-list