summaryrefslogtreecommitdiff
path: root/morphlib/exts/kvm.write
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2013-06-03 15:49:53 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2013-06-03 16:59:41 +0000
commitae23c74dbf74b935a56bca802454491d0169ed8d (patch)
tree8c1ff06f82e099ab411768ad67464689c30e6275 /morphlib/exts/kvm.write
parentc70a8550b1ffdbf32bf2280d696d6a8ae79a8a25 (diff)
downloadmorph-ae23c74dbf74b935a56bca802454491d0169ed8d.tar.gz
kvm.write: Set VM to autostart if specified
Diffstat (limited to 'morphlib/exts/kvm.write')
-rwxr-xr-xmorphlib/exts/kvm.write3
1 files changed, 3 insertions, 0 deletions
diff --git a/morphlib/exts/kvm.write b/morphlib/exts/kvm.write
index 4bfff8c4..f2683d8e 100755
--- a/morphlib/exts/kvm.write
+++ b/morphlib/exts/kvm.write
@@ -115,6 +115,9 @@ class KvmPlusSshWriteExtension(morphlib.writeexts.WriteExtension):
cmdline += ['--noreboot']
cliapp.ssh_runcmd(ssh_host, cmdline)
+ if autostart:
+ cliapp.ssh_runcmd(ssh_host,
+ ['virsh', '--connect', 'qemu:///system', 'autostart', vm_name])
KvmPlusSshWriteExtension().run()