On Fri, 14 May 2021 16:38:29 +0300 Tzvetomir Stoyanov <tz.stoyanov@xxxxxxxxx> wrote: > > What am I missing? > > cid is not updated between both checks, it always fails - even though > read_qemu_guests() may succeed to find the VM with that name. Ah, that's what I was missing. :-p For some reason I thought it set the *cid, but I see that's obviously not the case. You are correct, the second check is not needed because the code to set *cid is right after it. Thanks for pointing that out. -- Steve