How To Start An appVM Bash Script From Dom0?

I have a startup script in dom0. It starts Vms, attaches devices, then execute scripts within those VM file spaces.

I’m having trouble with the last part. I just can’t get the script to call the appVM script from dom0.

I tried:
qvm-run appVMname ./home/users/scripts/startup.sh

It errors:
Command fails with error code 127

The scripts when called within the appVm work fine. So the problem is how I’m trying to run the script from dom0 inside the appVm.

How’s it done?

2 Likes

I typically use this construct…

qvm-run --user=root vm_name 'sh -c "command"'

…and depending on the context, substitute “user” for “root”, or add --pass-io (typically I use the latter only for debugging).

So, based on a test, this should work, (assuming you already chmod +x startup.sh):

qvm-run --user=user appVMName 'sh -c "/home/users/scripts/startup.sh"'

B

2 Likes