繁体   English   中英

将参数传递给VirtualBox MacOS终端

[英]Passing Arguments to VirtualBox MacOS Terminal

尝试将一些参数传递到MacOS VirtualBox VM上的终端(来自Windows 10主机)。 我可以让终端正确启动,但参数不起作用。

"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"

我错过了一面旗帜吗? 另外,如果有更好的方法在VM中运行shell命令,我会全力以赴。 谢谢!

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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