Configurable virtualisation

Allows qemu to be specified instead of kvm when hardware
virtualisation is not available.

Change-Id: I44c6c3ed60581cdb336e55161a2cce1d68903528
This commit is contained in:
Benjamin Michael Cooper 2017-06-29 14:30:51 +01:00
parent 546b100b25
commit 55849876b9
2 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,8 @@
[DEFAULT]
# Node domain type (qemu or kvm).
#node_domain_type = kvm
# Path where virtualized node disks will be stored
#ramdisk_func_test_workdir = /tmp/ramdisk-func-test/

View File

@ -31,6 +31,9 @@ from ramdisk_func_test import utils
CONF = conf.CONF
CONF.register_opts([
cfg.StrOpt('node_domain_type',
help='Node domain type (qemu or kvm).',
default='kvm'),
cfg.IntOpt('node_boot_timeout',
help='Time to wait slave node to boot (seconds)',
default=360),
@ -58,6 +61,7 @@ class Node(base.LibvirtBase):
self.console_log = os.path.join(self.workdir, "console.log")
xml = self.jinja_env.get_template(template).render(
domain_type=CONF.node_domain_type,
mac_addr=self.mac,
network_name=network,
node_name=self.name,