[libvirt] [PATCH v6] network: Add network bandwidth support to ethernet interfaces

Anirban Chakraborty abchak at juniper.net
Fri Nov 21 06:07:34 UTC 2014

On 11/20/14, 5:43 AM, "Vasiliy Tolstov" <v.tolstov at selfip.ru> wrote:

>2014-11-20 7:58 GMT+03:00 Anirban Chakraborty <abchak at juniper.net>:
>> Your original error message was that qemu couldn¹t find a tap device.
>> I am not sure how the above error relates to your original error.
>> Can you write your detail configuration setup and the steps you have
>> to get at this error?
>If i'm not wrong error goes from:
>qemuBuildInterfaceCommandLine builds interface command line and before
>qemu started tries to add tap device to tc, but tap created later via
>qemu (in my case).
>I think that virNetDevBandwidthSet needs to be run after qemu started.

Please look at the code. Tap device is not created for network interface
type ethernet. virNetDevTapCreate creates the tap device, which eventually
gets called from qemuNetworkIfaceConnect and this applies to interface
types network or bridge. For ethernet type interfaces, the onus is on the
user to create the tap device in the first place before configuring
bandwidth for it. 

So, there is no point in changing any code here, if the tap device doesn’t
exist and the vm configuration file has an entry for it, then libvirt is
supposed to throw the error message to let the user know about it.


More information about the libvir-list mailing list