diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2013-07-02 07:24:30 +0000 |
---|---|---|
committer | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2013-07-02 07:24:30 +0000 |
commit | 429f08e8cbddd4f108ab125b44c5eb7b7bba3e09 (patch) | |
tree | dcf3b898c3acfcfaeefbd87fa0c7a61901bc7c7a /morphlib/exts/kvm.write | |
parent | 7efdaa1487bf39867d21fa19634c35e830940ca7 (diff) | |
download | morph-429f08e8cbddd4f108ab125b44c5eb7b7bba3e09.tar.gz |
Allow to set the number of cpus for virtualbox and kvm deployments.
Diffstat (limited to 'morphlib/exts/kvm.write')
-rwxr-xr-x | morphlib/exts/kvm.write | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/morphlib/exts/kvm.write b/morphlib/exts/kvm.write index 67ac40e7..9a6be135 100755 --- a/morphlib/exts/kvm.write +++ b/morphlib/exts/kvm.write @@ -113,8 +113,11 @@ class KvmPlusSshWriteExtension(morphlib.writeexts.WriteExtension): ram_mebibytes = str(self.get_ram_size() / (1024**2)) - cmdline = ['virt-install', '--connect', 'qemu:///system', '--import', - '--name', vm_name, '--vnc', '--ram=%s' % ram_mebibytes, + vcpu_count = str(self.get_vcpu_count()) + + cmdline = ['virt-install', '--connect', 'qemu:///system', + '--import', '--name', vm_name, '--vnc', + '--ram', ram_mebibytes, '--vcpus', vcpu_count, '--disk', 'path=%s,bus=ide' % vm_path] + attach_opts if not autostart: cmdline += ['--noreboot'] |