krunvm
krunvm copied to clipboard
Return code from command not returned by krunvm
I noticed that because of #20:
% krunvm start fedora-rawhide /bin/ls -- -l /bin/false
-rwxr-xr-x 1 root root 69808 Aug 1 15:36 /bin/false
% krunvm start fedora-rawhide /bin/false
% echo $?
0
The expected returned value would be 1, since that's what /bin/false returns.
This may make it difficult to use krunvm in scripts. For example, I could not write a host script that does a build and test whether the build succeeded.
This is actually a libkrun issue, related to https://github.com/containers/libkrun/issues/10. A interface needs to be designed to transport that information between the host and the guest in a way that doesn't require the intervention of a dedicated agent.