I want to setup a jenkins job in order to e.g. clone a virtual image. The (working) command line is e.g.
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonevm UbuntuTest --name TestNeu --register
However, the same command line executed in jenkins as window batch script does not work, it gives an error
VBoxManage.exe: error: Could not find a registered machine named 'UbuntuTest'
VBoxManage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
VBoxManage.exe: error: Context: "FindMachine(Bstr(pszSrcName).raw(), srcMachine.asOutParam())" at line 434 of file VBoxManageMisc.cpp
I only can suppose this jenkins script runs as a different user and does not know of the available images located in C:\Users\alex\VirtualBox VMs
.
How to fix this problem?
Addendum:
- Running this as a different user does not seem to work or is impossible: link