diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c index cde9d70eef..e7e27b57fd 100644 --- a/src/util/virnetdevmacvlan.c +++ b/src/util/virnetdevmacvlan.c @@ -24,6 +24,7 @@ #include "virnetdevmacvlan.h" #include "virmacaddr.h" #include "virerror.h" +#include "virutil.h" #define VIR_FROM_THIS VIR_FROM_NET @@ -119,6 +120,11 @@ virNetDevMacVLanCreate(const char *ifname, return -1; } + if (flags & VIR_NETDEV_MACVLAN_CREATE_WITH_TAP) { + /* Allow udev to process newly created macvtap. */ + virWaitForDevices(); + } + VIR_INFO("created device: '%s'", ifname); return 0; }