I have several Linux guest machines and are presently using openSUSE Tumbleweed as my host. I am interested in being able to run commands on my VMs from my host's command-line. I know I can start a VM from the command-line with:
in my Debian 8.3 VM from the command-line of my openSUSE Tumbleweed host. As this would allow me to write Bash scripts to automatically update all my guest VMs using their respective package managers.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
OK, I tried to test my advice and here's an example that (sort of) worked.
VBoxManage guestcontrol "Mint" run -v --usernameroot--password # -- "/usr/bin/apt-get" - update
Ign http://archive.canonical.com trusty InRelease
Get:1 http://security.ubuntu.com trusty-security InRelease [65.9 kB]
Ign http://archive.ubuntu.com trusty InRelease
Get:2 http://archive.canonical.com trusty Release.gpg [933 B]
...
VBoxManage guestcontrol "Mint" run -v --usernameroot--password # -- "/usr/bin/apt-get" - upgrade
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be upgraded:
adobe-flashplugin apt apt-transport-https apt-utils base-files bind9-host
cpp-4.8 dnsutils ecryptfs-utils firefox firefox-locale-en gcc-4.8
gcc-4.8-base gcc-4.8-base:i386 gcc-4.9-base gcc-4.9-base:i386
...
Note that I had to use the "root" user because I couldn't get the specific command, "apt-get", to work otherwise. "ls" works as a normal user.
Oh, and BTW, the 2nd command (upgrade) never completed... I'd use "ssh" if I were you. It's more ... proven to work.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.