Using VirtualBox to run a guest program

Using the Offline Simulator VM running in VirtualBox. I can attempting to start a guest program from the host machine with this command:
"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" guestcontrol URSim_VIRTUAL-5.11.10.1010502 run -- cmd.exe /c /home/ur/ursim-current/start-ursim.sh UR5
but am getting an error instead:
VBoxManage.exe: error: Waiting for guest process failed: The specified user was not able to logon on guest
Pretty sure that the supplied username/pwd are correct, what else to check for? Or is there a different way to launch this program from the host machine?

-thanks

Is it necessary to do it through a command? Could you open it through the VM itself?

Yes! The desktop link works just fine, and I use it all of the time. Apologies should have given more context, I am looking to automate this launch for testing purposes. So any guidance would be appreciated, if this is possible.

But… I might have to build out some additional remote control (from host to guest VM) in order to support automated testing, for a range of other features, thus such a mechanism could also start this program in the guest VM. So I will try out that approach.

Many thanks,
-Chris O

I tried sometime ago accessing the VM through Windows Subsystem for Linux (WSL) for backing up files. Some of the things that I did:

  1. Enabling the “Host-only adapter” in networking settings of the VM.
  2. On Control Panel, setting a static IP address for the Host-only adapter.
  3. In the WSL, create a bash script that would access the VM and copy the files through ssh commands.

On a similar matter, on step 3, you can use the ssh commands to execute any other instructions in bash, you could try:

export ADD_VM = 192.168.0.44 # sample address
ssh ur@$ADD_VM "touch /home/ur/ursim-current/programs.UR3/sample.script"

And see if this generates the blank file “sample.script” in the “programs.UR3” location. Then you could change the touch command by a running-script command.

But this means you still have to launch the VM manually. But I hope this is a start for you