<div dir="ltr"><div>Hello--</div><div><br></div><div>I have a xymon client test script that runs fine, as scheduled, returning the appropriate results. I added an additional test to the script that fails when the script is run on schedule, but which succeeds when the script is run manually. The new test is a call to VirtualBox's VBoxManage command, to list the existing VMs. When run by xymon, it appears that the call to VBoxManage is not being sent all the parameters. If I change the command to just "VBoxManage", the command returns the help message for VBoxManage. If I change the command to "VBoxManage list", the command returns the help message for the "list" command. But the command "VBoxManage list vms" returns nothing. When the script is run manually or within bbcmd, the call to "VBoxManage list vms" works as expected. </div><div><br></div><div>Below is a version of the script with just my new test (plus plenty of debugging info):</div><div><br></div><div>#!/bin/sh</div><div># wrapper for firing off the client tests</div><div><br></div><div>echo $(date) "!!! testing VBoxManage"</div><div>echo $(date) "!!! HOBBITCLIENTHOME=$HOBBITCLIENTHOME"</div><div>echo $(date) "!!! BBHOME=$BBHOME"</div><div>echo $(date) "!!! calling VBoxManage:"</div><div>/usr/lib/virtualbox/VBoxManage list vms</div><div>echo $(date) "!!! return code = $?"</div><div>echo $(date) "!!! after VBoxManage"</div><div><br></div><div>When this script runs as part of normal xymon operation (every 5 minutes, in this case), I get the following output in my log file:<br></div><div><br></div><div>Tue May 17 23:04:48 UTC 2016 !!! testing VBoxManage</div><div>Tue May 17 23:04:48 UTC 2016 !!! HOBBITCLIENTHOME=/opt/mon/hobbit/client</div><div>Tue May 17 23:04:48 UTC 2016 !!! BBHOME=/opt/mon/hobbit/client</div><div>Tue May 17 23:04:48 UTC 2016 !!! calling VBoxManage:</div><div>Tue May 17 23:04:48 UTC 2016 !!! return code = 0</div><div>Tue May 17 23:04:48 UTC 2016 !!! after VBoxManage</div><div><br></div><div>But when I run the script directly from the tests.d directory, or when I run it using bbcmd, I get the following output:</div><div><br></div><div>2016-05-17 23:08:46 Using default environment file /opt/mon/hobbit/client/etc/hobbitclient.cfg</div><div>Tue May 17 23:08:46 UTC 2016 !!! testing VBoxManage</div><div>Tue May 17 23:08:46 UTC 2016 !!! HOBBITCLIENTHOME=/opt/mon/hobbit/client</div><div>Tue May 17 23:08:46 UTC 2016 !!! BBHOME=/opt/mon/hobbit/client</div><div>Tue May 17 23:08:46 UTC 2016 !!! calling VBoxManage:</div><div>"VM-00" {f428809a-e08e-2164-a52a-34405d323b18}</div><div>"VM-01" {8d9d188f-3f80-4fe4-99b2-7b740b3bd841}</div><div>    [ output omitted ]</div><div>"VM-11" {77145415-2130-4280-84da-1b06e78a110f}</div><div>"VM-12" {b91ae190-74a9-a4e7-9643-142fab9b29a9}</div><div>Tue May 17 23:08:47 UTC 2016 !!! return code = 0</div><div>Tue May 17 23:08:47 UTC 2016 !!! after VBoxManage</div><div><br></div><div>I tried moving the VBoxManage command to a separate script and calling the script instead of the command; same behavior. I tried running the VBoxManage command in a subshell within the script; same behavior. Relying on the environment PATH or specifying the full path of the VBoxManage executable made no difference. If this were a permission problem, why would VBoxManage run at all (in the cases where it returns a help message)?<br></div><div>What am I missing here?</div><div>Thanks for any suggestions!</div><div><br></div></div>