summaryrefslogtreecommitdiff
path: root/morphlib/exts/kvm.write
diff options
context:
space:
mode:
authorDan Firth <dan.firth@codethink.co.uk>2013-10-10 16:07:37 +0000
committerDan Firth <dan.firth@codethink.co.uk>2013-10-14 12:00:27 +0000
commita146142f6ae7f4b20d76f68b8317eae89c4213ab (patch)
tree459700d30f7f37790fcacd770f48f0abad2227b5 /morphlib/exts/kvm.write
parentdf64e4300d7b39c29ce75273196a7894c86a98a9 (diff)
downloadmorph-a146142f6ae7f4b20d76f68b8317eae89c4213ab.tar.gz
Deployment failures will now remove the disk image
Diffstat (limited to 'morphlib/exts/kvm.write')
-rwxr-xr-xmorphlib/exts/kvm.write1
1 files changed, 1 insertions, 0 deletions
diff --git a/morphlib/exts/kvm.write b/morphlib/exts/kvm.write
index 9a6be135..4f877c22 100755
--- a/morphlib/exts/kvm.write
+++ b/morphlib/exts/kvm.write
@@ -68,6 +68,7 @@ class KvmPlusSshWriteExtension(morphlib.writeexts.WriteExtension):
except BaseException:
sys.stderr.write('Error deploying to libvirt')
os.remove(raw_disk)
+ cliapp.ssh_runcmd(ssh_host, ['rm', '-f', vm_path])
raise
else:
os.remove(raw_disk)