virtualbox executor on osx: unable to log in via ssh
Summary
I'm trying to run an OSX build machine using virtualbox. The VM starts up, but the executor is unable to log into the machine.
Steps to reproduce
- Installed VirtualBox-5.2.2 on a newly setup MacBook Pro, El-Capitan
- Installed an El-Capitan VM called "el-capitan" inside the machine.
- the VM as two network interfaces
- host-only-adapter (for communication with the host)
- NAT (for communication with the world)
- the VM as two network interfaces
- Enabled ssh-access in the VM, installed some dev-packages and created a
gitlab-ci
snapshot - Installed gitlab-runner 10.2.0 (on the host)
- Registered the gitlab-runner (with a tag "osx"), and manually added some configuration, ending up with the following
.gitlab-runner/config.toml
:
concurrent = 1
check_interval = 0
[[runners]]
name = "elcapitan@vboxhost"
url = "https://git.example.com/"
token = "SUPERSECRETTOKEN"
executor = "virtualbox"
pre_clone_script = "sudo /usr/local/bin/cleanup-builder.sh"
[runners.ssh]
user = "USERNAME"
password = "PASSWORD"
[runners.virtualbox]
base_name = "el-capitan"
base_snapshot = "gitlab-ci"
disable_snapshots = true
[runners.cache]
- Triggered a build on the machine (by re-running a previous job tagged "osx")
Actual behavior
On the host, I can see that a new snapshot is created.
After some time it disappears (disable_snapshots=true
).
In the webinterface I see a few attempts are made, and then gitlab-ci is giving up.
Expected behavior
The executor should be able to log into the VM and run the job.
Being quick, I managed to ssh
into the cloned VM with USERNAME
/PASSWORD
,
so the ssh is definitely setup correctly.
(And yes I'm pretty sure I logged into the right VM, as my ssh-session froze once gitlab-runner
decided to tear down the VM.)
Relevant logs and/or screenshots
Build log:
Running with gitlab-runner 10.2.0 (0a75cdd1)
on elcapitan@vboxhost (d763a8b3)
Using VirtualBox version 5.2.2r119230 executor...
Creating new VM...
ERROR: Preparation failed: dial tcp [::1]:49939: getsockopt: connection refused
Will be retried in 3s ...
Using VirtualBox version 5.2.2r119230 executor...
Creating new VM...
ERROR: Preparation failed: dial tcp [::1]:50063: getsockopt: connection refused
Will be retried in 3s ...
Using VirtualBox version 5.2.2r119230 executor...
Creating new VM...
ERROR: Preparation failed: dial tcp [::1]:50178: getsockopt: connection refused
Will be retried in 3s ...
ERROR: Job failed (system failure): dial tcp [::1]:50178: getsockopt: connection refused
Please paste both build log and Runner's log.
I don't know how to get the Runner's log.
Environment description
this is a custom installation, GitLab omnibus 10.2.4
Used GitLab Runner version
$ gitlab-runner --version
Version: 10.2.0
Git revision: 0a75cdd1
Git branch: 10-2-stable
GO version: go1.8.3
Built: Wed, 22 Nov 2017 09:20:25 +0000
OS/Arch: darwin/amd64