diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9fcbb6c413..02f956ce48 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -8132,6 +8132,8 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver, break; } + qemuDomainInterfaceSetDefaultQDisc(driver, net); + /* Set bandwidth or warn if requested and not supported. */ actualBandwidth = virDomainNetGetActualBandwidth(net); if (actualBandwidth) { @@ -8146,8 +8148,6 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver, } } - qemuDomainInterfaceSetDefaultQDisc(driver, net); - if (net->mtu && virNetDevSetMTU(net->ifname, net->mtu) < 0) goto cleanup; diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 57635cd419..e5848d7de4 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1371,6 +1371,8 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver, if (qemuInterfaceStartDevice(net) < 0) goto cleanup; + qemuDomainInterfaceSetDefaultQDisc(driver, net); + /* Set bandwidth or warn if requested and not supported. */ actualBandwidth = virDomainNetGetActualBandwidth(net); if (actualBandwidth) { @@ -1389,8 +1391,6 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver, virNetDevSetMTU(net->ifname, net->mtu) < 0) goto cleanup; - qemuDomainInterfaceSetDefaultQDisc(driver, net); - for (i = 0; i < tapfdSize; i++) { if (qemuSecuritySetTapFDLabel(driver->securityManager, vm->def, tapfd[i]) < 0)