Skip to main content

Configuring Box Settings

1. Setting Box Name (config.vm.box)

Property Value Description
config.vm.box "ubuntu/focal64" Name of the Vagrant box to use

Example: Setting Box Name

config.vm.box = "ubuntu/focal64"

2. Specifying Box Version (config.vm.box_version)

Property Value Description
config.vm.box_version "20.04.0" Version of the Vagrant box to use

Example: Specifying Box Version

config.vm.box_version = "20.04.0"

3. Setting Box URL (config.vm.box_url)

Property Value Description
config.vm.box_url "https://example.com/ubuntu.box" URL to download the Vagrant box from

Example: Setting Box URL

config.vm.box_url = "https://example.com/ubuntu.box"

4. Configuring Box Check Updates (config.vm.box_check_update)

Property Value Description
config.vm.box_check_update true Whether to check for updates when starting the box

Example: Configuring Box Check Updates

config.vm.box_check_update = true

5. Setting Box Download Checksum (config.vm.box_download_checksum)

Property Value Description
config.vm.box_download_checksum "sha256:abc123..." Checksum to verify the downloaded box file

Example: Setting Box Download Checksum

config.vm.box_download_checksum = "sha256:abc123..."

6. Configuring Download Insecure (config.vm.box_download_insecure)

Property Value Description
config.vm.box_download_insecure true Allow insecure (non-HTTPS) downloads

Example: Configuring Download Insecure

config.vm.box_download_insecure = true

7. Setting Download Client Certificate (config.vm.box_download_client_cert)

Property Value Description
config.vm.box_download_client_cert "/path/to/client.crt" Path to the client certificate for secure downloads

Example: Setting Download Client Certificate

config.vm.box_download_client_cert = "/path/to/client.crt"

8. Using Private Box Repositories

Using Private Box Repositories

  • Private repositories can be configured using custom box sources
  • Requires authentication credentials for access
  • Boxes can be stored in private cloud or local repositories

9. Configuring Box Download Options

Box Download Options

  • config.vm.box_download_checksum: Verify checksum of downloaded box
  • config.vm.box_download_insecure: Allow insecure downloads (HTTP)
  • config.vm.box_download_client_cert: Use client certificate for secure downloads

10. Setting Box Architecture

Property Value Description
config.vm.arch "x86_64" Architecture of the Vagrant box to use

Example: Setting Box Architecture

config.vm.arch = "x86_64"

Was this article helpful?