From 76c982d1b36042a3aaf53b32245a5dd164bb4b74 Mon Sep 17 00:00:00 2001 From: Paul Martin Date: Wed, 5 Dec 2018 14:33:51 +0000 Subject: [PATCH] If nova is installed on arm64 with active KVM, default to that. There are problems using aarch64 booting UEFI with bare QEMU at the moment, but if run under KVM it works well with a 4.15.0 kernel. Tested with the current Ubuntu Bionic cloud image. The Cirros 0.4.0 arm64 image has a 4.4.0 kernel which doesn't receive hardware information from UEFI and panics when it cannot find an interrupt controller, but without logging anything to console because it hasn't detected the serial port either. Change-Id: I7a39a03bf1bf959c650e4454bcb32f8c0c792619 --- tasks/nova_virt_detect.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks/nova_virt_detect.yml b/tasks/nova_virt_detect.yml index 11ed0e2b..88838774 100644 --- a/tasks/nova_virt_detect.yml +++ b/tasks/nova_virt_detect.yml @@ -18,6 +18,11 @@ register: cpuinfo_contents changed_when: false +- name: Check for existence of KVM node + stat: + path: "/dev/kvm" + register: dev_kvm + - name: Register a fact for the nova kvm virt type set_fact: nova_virt_type: "kvm" @@ -28,6 +33,8 @@ or (cpuinfo_contents.stdout.find('pSeries') != -1 and cpuinfo_contents.stdout.find('qemu') != -1 and ansible_architecture == 'ppc64le') + or (dev_kvm.stat.ischr is defined and dev_kvm.stat.ischr + and ansible_architecture == 'aarch64') - name: Register a fact for the nova powervm virt type set_fact: