Permalink
Browse files

qemu: remove crontab entries when deleting a VM

  • Loading branch information...
1 parent 1737928 commit d8e923ccdfad64683c2ab24970053bcc768adb8d Guido De Rosa committed Mar 16, 2012
View
1 modules/qemu/lib/onboard/virtualization/qemu/instance.rb
@@ -384,6 +384,7 @@ def savevm_quit
def delete
quit if running?
FileUtils.rm_f @config.file
+ QEMU::Snapshot::Schedule.remove uuid_short
end
def screendump(format='ppm')
View
6 modules/qemu/lib/onboard/virtualization/qemu/snapshot/schedule.rb
@@ -53,10 +53,14 @@ def manage(h)
:command => cmd
}
else
- CronEdit::Crontab.Remove cronid(vmid)
+ remove(vmid)
end
end
+ def remove(vmid)
+ CronEdit::Crontab.Remove cronid(vmid)
+ end
+
def get_entry(vmid)
crontab_line = CronEdit::Crontab.List[cronid(vmid)]
if crontab_line

0 comments on commit d8e923c

Please sign in to comment.