Skip to content
Robert Schulze edited this page Jan 16, 2018 · 4 revisions

Running vagrant dns --help might leave one a bit confused on what command/parameter has which side effects:

Overview of which argument triggers what

Name Build Config Manage Installation Manage Service
--install yes create no
--uninstall no remove stop
--purge no remove stop
--start yes no start
--stop no (*) no stop
--restart yes no stop + start
--status (**) no no check status
--list (**) no no no

*) Before v2.1.0 --stop also rebuilt config
**) Available since v2.1.0

Build Config

This step does not require superuser access.

Updates (add) the current vagrant projects dns pattern config into the vagrant-dns registry.
Creates the resolver files, but does not link them.

Manage Installation

This step requires superuser access.

Create (or remove) a system configuration which registers the vagrant-dns service as DNS.

On macOS, this means linking the resolver files to /etc/resolver/.

Uninstall vs. Purge

Uninstall removes the system configuration which registers the vagrant-dns service as DNS. But keeps all other configuration.

On macOS, this means removing the links in /etc/resolver/ .

Purge, additionally removes all configuration.

Running order

When running a vangrant dns command, things run this order:

  1. Build Config
  2. Manage Service
  3. Manage Installation
  4. Show Config (only if --list added)