Method: VirtualBox::Snapshot#destroy

Defined in:
lib/virtualbox/snapshot.rb

#destroy(&block) ⇒ Object

Destroy a snapshot. This will physically remove the snapshot. Once this method is called, there is no undo. If this snapshot is a parent of other snapshots, the differencing image of this snapshot will be merged with the child snapshots so no data is lost. This process can sometimes take some time. This method will block while this process occurs.

If a block is given to the function, it will be yielded with a progress object which can be used to track the progress of the operation.



179
180
181
182
183
# File 'lib/virtualbox/snapshot.rb', line 179

def destroy(&block)
  machine.with_open_session do |session|
    session.console.delete_snapshot(uuid).wait(&block)
  end
end