Permalink
Browse files

show qemu snapshotting status (stub)

  • Loading branch information...
1 parent 7a50ecb commit bddbe0c06df8764904b5f711d98051b6ede0bfc0 Guido De Rosa committed Mar 13, 2012
@@ -216,6 +216,16 @@ def snapshotting?
end
end
+ def snapshot_waiting?
+ pidfile = "#{VARRUN}/qemu-#{uuid_short}.snapshot.pid"
+ waiting_file = "#{VARRUN}/qemu-#{uuid_short}.snapshot.waiting"
+ return (
+ File.exists? pidfile and
+ Process.running?(File.read(pidfile).to_i) and
+ File.exists? waiting_file
+ )
+ end
+
def drives
drives_h = {}
if running?
@@ -54,6 +54,21 @@
</form>
<h3>Snapshots</h3>
+
+<h4>Status</h4>
+
+<% if vm.snapshotting? %>
+ <% if vm.snapshot_waiting? %>
+ <% else %>
+ <% end %>
+<% else %>
+ <% if OnBoard::V12n::QEMU::Snapshot.running? %>
+ <% else %>
+ <% end %>
+<% end %>
+
+<h4>Saved Snapshots</h4>
+
<p class="info" style="margin-top:0;">
<span class="term">Disk Only</span> snapshots are taken and applied at
machine turned off. Full <span class="term">VM</span> snapshots also include

0 comments on commit bddbe0c

Please sign in to comment.