Vagrant on AppVeyor not working (both on Windows & Ubuntu)

jonashackt's Avatar

jonashackt

22 Nov, 2018 01:17 PM

Hey, according to https://help.appveyor.com/discussions/problems/1247-vagrant-not-wor... Vagrant should work on AppVeyor (with some restrictions if you use the free-tier like 32bit Boxes only).

I created an example project to reproduce a simple setup: https://github.com/jonashackt/vagrant-ansible-on-appveyor

My Windows appveyor.yml looks like:

version: '1.0.{build}-{branch}'
image: Visual Studio 2017

# RDP Debugging
init:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
#on_finish:
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

cache:
- C:\ProgramData\chocolatey\lib
- C:\Vagrant
- C:\Users\appveyor\.vagrant.d

install:
# Disable Hyper-V
- dism.exe /Online /Disable-Feature:Microsoft-Hyper-V /Quiet
- ps: mkdir C:\Users\appveyor\.vagrant.d | Out-Null
  # Disable chocolatey´s verbose download output
- choco feature disable --name showDownloadProgress
- choco install virtualbox --yes
- ps: Start-FileDownload "https://releases.hashicorp.com/vagrant/2.2.1/vagrant_2.2.1_x86_64.msi"
- ps: Start-Process -FilePath "msiexec.exe" -ArgumentList "/a vagrant_2.2.1_x86_64.msi /qb TARGETDIR=C:\Vagrant" -Wait
- set PATH=C:\Vagrant\HashiCorp\Vagrant\bin;C:\VBox;%PATH%
# Vagrant correctly installed?
- vagrant --version
- ssh -V
- ipconfig /all

build_script:
- ps: Test-NetConnection google.com -Port 80
- vagrant up --debug
- vagrant ssh -c "echo 'hello world!'"

RDPing into the worker shows me, that all the installation works fine (Virtualbox, Vagrant, ...) but the Vagrant Box crashes with a kernel panic while booting.

My Ubuntu appveyor.yml looks like this:

version: '1.0.{build}-{branch}'
image: Ubuntu1804
platform: x64

# Debugging via SSH
init:
- sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -

cache:
- /home/appveyor/.vagrant.d/boxes

install:
- sudo wget https://download.virtualbox.org/virtualbox/5.2.22/virtualbox-5.2_5.2.22-126460~Ubuntu~bionic_amd64.deb
- sudo dpkg -i virtualbox-5.2_5.2.22-126460~Ubuntu~bionic_amd64.deb
- sudo apt-get -yq install python-pip
# How did the VirtualBox installation go?
- VBoxManage --version
- sudo pip install ansible
# Ansible correctly installed?
- ansible --version
# we have to download Vagrant in the install step (not init), because otherwise we´ll run into errors like
# fatal: destination path '/home/appveyor/projects/vagrant-ansible-on-appveyor' already exists and is not an empty directory.
# see https://help.appveyor.com/discussions/problems/2367-git-clone-fails-non-empty-dir
- sudo wget -nv https://releases.hashicorp.com/vagrant/2.2.1/vagrant_2.2.1_x86_64.deb
# Install Vagrant package
- sudo dpkg -i vagrant_2.2.1_x86_64.deb
# Vagrant correctly installed?
- vagrant --version

build_script:
- vagrant up
- vagrant ssh -c "echo 'hello world!'"

The Ubuntu version seems to go a step ahead and prints this at the end of the ~/VirtualBox VMs/ubuntu/Logs/VBox.log :

00:00:00.259909 Physical Core Count:             1
00:00:00.259913 
00:00:00.259914 ******************** End of CPUID dump **********************
00:00:00.274624 PcBios: SATA LUN#0 LCHS=1024/255/63
00:00:00.274648 APIC: fPostedIntrsEnabled=false fVirtApicRegsEnabled=false fSupportsTscDeadline=false
00:00:00.274657 TMR3UtcNow: nsNow=1 542 816 026 895 553 000 nsPrev=0 -> cNsDelta=1 542 816 026 895 553 000 (offLag=0 offVirtualSync=0 offVirtualSyncGivenUp=0, NowAgain=1 542 816 026 895 554 000)
00:00:00.274681 VMEmt: Halt method global1 (5)
00:00:00.274688 VMEmt: HaltedGlobal1 config: cNsSpinBlockThresholdCfg=2000
00:00:00.274693 Changing the VM state from 'CREATING' to 'CREATED'
00:00:00.277005 Changing the VM state from 'CREATED' to 'POWERING_ON'
00:00:00.277257 Changing the VM state from 'POWERING_ON' to 'RUNNING'
00:00:00.277267 Console: Machine state changed to 'Running'
00:00:00.281612 VMMDev: Guest Log: BIOS: VirtualBox 5.2.22
00:00:00.281847 PCI: setting up resources and interrupts
00:00:00.282270 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:00.294265 VMMDev: Guest Log: CPUID EDX: 0x078bf3ff
00:00:00.297294 AHCI#0: Reset the HBA
00:00:00.297311 VD#0: Cancelling all active requests
00:00:00.297965 AHCI#0: Port 0 reset
00:00:00.298005 VD#0: Cancelling all active requests
00:00:00.299577 VMMDev: Guest Log: BIOS: AHCI 0-P#0: PCHS=16383/16/63 LCHS=1024/255/63 0x0000000005000000 sectors
00:00:00.301688 PIT: mode=2 count=0x48d3 (18643) - 64.00 Hz (ch=0)
00:00:00.305478 Display::handleDisplayResize: uScreenId=0 pvVRAM=00007fb164032000 w=640 h=480 bpp=32 cbLine=0xA00 flags=0x0
00:00:00.859685 NAT: Old socket recv size: 128KB
00:00:00.859711 NAT: Old socket send size: 128KB
00:00:02.773231 Display::handleDisplayResize: uScreenId=0 pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0 flags=0x0
00:00:02.774471 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:02.774737 VMMDev: Guest Log: BIOS: Boot : bseqnr=1, bootseq=0002
00:00:02.775511 VMMDev: Guest Log: BIOS: Booting from Hard Disk...
00:00:09.499490 PIT: mode=2 count=0x12a5 (4773) - 249.98 Hz (ch=0)
00:00:09.576961 PATM: Disable block at c10127b0 - write c10127e1-c10127e5
00:00:09.577106 PATM: Disable block at c10129a0 - write c1012a3c-c1012a3d
00:00:11.392679 PATM: Disable block at c1675a3c - write c1675399-c167539a
00:00:11.392729 PATM: Disabling IDT 0 patch handler c1675a3c
00:00:11.392735 PATM: Disable block at c16759d4 - write c1675399-c167539a
00:00:11.392738 PATM: Disabling IDT 4 patch handler c16759d4
00:00:11.392743 PATM: Disable block at c16759e4 - write c1675399-c167539a
00:00:11.392745 PATM: Disabling IDT 5 patch handler c16759e4
00:00:11.392750 PATM: Disable block at c16759f4 - write c1675399-c167539a
00:00:11.392800 PATM: Disabling IDT 6 patch handler c16759f4
00:00:11.392806 PATM: Disable block at c16759bc - write c1675399-c167539a
00:00:11.392810 PATM: Disabling IDT 7 patch handler c16759bc
00:00:11.392816 PATM: Disable block at c1675a00 - write c1675399-c167539a
00:00:11.392820 PATM: Disabling IDT 9 patch handler c1675a00
00:00:11.392826 PATM: Disable block at c1675a0c - write c1675399-c167539a
00:00:11.392830 PATM: Disabling IDT a patch handler c1675a0c
00:00:11.392834 PATM: Disable block at c1675a18 - write c1675399-c167539a
00:00:11.392838 PATM: Disabling IDT b patch handler c1675a18
00:00:11.392842 PATM: Disable block at c1675a24 - write c1675399-c167539a
00:00:11.392845 PATM: Disabling IDT c patch handler c1675a24
00:00:11.392849 PATM: Disable block at c1675cb0 - write c1675399-c167539a
00:00:11.392852 PATM: Disabling IDT d patch handler c1675cb0
00:00:11.392856 PATM: Disable block at c1675a70 - write c1675399-c167539a
00:00:11.392859 PATM: Disabling IDT e patch handler c1675a70
00:00:11.392863 PATM: Disable block at c1675a58 - write c1675399-c167539a
00:00:11.392866 PATM: Disabling IDT f patch handler c1675a58
00:00:11.392871 PATM: Disable block at c167599c - write c1675399-c167539a
00:00:11.392874 PATM: Disabling IDT 10 patch handler c167599c
00:00:11.392880 PATM: Disable block at c1675a30 - write c1675399-c167539a
00:00:11.392883 PATM: Disabling IDT 11 patch handler c1675a30
00:00:11.392888 PATM: Disable block at c1675a48 - write c1675399-c167539a
00:00:11.392891 PATM: Disabling IDT 12 patch handler c1675a48
00:00:11.392895 PATM: Disable block at c16759ac - write c1675399-c167539a
00:00:11.392898 PATM: Disabling IDT 13 patch handler c16759ac
00:00:12.172903 PIT: mode=0 count=0x10000 (65536) - 18.20 Hz (ch=0)

The vagrant up command simply times out then. Any ideas on what changed to the seemingly working solution back described in https://help.appveyor.com/discussions/problems/1247-vagrant-not-wor... with https://ci.appveyor.com/project/AndrewPashkin/vagrant-appveyor-test...?

  1. Support Staff 1 Posted by Owen McDonnell on 23 Nov, 2018 01:39 AM

    Owen McDonnell's Avatar

    Unfortunately, after over several hours playing with a fork of this i have nothing to offer but a handful of links. Seems like a very common and mysterious problem.

    Definitely beyond my grasp/patience.... (or at least for today).

    https://github.com/hashicorp/vagrant/issues/5186#issuecomment-31234...
    https://github.com/hashicorp/vagrant/issues/7673
    https://github.com/hashicorp/vagrant/issues/7648#issuecomment-31816...
    http://docs.drupalvm.com/en/latest/getting-started/installation-win...
    https://github.com/hashicorp/vagrant/issues/8668

  2. 2 Posted by jonashackt on 23 Nov, 2018 02:28 PM

    jonashackt's Avatar

    Hi Owen, thank you very much for your time. Maybe you´re right and it´s a NAT connection problem... also thought about that. I used the hint described in https://github.com/hashicorp/vagrant/issues/7648 and added vb.customize ['modifyvm', :id, '--cableconnected1', 'on'] to my Vagrantfile.

    Let´s see how it goes: https://ci.appveyor.com/project/jonashackt/vagrant-ansible-on-appve...

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac