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

Failed on boot at the very first time #2

Closed
ailispaw opened this issue Mar 22, 2015 · 2 comments
Closed

Failed on boot at the very first time #2

ailispaw opened this issue Mar 22, 2015 · 2 comments

Comments

@ailispaw
Copy link
Owner

$ vagrant up
Bringing machine 'rancheros' up with 'virtualbox' provider...
==> rancheros: Box 'ailispaw/rancheros' could not be found. Attempting to find and install...
    rancheros: Box Provider: virtualbox
    rancheros: Box Version: >= 0
==> rancheros: Loading metadata for box 'ailispaw/rancheros'
    rancheros: URL: https://atlas.hashicorp.com/ailispaw/rancheros
==> rancheros: Adding box 'ailispaw/rancheros' (v0.6.2) for provider: virtualbox
    rancheros: Downloading: https://atlas.hashicorp.com/ailispaw/boxes/rancheros/versions/0.6.2/providers/virtualbox.box
==> rancheros: Successfully added box 'ailispaw/rancheros' (v0.6.2) for 'virtualbox'!
==> rancheros: Importing base box 'ailispaw/rancheros'...
==> rancheros: Matching MAC address for NAT networking...
==> rancheros: Checking if box 'ailispaw/rancheros' is up to date...
==> rancheros: Setting the name of the VM: test_rancheros_1427023636630_82586
==> rancheros: Clearing any previously set network interfaces...
==> rancheros: Preparing network interfaces based on configuration...
    rancheros: Adapter 1: nat
    rancheros: Adapter 2: hostonly
==> rancheros: Forwarding ports...
    rancheros: 2375 => 2375 (adapter 1)
    rancheros: 8080 => 8080 (adapter 1)
    rancheros: 22 => 2222 (adapter 1)
==> rancheros: Running 'pre-boot' VM customizations...
==> rancheros: Booting VM...
==> rancheros: Waiting for machine to boot. This may take a few minutes...
    rancheros: SSH address: 127.0.0.1:2222
    rancheros: SSH username: rancher
    rancheros: SSH auth method: private key
    rancheros: Warning: Connection timeout. Retrying...
    rancheros:
    rancheros: Vagrant insecure key detected. Vagrant will automatically replace
    rancheros: this with a newly generated keypair for better security.
    rancheros:
    rancheros: Inserting generated public key within guest...
    rancheros: Removing insecure key from the guest if its present...
    rancheros: Key inserted! Disconnecting and reconnecting using new SSH key...
==> rancheros: Machine booted and ready!
==> rancheros: Setting hostname...
Vagrant attempted to execute the capability 'change_host_name'
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.
@ailispaw
Copy link
Owner Author

I guess that vagrant up can not load vagrant_plugin_guest_rancheros.rb in the box properly at the very first time.

@ailispaw
Copy link
Owner Author

To fix this, put the following into Vagrantfile.

module VagrantPlugins
  module GuestLinux
    class Plugin < Vagrant.plugin("2")
      guest_capability("linux", "change_host_name") do
        Cap::ChangeHostName
      end

      guest_capability("linux", "configure_networks") do
        Cap::ConfigureNetworks
      end
    end
  end
end

ailispaw added a commit that referenced this issue Mar 22, 2015
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