vagrant-landrush / landrush

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

Windows: long delay looking for VirtualBox additions #277

Closed proteansec closed 7 years ago

proteansec commented 7 years ago

I realize the support for Windows is experimental, but this is by far the best DNS plugin for Vagrant that I found, which is why I would like to help. First things first, I have to document the problems I was having with this.

The relevant part of the Vagrantfile:

create a private network

config.vm.network :private_network, ip: "172.28.128.5" config.vm.communicator = "winrm" config.winrm.username = 'vagrant' config.winrm.password = 'vagrant' config.vm.guest = :windows

enable landrush DNS

if Vagrant.has_plugin?("landrush") config.landrush_ip.auto_install = true config.landrush.enabled = true config.landrush.guest_redirect_dns = false config.landrush.host_redirect_dns= false config.landrush.host 'win8x86-enterprise', '172.28.128.5' end

When booting a VM by using vagrant up, I stumbled upon an annoyance, where the command is stuck at BIG DELAY HERE in the output below for a number of minutes; I guess it's looking for VirtualBox Additions, which it doesn't seem to locate - although they are installed.

==> vagrant-win8x86-enterprise: Attempting graceful shutdown of VM... ==> vagrant-win8x86-enterprise: Clearing any previously set forwarded ports... ==> vagrant-win8x86-enterprise: Clearing any previously set network interfaces... ==> vagrant-win8x86-enterprise: [landrush] starting dns server ==> vagrant-win8x86-enterprise: Preparing network interfaces based on configuration... vagrant-win8x86-enterprise: Adapter 1: nat vagrant-win8x86-enterprise: Adapter 2: hostonly ==> vagrant-win8x86-enterprise: Forwarding ports... vagrant-win8x86-enterprise: 3389 (guest) => 3389 (host) (adapter 1) vagrant-win8x86-enterprise: 5985 (guest) => 5985 (host) (adapter 1) vagrant-win8x86-enterprise: 5986 (guest) => 55986 (host) (adapter 1) vagrant-win8x86-enterprise: 22 (guest) => 2222 (host) (adapter 1) ==> vagrant-win8x86-enterprise: Running 'pre-boot' VM customizations... ==> vagrant-win8x86-enterprise: Booting VM... ==> vagrant-win8x86-enterprise: Waiting for machine to boot. This may take a few minutes... vagrant-win8x86-enterprise: WinRM address: 127.0.0.1:5985 vagrant-win8x86-enterprise: WinRM username: vagrant vagrant-win8x86-enterprise: WinRM execution_time_limit: PT2H vagrant-win8x86-enterprise: WinRM transport: negotiate BIG DELAY HERE ==> vagrant-win8x86-enterprise: Machine booted and ready! Sorry, don't know how to check guest version of Virtualbox Guest Additions on this platform. Stopping installation. ==> vagrant-win8x86-enterprise: Checking for guest additions in VM...

There are two issues we need to resolve here:

  1. Is it possible to add an option to landrush, which completely disables the check for VBoxAdditions?
  2. If the check for VBoxAdditions is enabled, why does it need so long to check whether the additions are enabled. Does it have something to do with ssh/winrm communicator and their corresponding timeouts?
proteansec commented 7 years ago

This is due to the winrm and has nothing to do with landrush.