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 | 7f10cd9a320664609f83dc24f6d25e79b49cb7d2 (patch) | |
tree | 11f22d124f2256ff6ee91de1708d317688c1a4df /kvm.write | |
parent | ce80fe3e235ff747afbea9b20f992f5af41fe946 (diff) | |
download | definitions-7f10cd9a320664609f83dc24f6d25e79b49cb7d2.tar.gz |
Allow to set the number of cpus for virtualbox and kvm deployments.
Diffstat (limited to 'kvm.write')
-rwxr-xr-x | kvm.write | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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'] |