Ram*_*aes 7 windows-7 virtualbox services
我想像VBoxManage startvm MyVM --type headless
服务(postgres、apache)一样在引导系统上运行这个命令。
我在互联网上发现这可能是解决方案,所以我尝试了所有这些版本:
sc create "vboxMyVMService" binPath= "C:\Progman Files\Oracle\VirtualBox\VBoxManage.exe startvm MyVM --type headless"
sc create "vboxMyVMService" binPath= "C:\Progman Files\Oracle\VirtualBox\VBoxManage startvm MyVM --type headless"
没有成功,所以我试图抑制命令的详细输出
sc create "vboxMyVMService" binPath= "C:\Progman Files\Oracle\VirtualBox\VBoxManage.exe startvm MyVM --type headless > NUL"
sc create "vboxMyVMService" binPath= "C:\Progman Files\Oracle\VirtualBox\VBoxManage startvm MyVM --type headless"
还是没有结果。所有这个版本都给我返回了1053错误。所以最后调用是在Path中添加Virtualbox命令
sc create "vboxMyVMService" binPath= "VBoxManage.exe startvm MyVM --type headless"
sc create "vboxMyVMService" binPath= "VBoxManage startvm MyVM --type headless"
抑制输出
sc create "vboxMyVMService" binPath= "VBoxManage.exe startvm MyVM --type headless > NUL"
sc create "vboxMyVMService" binPath= "VBoxManage startvm MyVM --type headless > NUL"
没有肯定的结果总是1053错误。
我带着最后的希望遵循了本教程,但没有成功。
我正在考虑下载 Visual Studio 并尝试与创建服务项目相关的内容。
那么伙计们,我的错误在哪里?我还有希望吗?
你能把你的操作系统切换到 linux 吗?
为什么需要此 VM 与系统一起启动?
为什么不在 Windows 主机内部署应用程序?
我无法找到一种机制来使用 VBoxManager 命令将 VM 作为服务启动,而无需任何人先登录。
我使用该VBoxVmService
工具启用了我的 Ubuntu Server VM 作为服务运行:https :
//github.com/onlyfang/VBoxVmService
简要说明:VBoxVmService 是一个 Windows 应用程序,它允许您从本机 Windows 服务实体中运行 Oracle 的 VirtualBox VM。
我需要这样做的主要原因是,无需任何人登录即可启动 VM。我的是一个开发人员工作站,它会重新启动以进行更新,有时我会忘记启动 VM,直到有人戳我。
这是它的工作原理:
首先,手动确保所需的 VM 启动并正常工作且没有错误。否则将很难调试通过日志挖掘。
安装后,VMBoxService
它可以作为 Windows 服务执行
编辑它的配置 INI 文件(请参阅此处获取完整的文档示例)
重新启动机器或只是启动已VMBoxService's
安装的 Windows 服务
下面是一个示例 INI
[Settings]
VBOX_USER_HOME=C:\Users\YOUR_NAME_HERE\.VirtualBox
PauseShutdown=8000
[Vm0]
VmName=ubuntu-server
ShutdownMethod=savestate
AutoStart=yes
Run Code Online (Sandbox Code Playgroud)
更新:仅支持 Win 10+
归档时间: |
|
查看次数: |
17792 次 |
最近记录: |