Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does provisioning means for VM

Does it differ from "setting up" a machine ?

I can't really tell. It seems to be if I read the doc from Vagrant but there must be something else.

It says

On the first vagrant up that creates the environment, provisioning is run. If the environment was already created and the up is just resuming a machine or booting it up, they will not run unless the --provision flag is explicitly provided.

So some up need to do the "provisioning" and some up do not.

like image 923
nicolas Avatar asked Oct 23 '25 18:10

nicolas


1 Answers

Provisioning generally refers to the distribution and installation of software. In the context of a virtual machine, it refers to configuring what software and capabilities that each instance of a virtual machine will contain. Think of it here as a virtual machine template, where each new VM instance that is spun up will contain the same software that you've asked to provision.

"Setting up" is a more generic term that appears to be used in the Vagrant documentation as referring to the creation and destruction of each virtual machine instance, e.g. "setting up" vs. "tearing down", as per the "up" and "destroy" commands. "setting up" here has nothing to do with what's actually configured in the VM instance itself, that's the provisioning part.

Put another way, when you set up a new virtual machine instance using the "up" command, it creates a basic virtual machine instance, then triggers the provisioning system to actually install the software you want into that instance. Here's the part of the documentation that hilights this:

Provisioners in Vagrant allow you to automatically install software, alter configurations, and more on the machine as part of the vagrant up process.

This is useful since boxes typically are not built perfectly for your use case. Of course, if you want to just use vagrant ssh and install the software by hand, that works. But by using the provisioning systems built-in to Vagrant, it automates the process so that it is repeatable.

like image 134
Nathan Derksen Avatar answered Oct 26 '25 02:10

Nathan Derksen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!