With Windows 7 host VirtualBox executor could not find registered machine
Summary
When attempting to build a Hello World test project on a locally hosted instance of GitLab, the runner is unable to find the specified VirtualBox executor VM. See below for more system details.
Steps to reproduce
- Make a commit to the GitHub repsoitory, or directly to the GitLab repsitory (a GitHub mirror) to start a build
... or...
- In the GitLab repositoy, press the build "Retry" button
Actual behavior
The following warnings and errors occur:
Running with gitlab-runner 10.1.0 (c1ecf97f) on test (90411829) Using VirtualBox version 5.2.0r118431 executor... Creating new VM... WARNING: Snapshot base not found in base VM test ERROR: Preparation failed: VBoxManageOutput error: vboxmanage.exe: error: Could not find a registered machine named 'test' vboxmanage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee IUnknown vboxmanage.exe: error: Context: "FindMachine(Bstr(pszSrcName).raw(), srcMachine.asOutParam())" at line 433 of file VBoxManageMisc.cpp Will be retried in 3s ... Using VirtualBox version 5.2.0r118431 executor... Creating new VM... WARNING: Snapshot base not found in base VM test ERROR: Preparation failed: VBoxManageOutput error: vboxmanage.exe: error: Could not find a registered machine named 'test' vboxmanage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee IUnknown vboxmanage.exe: error: Context: "FindMachine(Bstr(pszSrcName).raw(), srcMachine.asOutParam())" at line 433 of file VBoxManageMisc.cpp Will be retried in 3s ... Using VirtualBox version 5.2.0r118431 executor... Creating new VM... WARNING: Snapshot base not found in base VM test ERROR: Preparation failed: VBoxManageOutput error: vboxmanage.exe: error: Could not find a registered machine named 'test' vboxmanage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee IUnknown vboxmanage.exe: error: Context: "FindMachine(Bstr(pszSrcName).raw(), srcMachine.asOutParam())" at line 433 of file VBoxManageMisc.cpp Will be retried in 3s ... ERROR: Job failed (system failure): VBoxManageOutput error: vboxmanage.exe: error: Could not find a registered machine named 'test' vboxmanage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee IUnknown vboxmanage.exe: error: Context: "FindMachine(Bstr(pszSrcName).raw(), srcMachine.asOutParam())" at line 433 of file VBoxManageMisc.cpp
Expected behavior
Success! :)
Relevant logs and/or screenshots
Running WinSCP verifies that the VirtualBox VM is accessible from the Windows 7 operating system. File Protocol = SFTP Host name = 192.168.56.101 Port name = 22 User name = user Password = password
The contents of config.toml are as follows: concurrent = 1 check_interval = 0 log_level = "debug"
[[runners]] name = "test" url = "http://10.40.7.19/" token = "904118292327982c7e0d8f997a3ab6" executor = "virtualbox" [runners.virtualbox] base_name = "test" disable_snapshots = true [runners.ssh] host = "192.168.56.101" port = "22" user = "user" password = "password" identity_file = "" [runners.cache]
Running vboxmanage.exe manually works as expected. A number of examples are below.
C:\Program Files\Oracle\VirtualBox>vboxmanage list vms "test" {3e0396ed-ee6b-43b6-b6c8-b009fb5218f7}
C:\Program Files\Oracle\VirtualBox>vboxmanage showvminfo test Name: test Groups: / Guest OS: Ubuntu (64-bit) UUID: 3e0396ed-ee6b-43b6-b6c8-b009fb5218f7 Config file: C:\Users\eweaver\VirtualBox VMs\test\test.vbox Snapshot folder: C:\Users\eweaver\VirtualBox VMs\test\Snapshots Log folder: C:\Users\eweaver\VirtualBox VMs\test\Logs Hardware UUID: 3e0396ed-ee6b-43b6-b6c8-b009fb5218f7 Memory size: 1024MB Page Fusion: off VRAM size: 16MB CPU exec cap: 100% HPET: off Chipset: piix3 Firmware: BIOS Number of CPUs: 1 PAE: off Long Mode: on Triple Fault Reset: off APIC: on X2APIC: on CPUID Portability Level: 0 CPUID overrides: None Boot menu mode: message and menu Boot Device (1): Floppy Boot Device (2): DVD Boot Device (3): HardDisk Boot Device (4): Not Assigned ACPI: on IOAPIC: on BIOS APIC mode: APIC Time offset: 0ms RTC: UTC Hardw. virt.ext: on Nested Paging: on Large Pages: on VT-x VPID: on VT-x unr. exec.: on Paravirt. Provider: Default Effective Paravirt. Provider: KVM State: running (since 2017-11-01T16:14:46.370000000) Monitor count: 1 3D Acceleration: off 2D Video Acceleration: off Teleporter Enabled: off Teleporter Port: 0 Teleporter Address: Teleporter Password: Tracing Enabled: off Allow Tracing to Access VM: off Tracing Configuration: Autostart Enabled: off Autostart Delay: 0 Default Frontend: Storage Controller Name (0): IDE Storage Controller Type (0): PIIX4 Storage Controller Instance Number (0): 0 Storage Controller Max Port Count (0): 2 Storage Controller Port Count (0): 2 Storage Controller Bootable (0): on Storage Controller Name (1): SATA Storage Controller Type (1): IntelAhci Storage Controller Instance Number (1): 0 Storage Controller Max Port Count (1): 30 Storage Controller Port Count (1): 1 Storage Controller Bootable (1): on IDE (1, 0): Empty SATA (0, 0): C:\Users\eweaver\VirtualBox VMs\test\Snapshots{f9f73eb9-935a-44fc- abee-ae42530be2c2}.vdi (UUID: f9f73eb9-935a-44fc-abee-ae42530be2c2) NIC 1: MAC: 080027EB31EE, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Prom isc Policy: deny, Bandwidth group: none NIC 1 Settings: MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, re ceive: 64) NIC 2: MAC: 080027FE84DC, Attachment: Host-only Interface 'VirtualBox Host-Only Ethernet Adapter', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: allow-all, B andwidth group: none NIC 3: disabled NIC 4: disabled NIC 5: disabled NIC 6: disabled NIC 7: disabled NIC 8: disabled Pointing Device: USB Tablet Keyboard Device: PS/2 Keyboard UART 1: disabled UART 2: disabled UART 3: disabled UART 4: disabled LPT 1: disabled LPT 2: disabled Audio: enabled (Driver: DSOUND, Controller: AC97, Codec: AD1980) Audio playback: disabled Audio capture: enabled Clipboard Mode: disabled Drag and drop Mode: disabled Session name: GUI/Qt Video mode: 1016x817x32 at 0,0 enabled VRDE: disabled USB: enabled EHCI: disabled XHCI: disabled
USB Device Filters:
Available remote USB devices:
Currently Attached USB Devices:
Bandwidth groups:
Shared folders:
VRDE Connection: not active Clients so far: 0
Capturing: not active Capture screens: 0 Capture file: C:\Users\eweaver\VirtualBox VMs\test\test.webm Capture dimensions: 1024x768 Capture rate: 512 kbps Capture FPS: 25 Capture options: ac_enabled=false
Guest:
Configured memory balloon size: 0 MB OS type: Linux26_64 Additions run level: 1 Additions version: 5.0.18_Ubuntu r106667
Guest Facilities:
Facility "VirtualBox Base Driver": active/running (last update: 2017/11/01 16:15 :02 UTC) Facility "Seamless Mode": not active (last update: 2017/11/01 16:15:02 UTC) Facility "Graphics Mode": active/running (last update: 2017/11/01 16:15:02 UTC)
Snapshots:
Name: Base (UUID: 3c0d4194-2155-4783-b998-c273e7d3fa16) *
C:\Program Files\Oracle\VirtualBox>vboxmanage clonevm test --mode machine --name testClone --register 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Machine has been successfully cloned as "testClone"
Environment description
The metal is a Dell Precision Tower 7910 with Windows 7.
This tower has a VMWare Ubuntu 14.04 VM which is hosting GitLab. This GitLab repository is a mirror of an existing public GitHub.com repository. The goal is to us GitLab's CI capability, and provide feedback to GitHub for merge request go / no go.
The tower also has VirtualBox (version 5.2.0r118431 to act as executor) with an Ubuntu 14.04 VM for the runner to act on.
Finally, the tower has gitlab-runner, version 10.1.0 (c1ecf97f) on test (90411829)
Used GitLab Runner version
C:\GitLab-Runner>gitlab-runner --version Version: 10.1.0 Git revision: c1ecf97f Git branch: 10-1-stable GO version: go1.8.3 Built: Sat, 21 Oct 2017 21:33:18 +0000 OS/Arch: windows/amd64