[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Using vagrant and virtualbox



I always seem to have problems using vagrant and virtualbox, and I
largely think my problems are because vagrant is poorly designed with
how it manages it's boxes, on Debian. My host system is running
Debian/Sid, just in case you're wondering how this relates to Debian.
Now, I'll admit, I may just be doing it wrong.  So I'm wondering how
people use these tools.  For example, I went to install a vagrant box
from puppet:

$ vagrant box add puppet1
http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-1310-i386-virtualbox-puppet.box

After it downloads, I see messages like:

Successfully added box 'puppet1' with provider 'virtualbox'!

Then I do:

$ vagrant init puppet1

and I see:

A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

okay, fine.  Then I do:

$ vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set network interfaces...
...etc...

Why does it call this machine 'default'?  Why doesn't it use the title
(puppet1) I provided? Why does it insist on using the current working
directory to create a vagrant file rather than some centrally located
directory? Like .vagrant.d... but of course, it sets up stuff there.
(Maybe it should just create VagrantFiles in all my directories... why
not!?!)

Then I start up virtualbox, I don't see this instance at all.  It does
appear it started up another virtual machine, a CentOS box I had
installed, inexplicably.  So I shut down the CentOS instance.  What I
end up doing is copying the files out of ~/.vagrant.d/boxes/puppet1
and put them in ~/VirtualBox VMs/puppet1 (then nautilus file viewer
didn't see dot files, and I didn't figure like figuring that out, I
hate GNOME), then import the box into VirtualBox. So then I can
finally manage the machine in VirtualBox.

What I'm wondering, why can't there be just one place that vagrant and
virtualbox uses for storing the VMs?  This whole system just seems a
little screwed up.  I can get it to work, but there are a lot of hoops
I have to jump through, and I end up with a lot of extra files I'm not
sure I need or not.  VMware is a lot easier to use.


-- 
Dale Harris
rodmur@maybe.org
rodmur@gmail.com
/.-)


Reply to: