BerlinVagrant / vagrant-dns

A plugin to manage DNS records for vagrant environments
MIT License
490 stars 50 forks source link

VM powers off and is removed during "vagrant up" for multimachine configuration when vagrant-dns is installed #47

Closed revprez closed 7 years ago

revprez commented 7 years ago

Issue

When attempting to execute vagrant up, guest VM suddenly powers off and disappears. After some investigation, determined this occurs when vagrant-dns is installed. I've prepared a sample Vagrantfile to illustrate the issue.

System

  1. Ubuntu 16.10
  2. nfs-kernel-server, nfs-common, and rpcbind are installed
  3. Virtualbox 5.1.6
  4. Vagrant 1.8.6
  5. Plugins
    vagrant plugin install \
        inifile \
        vagrant-aws \
        vagrant-bindfs \
        vagrant-dns \
        vagrant-vbguest \
        vagrant-s3auth \
        net-ping
  6. Also employing vagrant-bindfs (though error proceeds its invocation)
  7. Using centos/7 box.

Vagrantfile

VAGRANTFILE_API_VERSION = '2'

hostname = 'bug-02.correlate.dev'

Vagrant.configure VAGRANTFILE_API_VERSION do | config |

      config.vm.define hostname do | server |

            server.vm.box = 'centos/7'
            server.vm.hostname = hostname
            server.vm.network :private_network, type: "dhcp"

            server.vm.provider 'virtualbox' do | vb, override |
                  vb.name = hostname
            end
      end

end

Relevant output

Guest VM disappears from Virtualbox list approximate when VAGRANT_LOG=info vagrant up reaches this point of execution:

# Restart network
service network restart
 (sudo=true)
 INFO ssh: SSH connection unexpected closed. Assuming reboot or something.
 INFO warden: Calling OUT action: #<Vagrant::Action::Builtin::SetHostname:0x00000002a8c490>
 INFO warden: Calling OUT action: #<VagrantPlugins::ProviderVirtualBox::Action::ForwardPorts:0x00000002a8c4b8>
 INFO warden: Calling OUT action: #<VagrantPlugins::ProviderVirtualBox::Action::NetworkFixIPv6:0x0000000175c898>
 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "showvminfo", "efd4a325-70aa-455d-b15b-5762d60ba8e9", "--machinereadable"]
 INFO subprocess: Command not in installer, restoring original environment...
 INFO interface: info: Configuring and enabling network interfaces...
 INFO interface: info: ==> nfs-bug.correlate.dev: Configuring and enabling network interfaces...
==> nfs-bug.correlate.dev: Configuring and enabling network interfaces...
 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "showvminfo", "efd4a325-70aa-455d-b15b-5762d60ba8e9", "--machinereadable"]
 INFO subprocess: Command not in installer, restoring original environment...
 INFO ssh: SSH not up: #<Vagrant::Errors::SSHNotReady: The provider for this Vagrant-managed machine is reporting that it
is not yet ready for SSH. Depending on your provider this can carry
different meanings. Make sure your machine is created and running and
try again. Additionally, check the output of `vagrant status` to verify
that the machine is in the state that you expect. If you continue to
get this error message, please view the documentation for the provider
you're using.>
ERROR warden: Error occurred: Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.

Continues to fail with each recovery attempt, clearly because there's no guest around with which to communicate.

fnordfish commented 7 years ago

Hi, sorry to cur you short, but vagrant-dns supports macOS host systems only. Please see Platform Support for more information.

However, it's all a bit weird. Vagrant-dns uses the VM's config object to read it's networking information (which should not execute ssh commands). Besides reading it, we don't interfere with the VM's network at all.

Which leaves me nothing but assume some kind of incompatibility with any other plugin and non-macOS host systems.

revprez commented 7 years ago

Thanks for the update. Missed that.