I am trying to start Virtualbox images hosted on a Window box by running a cronjob from a Linux box. The job simply SSHs into Windows and runs a vboxmanage command to start up the VMs. I specifically want to do it this way instead of locally on the Windows box as a scheduled task for my own reasons. The problem I am running into is that Windows doesn't like accepting VBoxManage as a command by itself. It is requiring I add in the C:\Program Files\Oracle\VirtualBox\VBoxManage.exe
as the executable path for the command.
Currently my bash script looks like this:
#!/bin/bash
ssh -t [email protected] "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm VIRTUALMACHINE1 --type headless
When I run it the error comes back as "C:\Program is not recognized as an internal or external command."
My question can be simple or complex.
The simple version is: How can I get the proper syntax on this one line command to have the Windows SSH server interpret the VBoxManage command using the path of the executable?
The complex version is: is there a method to control VirtualBox remotely through an ssh -t
script that involves no programming locally on the Windows server or storing files/batch scripts on the server?