Add a flag to burnin to allow specifying VCPU count.
authorPedro Macedo <pmacedo@google.com>
Tue, 2 Aug 2011 15:19:36 +0000 (17:19 +0200)
committerIustin Pop <iustin@google.com>
Wed, 3 Aug 2011 08:50:44 +0000 (10:50 +0200)
Signed-off-by: Pedro Macedo <pmacedo@google.com>
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

tools/burnin

index a47ea19..fab4f20 100755 (executable)
@@ -126,6 +126,9 @@ OPTIONS = [
                  default=128, type="unit", metavar="<size>",
                  completion_suggest=("128M 256M 512M 1G 4G 8G"
                                      " 12G 16G").split()),
+  cli.cli_option("--vcpu-count", dest="vcpu_count", help="VCPU count",
+                 default=3, type="unit", metavar="<count>",
+                 completion_suggest=("1 2 3 4").split()),
   cli.DEBUG_OPT,
   cli.VERBOSE_OPT,
   cli.NOIPCHECK_OPT,
@@ -471,7 +474,7 @@ class Burner(object):
     self.instances = args
     self.bep = {
       constants.BE_MEMORY: options.mem_size,
-      constants.BE_VCPUS: 1,
+      constants.BE_VCPUS: options.vcpu_count,
       }
 
     self.hypervisor = None