简体   繁体   中英

Passing Arguments to VirtualBox MacOS Terminal

Trying to pass some arguments into Terminal on a MacOS VirtualBox VM (from a Windows 10 host). I can get Terminal to launch correctly, but the arguments aren't working.

"C:\\Program Files\\Oracle\\VirtualBox\\VBoxManage.exe" guestcontrol "MacOS High Sierra New" run "/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal" --username justin --password password --wait-stdout --"/c echo test"

Am I missing a flag or something? Also, if there's a better way to run shell commands in a VM, I'm all ears. Thanks!

经过大约8个小时尝试不同的事情后,终于让它工作了:

VBoxManage guestcontrol "vmname" run /bin/sh --username usr --password pass --verbose --wait-stdout --wait-stderr -- -c "echo test"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM