Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant attempted to execute the capability 'configure_networks' on the detect guest OS 'linux', but the guest doesn't support that capability #6

Open
travula opened this issue Sep 20, 2017 · 0 comments

Comments

@travula
Copy link
Member

travula commented Sep 20, 2017

I got this error when trying a boot up a vagrant machine.

==> default: Configuring and enabling network interfaces...
Vagrant attempted to execute the capability 'configure_networks'
on the detect guest OS 'linux', but the guest doesn't
support that capability. This capability is required for your
configuration of Vagrant. Please either reconfigure Vagrant to
avoid this capability or fix the issue by creating the capability.

Refer to stackoverflow post to fix this issue

I did the following steps to resolve this problem

  1. Moved the file
    /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/guests/ubuntu/guest.rb to
    ``/opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/guests/ubuntu/guest.rb.bk`
  2. Copied the below contents
module VagrantPlugins
  module GuestUbuntu
    class Guest < Vagrant.plugin("2", :guest)
      def detect?(machine)
        # This command detects if we are running on Ubuntu. /etc/os-release is
        # available on modern Ubuntu versions, but does not exist on 14.04 and
        # previous versions, so we fall back to lsb_release.
        #
        #   GH-7524
        #   GH-7625
        #
        machine.communicate.test <<-EOH.gsub(/^ {10}/, "")
          if test -r /etc/os-release; then
            source /etc/os-release && test xubuntu = x$ID
          elif test -x /usr/bin/lsb_release; then
            /usr/bin/lsb_release -i 2>/dev/null | grep -q Ubuntu
          else
            exit 1
          fi
        EOH
      end
    end
  end
end

to the file /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/guests/ubuntu/guest.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant