summaryrefslogtreecommitdiff
path: root/morphlib/exts/kvm.write
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-03-28 13:42:06 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-03-28 13:44:35 +0000
commitb041c13a1e3a2200d8b98754a456c4751e2c5ae2 (patch)
tree1800339cb1113b337677ac421fed958ec787594b /morphlib/exts/kvm.write
parent0f9da0296af86c2572960aab9fd062c271cc402e (diff)
downloadmorph-b041c13a1e3a2200d8b98754a456c4751e2c5ae2.tar.gz
Set RAM size for kvm deployment
Diffstat (limited to 'morphlib/exts/kvm.write')
-rwxr-xr-xmorphlib/exts/kvm.write5
1 files changed, 4 insertions, 1 deletions
diff --git a/morphlib/exts/kvm.write b/morphlib/exts/kvm.write
index c491f206..630f6ae7 100755
--- a/morphlib/exts/kvm.write
+++ b/morphlib/exts/kvm.write
@@ -105,10 +105,13 @@ class KvmPlusSshWriteExtension(morphlib.writeexts.WriteExtension):
for disk in attach_disks:
attach_opts.extend(['--disk', 'path=%s' % disk])
+ ram_mebibytes = str(self.get_ram_size() / (1024**2))
+
cliapp.runcmd(
['ssh', ssh_host,
'virt-install', '--connect qemu:///system', '--import',
- '--name', vm_name, '--ram', '1024', '--vnc', '--noreboot',
+ '--name', vm_name, '--vnc', '--noreboot',
+ '--ram=%s' % ram_mebibytes,
'--disk path=%s,bus=ide' % vm_path] +
attach_opts)