Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

qemu/bin/snapshot: error exit on VM not found

  • Loading branch information...
commit 17379286b1039e7b7a9a0dd59c040d793c6d8883 1 parent 03aee8a
Guido De Rosa authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 modules/qemu/bin/snapshot
View
5 modules/qemu/bin/snapshot
@@ -34,6 +34,11 @@ _action_, _vmid_, _snap_name_, _comma_separated_drive_names_ = ARGV
vm = QEMU.find :vmid => _vmid_
+unless vm
+ STDERR.puts " Couldn't find VM: #{_vmid_}"
+ exit 1
+end
+
if _comma_separated_drive_names_.respond_to? :split
_drive_names_ = _comma_separated_drive_names_.split ','
else
Please sign in to comment.
Something went wrong with that request. Please try again.