vagrantslackware

Vagrant network configuration with Slackware box


I tried to configure a private network with Slackware boxes but I did get into trouble. I get the same error with a box (ricardson/slackware64-14.1-minimal) from the Atlas catalog and with a box I created from scratch. I am using Vagrant 1.7.4 and VirtualBox 4.2.24.

The error message is the following:

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.

This error occurs when adding a vm.network with "private_network" attribute. Port forwarding does not cause any problem.

I haven't find the reason of this problem yet but it seems clear that is it related to the box itself. Slackware seems to be missing something. I can switch to another box but I would be very interested to understand that issue. Any help would be appreciated.


Solution

  • I sent a message on the support mailing-list of Vagrant project and did receive a quick answer from Alvaro Miranda Aguilera: https://groups.google.com/forum/#!topic/vagrant-up/hZ9BIX0n3xI

    To summarize he proposes a workaround that consists of:

    1. setting the auto_config attribute to false when configuring private_network (config.vm.network "private_network", type: "dhcp", auto_config: false)

    2. Configuring the network in the provisioner (config.vm .provision "shell", run: "always", inline: "/sbin/dhcpcd eth1")

    I tested this solution with my own Slackware box with success.

    Alvaro also added further information in his post to help to figure out what's wrong with the standard way of configuring the network on Slackware.