Thanks for reading. About your issue, I saw a similar issue in StackOverflow (SO) and I didn’t took the time to investigate (in the SO question, it was in a script, and I reproduced it in a script).
It’s “strange”. If you perform the 2 calls in a row, I mean a VM creation and a SCP, it failed. BUT, and it’s the strange thing, if you
sleep 15 secondes (not 10, 15!) after the VM creation, and then call the SCP, the command works!
Can you try to add a sleep 15 and tell me if it solves your issue?
Thanks in advance.