Hi Richard,

Do you mean the `/tmp/qemu-tap-locks/tapX.lock` file which is generated
by:
> possibles = re.findall(tap_re, ip_link, re.M)
> tap = ""
> for p in possibles:
>     lockfile = os.path.join(lockdir, p)
>     if os.path.exists('%s.skip' % lockfile):
>         logger.info('Found %s.skip, skipping %s' % (lockfile, p))
>         continue
>     self.taplock = lockfile + '.lock'
?

How should I use it then? :) Something like `basename /tmp/qemu-tap-
locks/tap0.lock | sed "s/[^0-9]//g"` and pass it into variable? It's
not very unique or straight forward, is it?

Looking into qemuboot.conf, maybe @CLIENT@ could be feasible. But the
main problem is, that I need a @variable@ inside "cmd" while it's
evaluated there. The @CLIENT@ nor @TAP@ are used in setup_tap nor
setup_cmd. 

What do you mean by PID? Do you mean to use `ps` to get the pid or
somehow call `os.getpid()`?

Would it be possible to provide me an example(s) how to achieve it ? :)

Many thanks for support,
Zuzana

On Mon, 2026-06-08 at 12:19 +0100, Richard Purdie wrote:
> On Sun, 2026-06-07 at 19:40 +0200, Zuzana via lists.openembedded.org
> wrote:
> > In some cases like running multiple QEMUs, would be nice to have an
> > option
> > to distinguish between them. For this reason I introduce an unique
> > instance
> > ID based on time. Later in cmd, the '@INSTANCE_ID@' could be used
> > for QEMU
> > identification.
> > 
> > Signed-off-by: Zuzana Valekova Spitalova
> > <[email protected]>
> > ---
> >  scripts/runqemu | 7 +++++++
> >  1 file changed, 7 insertions(+)
> 
> Note that we already have the taplocks and IP addresses for the
> guests,
> there is also the PID of qemu as a unique ID. Why would we need
> something else as well? Can you not use the PID?
> 
> Cheers,
> 
> Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#238253): 
https://lists.openembedded.org/g/openembedded-core/message/238253
Mute This Topic: https://lists.openembedded.org/mt/119693437/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to