[libvirt] Interface pools and passthrough mode (issue to discuss)
sshah at solarflare.com
Thu Dec 8 10:55:07 UTC 2011
While working on my patches I came across an issue which I would like to discuss with everybody.
The definition of passthrough mode in the Network XML Format document says that, in passthrough mode each physical interface can only be in use by a single guest interface at a time.
Consider the scenario where we a single KVM host:
We can define 2 network configurations, one that uses vepa and other that uses passthrough mode with the same interface pool.
# virsh net-define vepa_network.xml
# virsh net-define passthrough-network.xml
Suppose we use the vepa-network for guest1 and passthrough network for guest2.
Guest 1: (snippet of xml)
Guest2: (snippet of xml)
# virsh define guest1.xml
# virsh define guest2.xml
# virsh start guest1
# virsh start guest2
Since the virNetworkDef is different for the two network configs, how does libvirt keep track of the interfaces in use at this point?
Wouldn't libvirt use the first free interface in both cases which will be eth10 since the usageCount will be zero in both cases start of day?
More information about the libvir-list