vagrant-landrush / landrush

A Vagrant plugin that provides a simple DNS server for Vagrant guests
MIT License
666 stars 78 forks source link

Example shown in README results in error #261

Closed mint-jar closed 5 years ago

mint-jar commented 7 years ago

Hi,

I tested this plugin with your example in the README. This gave me the following error:

Vagrant attempted to execute the capability 'iptables_installed'
on the detect guest OS 'linux', but the guest doesn't
support that capability. This capability is required for your

If I replace the box 'hashicorp/precise64' with 'ubuntu/trusty64' everything works smoothly.

Host: Ubuntu Mate 16.04 Virtualbox: Version 5.0.20 r106931

hferentschik commented 7 years ago

Hmm, thanks for the bug report. I will double check. Maybe we just need to update the README. Also I want to understand why the example does not work.

hferentschik commented 7 years ago

Hmm, I just tried:

Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/precise64"

  config.landrush.enabled = true

  config.vm.hostname = "myhost.vagrant.test"

  config.landrush.host 'static1.example.com', '1.2.3.4'
  config.landrush.host 'static2.example.com', '2.3.4.5'
end

And got:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'hashicorp/precise64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> default: Setting the name of the VM: precise64_default_1474294461619_79635
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: When using virtualbox, a non-NAT network interface is required.
==> default: Adding a private network using DHCP
==> default: [landrush] starting dns server
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 => 2200 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2200
    default: SSH username: vagrant
    default: SSH auth method: private key
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 4.2.0
    default: VirtualBox Version: 5.0
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Landrush IP not installed in guest yet (or it's an outdated version).     Installing now.
==> default: [landrush] setting up machine's DNS to point to our server
==> default: [landrush] network: :forwarded_port, {:guest=>22, :host=>2200,     :host_ip=>"127.0.0.1", :id=>"ssh", :auto_correct=>true, :protocol=>"tcp"}
==> default: [landrush] network: :private_network, {:type=>:dhcp, :protocol=>"tcp",     :id=>"13e1969f-406e-4696-82ea-9b0589ee35f3"}
[landrush] Using eth1 (172.28.128.4)
==> default: [landrush] adding machine entry: myhost.vagrant.test => 172.28.128.4
==> default: [landrush] adding static DNS entry: static1.example.com => 1.2.3.4
==> default: [landrush] adding static reverse DNS entry: 4.3.2.1.in-addr.arpa =>     1.2.3.4
==> default: [landrush] adding static DNS entry: static2.example.com => 2.3.4.5
==> default: [landrush] adding static reverse DNS entry: 5.4.3.2.in-addr.arpa =>     2.3.4.5
[landrush] Using eth1 (172.28.128.4)
[landrush] Host DNS resolver config looks good.
==> default: Mounting shared folders...
    default: /vagrant => /Users/hardy/work/vagrant/precise64    

Everything seems to work. Which version of the Landrush plugin are you using (vagrant plugin list)

mint-jar commented 7 years ago

Testing your config now. My plugin list is as follows:

landrush (1.1.2)
vagrant-share (1.1.5, system)
mint-jar commented 7 years ago

Still got the same error:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'hashicorp/precise64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> default: Setting the name of the VM: test-vagrant-2_default_1474305265888_22560
==> default: Clearing any previously set network interfaces...
==> default: [landrush] virtualbox requires an additional private network; adding it
==> default: [landrush] starting dns server
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
Vagrant attempted to execute the capability 'iptables_installed'
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.

Box (vagrant box list): hashicorp/precise64 (virtualbox, 1.1.0)

hferentschik commented 7 years ago

What's your Vagrant version?

mint-jar commented 7 years ago

1.8.5. Latest according to Vagrant. Do you have any plugins that install guest additions for virtual box?

hferentschik commented 5 years ago

Merged via pull request #330