summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xkvm.write4
-rwxr-xr-xvirtualbox-ssh.write4
2 files changed, 8 insertions, 0 deletions
diff --git a/kvm.write b/kvm.write
index 9a6be13..8cbec94 100755
--- a/kvm.write
+++ b/kvm.write
@@ -50,6 +50,10 @@ class KvmPlusSshWriteExtension(morphlib.writeexts.WriteExtension):
'''
+ def get_vcpu_count(self):
+ '''Parse the virtual cpu count from environment.'''
+ return self._parse_size_from_environment('VCPUS', '1')
+
def process_args(self, args):
if len(args) != 2:
raise cliapp.AppException('Wrong number of command line args')
diff --git a/virtualbox-ssh.write b/virtualbox-ssh.write
index 1abe233..a498dcb 100755
--- a/virtualbox-ssh.write
+++ b/virtualbox-ssh.write
@@ -56,6 +56,10 @@ class VirtualBoxPlusSshWriteExtension(morphlib.writeexts.WriteExtension):
'''
+ def get_vcpu_count(self):
+ '''Parse the virtual cpu count from environment.'''
+ return self._parse_size_from_environment('VCPUS', '1')
+
def process_args(self, args):
if len(args) != 2:
raise cliapp.AppException('Wrong number of command line args')