From 211e00747219e494173f2086b4794aa57bede07f Mon Sep 17 00:00:00 2001 From: cid Date: Tue, 16 Apr 2024 00:27:30 +0100 Subject: [PATCH] Load machine type from command-line Change-Id: Ib2bdac78e0eb4043e2a2f86244ea168641571817 --- devstack/tools/ironic/scripts/configure-vm.py | 3 +++ devstack/tools/ironic/templates/vm.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/devstack/tools/ironic/scripts/configure-vm.py b/devstack/tools/ironic/scripts/configure-vm.py index d363817d4a..d9a426f15c 100755 --- a/devstack/tools/ironic/scripts/configure-vm.py +++ b/devstack/tools/ironic/scripts/configure-vm.py @@ -65,6 +65,8 @@ def main(): help='The virtualization engine to use') parser.add_argument('--arch', default='i686', help='The architecture to use') + parser.add_argument('--machine_type', default='q35', + help='Machine type based on architecture') parser.add_argument('--memory', default='2097152', help="Maximum memory for the VM in KB.") parser.add_argument('--cpus', default='1', @@ -104,6 +106,7 @@ def main(): 'images': images, 'engine': args.engine, 'arch': args.arch, + 'machine_type': args.machine_type, 'memory': args.memory, 'cpus': args.cpus, 'bootdev': args.bootdev, diff --git a/devstack/tools/ironic/templates/vm.xml b/devstack/tools/ironic/templates/vm.xml index 2e3ed61093..feec6174c0 100644 --- a/devstack/tools/ironic/templates/vm.xml +++ b/devstack/tools/ironic/templates/vm.xml @@ -3,7 +3,7 @@ {{ memory }} {{ cpus }} - hvm + hvm {% if bootdev == 'network' and not uefi_loader %} {% endif %}