Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

sandbox off failed: "Failed to perform an online medium merge" #17

Closed
rb2k opened this Issue Dec 21, 2012 · 5 comments

Comments

Projects
None yet
5 participants

rb2k commented Dec 21, 2012

Not quite sure what's happening here. Maybe a change in virtualbox?

Virtualbox Version: 4.2.6-82870Ubuntuprecise

[default] - switching sandbox off
0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Snapshot operation failed
VBoxManage: error: Failed to perform an online medium merge (VERR_INVALID_PARAMETER)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Console, interface IConsole
VBoxManage: error: Context: "int handleSnapshot(HandlerArg*)" at line 431 of file VBoxManageSnapshot.cpp

leoh0 commented Jan 16, 2013

I don't know what is real problem. But, in my case, I couldn't delete first snapshot.
So I make dummy snapshot which never delete and use only second snapshot for sandbox.
I attach my code below. It`s worked for me.

testing with -
virtualbox: 4.2.6-82870Ubuntulucid
vagrant: 1.0.5
sahara: 0.0.13

diff --git a/lib/sahara/session.rb b/lib/sahara/session.rb
index 832bcce..7371495 100644
--- a/lib/sahara/session.rb
+++ b/lib/sahara/session.rb
@@ -54,6 +54,14 @@ module Sahara
         else
           instance_uuid="#{@vagrant_env.vms[boxname.to_sym].uuid}"

+          snapshots=list_snapshots(boxname)
+          if !snapshots.include?("#{@sandboxname}-base")
+            #Creating a base snapshot
+            puts "[#{boxname}] - Making a base sandbox"
+
+            execute("#{@vboxcmd} snapshot \"#{instance_uuid}\" take \"#{@sandboxname}-base\" --pause")
+          end
+
           #Creating a snapshot
           puts "[#{boxname}] - Enabling sandbox"

athiele commented Feb 13, 2013

Hello,

I have a similar but not the same error:

vagrant sandbox off                          
[testbox] - switching sandbox off                                               
0%...                                                                           
Progress state: E_FAIL                                                          
VBoxManage.exe: error: Snapshot operation failed                                
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)                                                               
VBoxManage.exe: error: Context: "int __cdecl handleSnapshot(struct HandlerArg *)" at line 431 of file VBoxManageSnapshot.cpp 

VirtualBox: 4.2.6
Vagrant: 1.0.6
Sahara: 0.0.13

umegaya commented Aug 13, 2013

Hello,

this still occur in my environment

Max OSX 10.8.2
VirtualBox: 4.2.6
Vagrant: 1.2.2
Sahara: 0.0.15

Takehiro-no-MacBook-Pro:test iyatomi$ vagrant sandbox on
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Takehiro-no-MacBook-Pro:test iyatomi$ vagrant sandbox off
0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Snapshot operation failed
VBoxManage: error: Failed to perform an online medium merge (VERR_INVALID_PARAMETER)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Console, interface IConsole
VBoxManage: error: Context: "int handleSnapshot(HandlerArg*)" at line 431 of file VBoxManageSnapshot.cpp

it should be already fixed?

Collaborator

ryuzee commented Aug 13, 2013

@umegaya

First thing you can do is to upgrade your VirtualBox upto latest version 4.2.16.
The version you use is a little bit old.

Sahara is the wrapper of VBoxManage command and this error is shown by VirtualBox.

Thanks!

umegaya commented Aug 13, 2013

@ryuzee

upgrating 4.2.16 solve the problem (at least in my case), thank you for your advise :D
so this seems to be caused by some VirtualBox problem.

@ryuzee ryuzee closed this May 29, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment