lib/virtualbox/vm.rb in virtualbox-0.8.2 vs lib/virtualbox/vm.rb in virtualbox-0.8.3
- old
+ new
@@ -521,15 +521,10 @@
# Discards any saved state on the current VM. The VM is not destroyed though
# and can still be started by calling {#start}.
#
# @return [Boolean] True if command was successful, false otherwise.
def discard_state
- # Since the VM should be saved as it is, we don't open an
- # existing session like the other control methods. We open a new
- # session.
- with_open_session do |session|
- session.console.forget_saved_state(true)
- end
+ control(:discard_saved_state, true)
end
# Controls the virtual machine. This method is used by {#stop},
# {#pause}, {#resume}, and {#save_state} to control the virtual machine.
# Typically, you won't ever have to call this method and should