kanishk
kanishk

Reputation: 91

What is the difference between an ISO image and Vagrant box?

To add a box in Vagrant we add the below code in a vagrantfile:

Vagrant.configure("2") do |config|

  config.vm.box = "hashicorp/bionic64"

end

Can we also add an ISO image instead of a box? If yes, then what is the way? And why do we need to build a box in Vagrant - why can't we use an ISO image?

Upvotes: 1

Views: 1378

Answers (1)

Marcin Orlowski
Marcin Orlowski

Reputation: 75629

Can we also add an ISO image instead of a box

No, you can't. Box contains more information Vagrant needs to run the guest on given provider (and you need different box for different provider, i.e. virtualbox, etc), than ISO image can provide (see Box File Format). You can use ISO image to install whatever needed on yiur guest and then make the box file out of it or make box out of ISO using additional tools though.

Upvotes: 1

Related Questions