From 97471de4a3c64605bbd90d91688947a2d7fa1d66 Mon Sep 17 00:00:00 2001 From: George Kennedy Date: Tue, 9 Aug 2022 19:14:30 +0000 Subject: vm/qemu: move timeout before retry to avoid resource busy Add "Device or resource busy" check to delay loop in function Create to avoid resource busy caused by qemu "lazy release" of VFs when VMs are restarted. Signed-off-by: George Kennedy --- vm/qemu/qemu.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vm/qemu/qemu.go b/vm/qemu/qemu.go index 602cc4fb4..e57c755c3 100644 --- a/vm/qemu/qemu.go +++ b/vm/qemu/qemu.go @@ -341,6 +341,9 @@ func (pool *Pool) Create(workdir string, index int) (vmimpl.Instance, error) { if i < 1000 && strings.Contains(err.Error(), "ould not set up host forwarding rule") { continue } + if i < 1000 && strings.Contains(err.Error(), "Device or resource busy") { + continue + } return nil, err } } -- cgit mrf-deployment