Snapshot commands crash when the VMID file doesn't exist.
Closed this issue · 3 comments
I receive the following stack trace when running any of the snapshot commands. As it turns out, I 'vagrant destroy' before each new test instance I run. It would be nice to get a simple error message stating that the VMID file does not exist for that environment.
I will test things without the 'vagrant destroy' command and provide an update.
Example stack trace for the list command:
Listing snapshots for 'win764ult_rtm_avg':
INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "snapshot", nil, "list", "--details"]
INFO environment: Running hook: environment_unload
INFO host: Autodetecting host type for [#<Vagrant::Environment: /home/tester/ba>]
INFO host: Detected: linux!
INFO runner: Preparing hooks for middleware sequence...
INFO runner: 1 hooks defined.
INFO runner: Running action: #Vagrant::Action::Builder:0x0000000231d920
/opt/vagrant/embedded/gems/gems/childprocess-0.5.3/lib/childprocess/abstract_process.rb:45:in initialize': all arguments must be String: ["/usr/bin/VBoxManage", "snapshot", nil, "list", "--details"] (ArgumentError) from /opt/vagrant/embedded/gems/gems/childprocess-0.5.3/lib/childprocess.rb:19:in
new'
from /opt/vagrant/embedded/gems/gems/childprocess-0.5.3/lib/childprocess.rb:19:in new' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/util/subprocess.rb:64:in
execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/util/subprocess.rb:22:in execute' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/plugins/providers/virtualbox/driver/base.rb:372:in
block in raw'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/util/busy.rb:19:in busy' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/plugins/providers/virtualbox/driver/base.rb:371:in
raw'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/plugins/providers/virtualbox/driver/base.rb:310:in block in execute' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/util/retryable.rb:17:in
retryable'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/plugins/providers/virtualbox/driver/base.rb:305:in execute' from /home/tester/.vagrant.d/gems/gems/vagrant-vbox-snapshot-0.0.5/lib/vagrant-vbox-snapshot/commands/list.rb:20:in
block in execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/plugin/v2/command.rb:226:in block in with_target_vms' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/plugin/v2/command.rb:220:in
each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/plugin/v2/command.rb:220:in with_target_vms' from /home/tester/.vagrant.d/gems/gems/vagrant-vbox-snapshot-0.0.5/lib/vagrant-vbox-snapshot/commands/list.rb:17:in
execute'
from /home/tester/.vagrant.d/gems/gems/vagrant-vbox-snapshot-0.0.5/lib/vagrant-vbox-snapshot/commands/root.rb:50:in execute' from /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/cli.rb:42:in
execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/environment.rb:292:in cli' from /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.6.5/bin/vagrant:174:in
I have an existing .box. Result of a 'vagrant status'.
win8164pro poweroff (virtualbox)
When I run:
vagrant snapshot list win8164pro, I get the following error on this vbox which incidentally has no snapshots. This is not related to this thread, but thought I'd mention it.
Listing snapshots for 'win8164pro':
This machine does not have any snapshots
There was an error while executing VBoxManage
, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["snapshot", "74854aea-b467-4862-ab21-97b8e1c393de", "list", "--details"]
Stderr:
Potentially how to fix this:
https://github.com/dotless-de/vagrant-vbguest/blob/master/lib/vagrant-vbguest/vagrant_compat/vagrant_1_1/command.rb