vlead / vlead-onboarding

Other
0 stars 1 forks source link

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 7 years ago

travula commented 7 years ago

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