Skip to main content


The kitchen-vagrant driver for Kitchen generates a single Vagrantfile for each instance of Kitchen in a sandboxed directory. The kitchen-vagrant driver supports VirtualBox and VMware Fusion, requires Vagrant 1.1.0 (or higher), and is the default driver for Test Kitchen.

The following attributes are used to configure kitchen-vagrant for Chef:


The box on which Vagrant will run.

Default value: computed from the platform name of the instance.



Whether to check for box updates.

Default value: false.


The URL at which the configured box is located.

Default value: computed from the platform name of the instance, but only when the Vagrant provider is VirtualBox- or VMware-based.


Use to override the config.vm.communicator setting in Vagrant. For example, when a base box is a Windows operating system that does not have SSH installed and enabled, Vagrant will not be able to boot without a custom Vagrant file.

Default value: nil (assumes SSH is available).


A hash of key-value pairs that define customizations that should be made to the Vagrant virtual machine.

Example: customize: memory: 1024 cpuexecutioncap: 50.


The config.vm.guest setting in the default Vagrantfile.


The graphical user interface for the defined platform. This is passed to the config.vm.provider setting in Vagrant, but only when the Vagrant provider is VirtualBox- or VMware-based.


An array of network customizations to be applied to the virtual machine.

Example: network: - ["forwarded_port", {guest: 80, host: 8080}] - ["private_network", {ip: ""}].

Default value: [].


A command to run immediately before vagrant up --no-provisioner.


The Vagrant provider. This value must match a provider name in Vagrant.


Whether to provision Vagrant when the instance is created. This is useful if the operating system needs customization during provisioning.

Default value: false.


The private key file used for SSH authentication.


The collection of synchronized folders on each Vagrant instance. Source paths are relative to the Kitchen root path.

Example: synced_folders: - ["data/%{instance_name}", "/opt/instance_data"] - ["/host_path", "/vm_path", "create: true, type: :nfs"].

Default value: [].


The alternate Vagrant Embedded Ruby (ERB) template to be used by this driver.


An array of paths to one (or more) Vagrant files to be merged with the default Vagrant file. The paths may be absolute or relative to the kitchen.yml file.


The internal hostname for the instance. This is not required when connecting to a Vagrant virtual machine. Set this to false to prevent this value from being rendered in the default Vagrantfile.

Default value: computed from the platform name of the instance.

The kitchen-vagrant driver can predict the box name for Vagrant and the download URL that have been published by Chef. For example:

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

which will generate a configuration file similar to:

- name: ubuntu-18.04
    box: bento/ubuntu-18.04
- name: ubuntu-20.04
    box: bento/ubuntu-20.04
# ...
Edit this page on GitHub

Thank you for your feedback!


Search Results