Why Vagrant and not just VM?

45 views
Skip to first unread message

Jason Long

unread,
May 26, 2020, 5:41:02 PM5/26/20
to Vagrant
Hello,
Excuse me if my question is vague or odd.
I want to know, what is the advantage of the Vagrant in comparison with just Virtualization?
The Vagrant using Virtualbox, then why not create the VMs and then export them for use on another system? If the Vagrant advantage is its boxes, then a VM with specific configuration is like a Vagrant box.
I'm thankful if anyone answer me clearly.

Thank you.

Brian Cain

unread,
May 26, 2020, 5:46:50 PM5/26/20
to vagra...@googlegroups.com
Hi Jason,

I recommend reading the introduction docs, as it explains the advantage to using Vagrant: https://www.vagrantup.com/intro/index.html

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/vagrant/issues
Discuss: https://discuss.hashicorp.com/c/vagrant/24
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/73213062-6bcc-494f-a16a-d62d7a101a5a%40googlegroups.com.


--
Brian Cain

Jason Long

unread,
May 26, 2020, 5:54:46 PM5/26/20
to Vagrant
Thank you.
I read that link, but as I said, a preconfigured VM and export it for using on other machines work like Vagrant.
Then why Vagrant?

Brian Cain

unread,
May 26, 2020, 6:05:26 PM5/26/20
to vagra...@googlegroups.com
On Tue, May 26, 2020 at 2:54 PM 'Jason Long' via Vagrant <vagra...@googlegroups.com> wrote:
Thank you.
I read that link, but as I said, a preconfigured VM and export it for using on other machines work like Vagrant.

Vagrant doesn't just download boxes and bring up VMs. Vagrant comes with a DSL that abstracts away all of the operating system and hypervisor specific operations that you would otherwise have to do by hand. Things like creating and managing networks, virtual hard disks, port forwards, etc, are all handed automatically by Vagrant through the configuration language it provides. It's also a higher level abstraction on top of a given hypervisor, as well as guest specific operations. With just a VM, you'd have to manually interface with each hypervisors tools (which are all completely different, and behave different too), as well as figure out each operation systems way of managing things like networks or shared folders. Does that make sense?
 
Then why Vagrant?


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/vagrant/issues
Discuss: https://discuss.hashicorp.com/c/vagrant/24
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.

Jim McGinness

unread,
May 26, 2020, 6:43:54 PM5/26/20
to vagra...@googlegroups.com
To me, the big difference comes from consideration of how often you do the operation. It would be a waste of time, I think, to use Vagrant to bring up one or two VMs that you intend to keep around for a long time and do individual (idiosyncratic) customization on. The value of Vagrant comes from thinking of it as a way to reproducibly spin up copies of a particular environment in which you run some tests and, most likely, destroy the environment once those tests are done and the results recorded - or because you want to make a change and do it again. Because the process is - for the most part - captured in the vagrantfile and provisioner files, the spin up can be quick and hands-off (my fastest spin-up to date is an Alpine VM that comes ready in under 45 seconds - people with better hardware can certainly do it faster).

But vagrant cannot serve every use case. Your idea of a golden-image customized VM that you spin up wherever it suits you is perfectly viable. Some people address this need with containers, but having vagrant VMs remains a valuable option. I personally keep a 'stable' of boxes around so I can try things out on different distros (not that distros differ so much these days). I don't think I'd have the energy to go through each individual installation, but with Vagrant I don't have to.

-- jmcg

Jason Long

unread,
May 28, 2020, 5:40:03 PM5/28/20
to Vagrant
Thanks, but you can't do it by VBoxManage and a bash script?
Why Vagrant using type-2 hypervisors?

Jason Long

unread,
May 28, 2020, 5:41:39 PM5/28/20
to Vagrant
Long time?
You can customize a lightweight distro and...
Export and import VMS.
Reply all
Reply to author
Forward
0 new messages