vagrant up not working, it requires a manual fsck

Created on 14 Sep 2018  ยท  5Comments  ยท  Source: hashicorp/vagrant

Vagrant version

2.0.0

Host operating system

Ubuntu 18.04

Guest operating system

Ubuntu (I've forgot the version, how to discover it?)

VM

VirtualBox 5.2.18 r124319 (Qt5.9.5)

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

require 'json'
require 'yaml'

VAGRANTFILE_API_VERSION ||= "2"
confDir = $confDir ||= File.expand_path(File.dirname(__FILE__))

homesteadYamlPath = confDir + "/Homestead.yaml"
homesteadJsonPath = confDir + "/Homestead.json"
afterScriptPath = confDir + "/after.sh"
aliasesPath = confDir + "/aliases"

require File.expand_path(File.dirname(__FILE__) + '/scripts/homestead.rb')

Vagrant.require_version '>= 1.9.0'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

    # config.vm.network "forwarded_port", guest: 22, host: 2222, host_ip: "127.0.0.1", id: 'ssh' 

    # config.vm.provider 'virtualbox' do |vb|
    #     vb.customize ['modifyvm', :id, '--cableconnected1', 'on']
    # end

    config.vm.provider "virtualbox" do |vb|
       vb.gui = true
    end

    if File.exist? aliasesPath then
        config.vm.provision "file", source: aliasesPath, destination: "/tmp/bash_aliases"
        config.vm.provision "shell" do |s|
            s.inline = "awk '{ sub(\"\r$\", \"\"); print }' /tmp/bash_aliases > /home/vagrant/.bash_aliases"
        end
    end

    if File.exist? homesteadYamlPath then
        settings = YAML::load(File.read(homesteadYamlPath))
    elsif File.exist? homesteadJsonPath then
        settings = JSON.parse(File.read(homesteadJsonPath))
    else
        abort "Homestead settings file not found in #{confDir}"
    end

    Homestead.configure(config, settings)

    if File.exist? afterScriptPath then
        config.vm.provision "shell", path: afterScriptPath, privileged: false
    end

    if defined? VagrantPlugins::HostsUpdater
        config.hostsupdater.aliases = settings['sites'].map { |site| site['map'] }
    end
end

Debug output

https://gist.github.com/cawecoy/af191ba29a9bb28b0d493aaea0f020e2

Expected behavior

vagrant up working

Actual behavior

vagrant up gets stuck in SSH auth method: private key output

Steps to reproduce

I don't know because it's happened suddenly to me.

Additional info

I run vagrant up with GUI enabled and then Ubuntu has started in a GUI showing me
this and after I select "Ubuntu" it shows
this.

So how to procceed from here? Doing a manual fsck? How?

waiting-reply

Most helpful comment

I've solved the issue. Here is how:

  • vagrant up with GUI enabled
  • As soon as GUI open, keep pressing Right Shift, select "Advanced Options for Ubuntu" and then select "Ubuntu in Recovery mode"
  • After "/dev/mapper/vagrant--vg-root: UNEXPECTED INCONSISTENCY" appears, run fsck /dev/mapper/vagrant--vg-root pressing Enter everytime the proccess ask to fix an issue
  • vagrant upagain with GUI disabled, problem solved

All 5 comments

@cawecoy - Have you tried upgrading your version of Vagrant to the latest version?

Also, from what you are describing, it sounds like it might be an issue with your box, which is homestead-7:

 INFO interface: info: Bringing machine 'homestead-7' up with 'virtualbox' provider...

If it isn't fixed after upgrading, I recommend opening an issue with the homestead project instead.

I've solved the issue. Here is how:

  • vagrant up with GUI enabled
  • As soon as GUI open, keep pressing Right Shift, select "Advanced Options for Ubuntu" and then select "Ubuntu in Recovery mode"
  • After "/dev/mapper/vagrant--vg-root: UNEXPECTED INCONSISTENCY" appears, run fsck /dev/mapper/vagrant--vg-root pressing Enter everytime the proccess ask to fix an issue
  • vagrant upagain with GUI disabled, problem solved

Solution worked perfectly for me.

  • vagrant up with GUI enabled
  • As soon as GUI open, keep pressing Right Shift, select "Advanced Options for Ubuntu" and then select "Ubuntu in Recovery mode"
  • After "/dev/mapper/vagrant--vg-root: UNEXPECTED INCONSISTENCY" appears, run fsck /dev/mapper/vagrant--vg-root pressing Enter everytime the proccess ask to fix an issue
  • vagrant upagain with GUI disabled, problem solved

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Cbeck527 picture Cbeck527  ยท  3Comments

tomhking picture tomhking  ยท  3Comments

gwagner picture gwagner  ยท  3Comments

OtezVikentiy picture OtezVikentiy  ยท  3Comments

dorinlazar picture dorinlazar  ยท  3Comments