Table of contents
1.
Introduction
2.
Attributes
3.
Predicting Box name
4.
Frequently Asked Questions
4.1.
What is Kitchen converge in Chef?
4.2.
What is the use of the box attribute?
4.3.
What is the use of the network attribute?
5.
Conclusion
Last Updated: Aug 13, 2025

About kitchen-vagrant Driver

Author Nagendra
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

In a sandboxed directory, the Kitchen-Vagrant driver creates a single Vagrantfile for each instance of Kitchen. Test Kitchen's default driver is the kitchen-vagrant driver, which is compatible with VMware Fusion and VirtualBox and requires Vagrant 1.1.0 or later.

This article explains the details of the kitchen-vagrant driver along with the details of its attributes and their uses, and details of predicting box names.

Without further ado, let's get started with its attributes. 

Attributes

To set up kitchen-vagrant for Chef, utilise the following attributes:

  • box 
    It is used to provide the computer that will host Vagrant. Default value: derived from the instance's platform name.
     
  • box_check_update 
    It is used to look for updates to the box. The default value is false.
     
  • box_url 
    It is used to specify where the configured box is located on the Internet. When the Vagrant provider is based on VMware or VirtualBox, the default value is calculated from the instance's platform name.
     
  • communicator 
    It is used to modify Vagrant's config.vm.communicator option. For instance, Vagrant won't be able to boot without a special Vagrant file if the base box runs Windows but doesn't have SSH installed and configured. Standard setting: nil (assumes SSH is available).
     
  • customize 
    A hash of key-value pairs that specify the Vagrant virtual machine adjustments that need to be made. For instance: memory: 1024 cpuexecutioncap: 50; customise.
     
  • guest 
    It is used to specify the default Vagrantfile's config.vm.guest setting.
     
  • gui 
    It is used to make the specified platform's graphical user interface available. Only when the Vagrant provider is based on VirtualBox or VMware, is this supplied to the config.vm.provider parameter.
     
  • network 
    It is used to define a variety of network adjustments that should be made to the virtual machine. Standard setting: []. For instance, network: - ["forwarded_port", {guest: 80, host: 8080}] - ["private_network", {ip: "192.168.33.33"}].
     
  • pre_create_command 
    Immediately before vagrant up —no-provisioner, use to execute a command.
     
  • provider 
    It is used to define the provider for Vagrant. This value must correspond to a Vagrant provider name.
     
  • provision 
    When the instance is created, use it to provision Vagrant. This is helpful if provisioning calls for customising the operating system. The default value is false.
     
  • ssh_key 
    It is used to specify the SSH authentication private key file.
     
  • synced_folders 
    It is used to define a set of synchronised folders on each Vagrant instance. The Kitchen root path is the reference point for source paths. Default setting: [].
     
  • vagrantfile_erb 
    It is used to tell this driver to use a different Vagrant Embedded Ruby (ERB) template.
     
  • vagrantfiles 
    An array of paths to Vagrant files that will be combined with the system's default Vagrant file. Both absolute and relative routes to the kitchen.yml file are possible.
     
  • vm_hostname 
    It is used to specify the instance's internal hostname. When connecting to a Vagrant virtual machine, this is not necessary. To stop this value from appearing in the default Vagrantfile, set this to false. Default value: derived from the instance's platform name.
     

Let's look into the details of predicting box names.

Predicting Box name

The box name for Vagrant and the download URL that Chef has made public can be predicted by the kitchen-vagrant driver. For instance:

Command:

platforms:
- name: ubuntu-18.04
- name: ubuntu-20.04
- name: centos-7
- name: centos-8
- name: debian-10


Output:

platforms:
- name: ubuntu-18.04
  driver:
    box: bento/ubuntu-18.04
- name: ubuntu-20.04
  driver:
    box: bento/ubuntu-20.04
# ...

Frequently Asked Questions

What is Kitchen converge in Chef?

A converge will keep the machine running, and Kitchen will automatically upload modifications after each converge so that configuration code iterations can happen quickly.

What is the use of the box attribute?

The box attribute is used to provide the computer that will host Vagrant.

What is the use of the network attribute?

The network attribute is used to define a variety of network adjustments that should be made to the virtual machine.

Conclusion

In this article, we have extensively discussed the details of kitchen-vagrant driver along with the details of its attributes and their uses and details of predicting box names.

We hope that this blog has helped you enhance your knowledge regarding kitchen-vagrant, and if you would like to learn more, you can refer to our guided paths on the Coding Ninjas Studio platform to learn more about DSADBMSCompetitive ProgrammingPythonJavaJavaScript, etc. To practice and improve yourself in the interview, you can also check out Top 100 SQL problemsInterview experienceCoding interview questions, and the Ultimate guide path for interviews. Do upvote our blog to help other ninjas grow. Happy Coding!!

Thank You image
Live masterclass