Run commands on a VirtualBox VM from outside

Is it possible to run commands on a VirtualBox VM from outside? Or should I use some sort of remote control tool like VNC? If so, what would be the easiest and best for such a simple task. I have a Windows 7 VM inside an LMDE Linux.


You can use the VBoxManage guestcontrol command to run any command runnable in the guest provided you have guest additions installed.


If your virtual machine is using bridged networking, then it is on the same network as the host machine. It appears to be just another computer on the network, so any remote access or remote command mechanism that works between physical machines will work here: SSH, VNC, RDP, etc.

If your VM is using NAT networking, you cannot connect directly to it over the network unless you first set up port forwarding, but thereafter it works as described above.