hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.27k stars 4.43k forks source link

Unable to create base packages with vagrant 1.7.2. OSX, ChefDK, Test Kitchen #5297

Closed Joseph-R closed 9 years ago

Joseph-R commented 9 years ago

I am unable to package base boxes using Vagrant 1.7.2.

Global status shows name "default".

$ vagrant global-status
id       name    provider   state   directory
---------------------------------------------------------------------------------------------------------------------------
600bce2  default virtualbox running /Users/jreid/repo/chef-repo/cookbooks/JO2O/.kitchen/kitchen-vagrant/dbserver-centos-65

The above shows information about all known Vagrant environments
on this machine. This data is cached and may not be completely
up-to-date. To interact with any of the machines, you can go to
that directory and run Vagrant, or you can use the ID directly
with Vagrant commands from any directory. For example:
"vagrant destroy 1a2b3c4d"

But attempts to CD into that directory and package the VM with vagrant package --base $name fail with the following:

[17:22:47] (28) jreid@JoesMacBookPro:~/repo/chef-repo/cookbooks/JO2O/.kitchen/kitchen-vagrant/dbserver-centos-65
$ vagrant status
Current machine states:

default                   running (virtualbox)

The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.

$ vagrant package --base default
==> default: VM not created. Moving on..

Debug output.

Versions:

I'm not sure if I'm doing something wrong, or if there is a bug. I used to be able to pack boxes like this with a previous version of Vagrant. Do I need to do something different now?

sethvargo commented 9 years ago

Hi @JoeReid-Korrelate

I am sorry you are having problems with Vagrant. Can you please uninstall all plugins and see if the problem persists?

Joseph-R commented 9 years ago

Hey Seth! Big fan of your blog, man. I appreciate your help on this.

I see plugins in the --debug output (linked above) that do not show up in a vagrant plugin list.

 INFO global: Plugins:
 INFO global:   - bundler = 1.7.11
 INFO global:   - mime-types = 1.25.1
 INFO global:   - rdoc = 4.0.0
 INFO global:   - rest-client = 1.6.8
 INFO global:   - vagrant-share = 1.1.3
$ vagrant plugin list
vagrant-share (1.1.3, system)

Attempted to uninstall the only plugin listed (vagrant-share), which resulted in the following output:

$ vagrant plugin uninstall vagrant-share
Uninstalling the 'vagrant-share' plugin...
The plugin you're attempting to uninstall ('vagrant-share') is a
system plugin. This means that the plugin is part of the installation
of Vagrant. These plugins cannot be removed.

You can however, install a plugin with the same name to replace
these plugins. User-installed plugins take priority over
system-installed plugins.

Attempted to upgrade vagrant-share, just in case:

[11:17:50] (7) jreid@JoesMacBookPro:~/repo/chef-repo/cookbooks/JO2O(migrate_dev_environment_JR)
$ vagrant plugin update vagrant-share
Updating plugins: vagrant-share. This may take a few minutes...
All plugins are up to date.
mitchellh commented 9 years ago

The --base flag is a bit weird, and must only reference the name of a VM in the VirtualBox GUI. To package it otherwise, run vagrant package directly.