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.

up vote 14 down vote accepted

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.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.