diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2013-06-03 15:49:53 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2013-06-03 16:59:41 +0000 |
commit | ae23c74dbf74b935a56bca802454491d0169ed8d (patch) | |
tree | 8c1ff06f82e099ab411768ad67464689c30e6275 /morphlib/exts | |
parent | c70a8550b1ffdbf32bf2280d696d6a8ae79a8a25 (diff) | |
download | morph-ae23c74dbf74b935a56bca802454491d0169ed8d.tar.gz |
kvm.write: Set VM to autostart if specified
Diffstat (limited to 'morphlib/exts')
-rwxr-xr-x | morphlib/exts/kvm.write | 3 |
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() |