listing snapshots of a machine that has no snapshots results in an error
Closed this issue · 4 comments
berendt commented
# vagrant snapshot list infrastructure
Listing snapshots for 'infrastructure':
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", "6c29223f-9de7-4b46-8111-f3afb7937d7f", "list", "--details"]
Stderr:
Manually calling VBoxManage exits with a 1 as return code. Probably that's the issue.
# VBoxManage snapshot 6c29223f-9de7-4b46-8111-f3afb7937d7f list --details
This machine does not have any snapshots
# echo $?
1
berendt commented
One more issue.
When there are snapshots available in a multi machine environment only machines with snapshots can be listed.
# vagrant snapshot list infrastructure
Listing snapshots for 'infrastructure':
Name: initial (UUID: b67f5817-7107-4a7f-96b0-499b379dcf6e) *
When trying to list a machine with no snapshots I got the following exception:
# vagrant snapshot list compute
Listing snapshots for 'compute':
/root/.vagrant.d/gems/gems/childprocess-0.5.2/lib/childprocess/abstract_process.rb:45:in `initialize': all arguments must be String: ["/usr/bin/VBoxManage", "snapshot", nil, "list", "--details"] (ArgumentError)
from /root/.vagrant.d/gems/gems/childprocess-0.5.2/lib/childprocess.rb:19:in `new'
from /root/.vagrant.d/gems/gems/childprocess-0.5.2/lib/childprocess.rb:19:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/util/subprocess.rb:64:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/util/subprocess.rb:22:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/providers/virtualbox/driver/base.rb:367:in `block in raw'
from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/providers/virtualbox/driver/base.rb:366:in `raw'
from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/providers/virtualbox/driver/base.rb:305:in `block in execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/util/retryable.rb:17:in `retryable'
from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/providers/virtualbox/driver/base.rb:300:in `execute'
from /root/.vagrant.d/gems/gems/vagrant-vbox-snapshot-0.0.4/lib/vagrant-vbox-snapshot/commands/list.rb:20:in `block in execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/plugin/v2/command.rb:200:in `block in with_target_vms'
from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/plugin/v2/command.rb:194:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/plugin/v2/command.rb:194:in `with_target_vms'
from /root/.vagrant.d/gems/gems/vagrant-vbox-snapshot-0.0.4/lib/vagrant-vbox-snapshot/commands/list.rb:17:in `execute'
from /root/.vagrant.d/gems/gems/vagrant-vbox-snapshot-0.0.4/lib/vagrant-vbox-snapshot/commands/root.rb:46:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/cli.rb:42:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/environment.rb:248:in `cli'
from /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.5.1/bin/vagrant:158:in `<main>'
muk302 commented
Any updates on part two? I am seeing the same stack trace (Vagrant 1.6.5).
Update: This stack trace occurs on any command (list, go, etc.).
dergachev commented
I fixed #17.
The second part I can no longer reproduce:
vim Vagrantfile # enable TEST_MULTI_VM
vagrant up # spins up "db" and "web" VMs
vagrant snapshot list db
# Listing snapshots for 'db':
# This machine does not have any snapshots
vagrant snapshot take db bob
# Taking snapshot bob
# 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
vagrant snapshot list db
# Listing snapshots for 'db':
# Name: bob (UUID: 7b649519-1170-411e-b76c-958dd625ac90) *
vagrant snapshot list web
# Listing snapshots for 'web':
# This machine does not have any snapshots
Let me know if I missed something.