VBoxManage: error: Could not find a registered machine named 'ubuntu-gitlab'
Hello, I've installed a service to be run as my user as follows:
sudo gitlab-runner install -n "gitlab-runner-boss" -u boss
So far so good, I've registered a runner with:
sudo gitlab-runner register
When I run sudo gitlab-runner list I can see the configured runners.
So, I was trying to build a test project using virtualbox runner and I got the following error:
Running with gitlab-ci-multi-runner 9.4.2 (6d06f2e)
on b7eKb8fL-virtualbox (f6dc506a)
Using VirtualBox version 5.1.26r117224 executor...
Creating new VM...
WARNING: Failed to create snapshot Base State from base VM ubuntu-gitlab
ERROR: Preparation failed: VBoxManageOutput error: VBoxManage: error: Could not find a registered machine named 'ubuntu-gitlab'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(pszSrcName).raw(), srcMachine.asOutParam())" at line 432 of file VBoxManageMisc.cpp
Will be retried in 3s ...
To workaround this issue, I have copied the service /etc/systemd/system/gitlab-runner-boss.service to /home/boss/.config/systemd/user/gitlab-runner-boss.service and enabled this with:
systemctl --user enable gitlab-runner-boss.service