我在Windows 8.1笔记本电脑上做本地Chef dev,并使用VirtualBox 5.1.24用于VM。我想使用Jenkins(v2.73.2)来运行可自动恢复VM快照和运行厨房融合,测试和重复的作业。
我添加了VirtualBox插件,但它不允许我添加节点(我记得在某处看到不支持Jenkins的v2.73.2)。
我写了一些Powershell来做我想要的事情,所以在安装PowerShell插件后创建了一个管道,跟随PowerShell进行测试:
& "C:\Program Files\Oracle\VirtualBox\vboxmanage.exe" startvm "W2008_21_06_B"
(适用于PS ISE),但在Jenkins工作中失败:
Building on master in workspace C:\Program Files (x86)\Jenkins\workspace\vbox
[vbox] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\windows\TEMP\jenkins7025720492184266246.ps1'"
vboxmanage.exe: error: Could not find a registered machine named 'W2008_21_06_B'
vboxmanage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee IUnknown
vboxmanage.exe: error: Context: "FindMachine(Bstr(pszVM).raw(), machine.asOutParam())" at line 573 of file VBoxManageMisc.cpp
Build step 'Windows PowerShell' marked build as failure
Finished: FAILURE
我错过了哪些技巧?
此致