Virtualbox 机器内的自动化操作
我在虚拟机中遇到一些问题,在关闭/重新启动期间,这种问题似乎只发生一百次。 为了帮助调试,我正在考虑编写一个在桌面上运行的脚本,该脚本启动虚拟机并在其中多次自动执行操作(按下键盘按键)。 (首选 VirtualBox)。 这正是使用期望库的脚本对命令行中的程序的处理方式。
我不确定这是否可能,但无论如何,如果有人有想法......
干杯
I'm Having some trouble in a vm that seems to occur only once in a hundred during shutdown/reboot.
To help the debug, I'm thinking to write a script that runs on my desktop, which starts the vm and automate operations for a huge number of times (keyboard key pressed) whithin it. (VirtualBox preferred).
It's just exactly how a script using the expect lib would do with a program in command line.
I'm not sure it's possible, but anyway, if anyone has an idea...
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
VirtualBox 帮助文件(与 VirtualBox 一起安装)有非常详细的命令参考部分。一探究竟。我已使用 VBoxManage 命令通过命令行启动虚拟机。还有其他几个命令和命令选项。要在虚拟机内自动执行命令,您可以使用批处理文件或 shell 脚本,并将其作为启动命令的一部分。
The VirtualBox help file (installed with VirtualBox) has a very detailed Command Reference section. Check it out. I have used the VBoxManage command to start VMs via command line. There are several other commands and command options. For automating commands inside the VM, you can use a batch file or a shell script and make it part of the startup commands.