[PATCH 1/2] kvm.write: use ssh_runcmd

Jonathan Maw jonathan.maw at codethink.co.uk
Mon Jun 3 18:03:13 BST 2013


---
 morphlib/exts/kvm.write |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/morphlib/exts/kvm.write b/morphlib/exts/kvm.write
index ae287fe..4bfff8c 100755
--- a/morphlib/exts/kvm.write
+++ b/morphlib/exts/kvm.write
@@ -108,13 +108,12 @@ class KvmPlusSshWriteExtension(morphlib.writeexts.WriteExtension):
 
         ram_mebibytes = str(self.get_ram_size() / (1024**2))
 
-        cmdline = ['ssh', ssh_host, 
-                   'virt-install', '--connect qemu:///system', '--import',
+        cmdline = ['virt-install', '--connect', 'qemu:///system', '--import',
                    '--name', vm_name, '--vnc', '--ram=%s' % ram_mebibytes,
-                   '--disk path=%s,bus=ide' % vm_path] + attach_opts
+                   '--disk', 'path=%s,bus=ide' % vm_path] + attach_opts
         if not autostart:
             cmdline += ['--noreboot']
-        cliapp.runcmd(cmdline)
+        cliapp.ssh_runcmd(ssh_host, cmdline)
 
 
 KvmPlusSshWriteExtension().run()
-- 
1.7.10.4




More information about the baserock-dev mailing list