When trying to run “incus create” in a subprocess of the Azure Pipelines Agent (GitHub - microsoft/azure-pipelines-agent: Azure Pipelines Agent 🚀), the incus client hangs waiting for some input from stdin. I spent way too long trying to figure out what was going on, eventually realizing that a way around this is to run incus create ... < /dev/null.
Commands like incus profile edit do read from stdin and they have the same code to check for stdin. You can cat myprofile.txt | incus profile edit myprofile.
Can you try to preface the incus create with nohup? It effectively disables stdin but I do not know if it has any side-effects to your case.
Use as