From 6aac21081db4054b71257c396823b9af1d760311 Mon Sep 17 00:00:00 2001 From: yatin Date: Thu, 18 Jan 2018 16:32:38 +0530 Subject: [PATCH] Set SUPERMIN_* variables to working kernel virt-customize(libguestfs) is not working with current kernel 3.10.0-693.11.6.el7 in centos. So until it's fixed in libguestfs or kernel, let's use working kernel 3.10.0-693.el7.x86_64. The kernel version is managed using following variable which can be overridden when required. Libguesfs requires following environment variables to use the overridden kernel. - SUPERMIN_KERNEL_VERSION: {{ libguestfs_kernel_override }} - SUPERMIN_KERNEL: /boot/vmlinuz-{{ libguestfs_kernel_override }} - SUPERMIN_MODULES: /lib/modules/{{ libguestfs_kernel_override }} Change-Id: I129ec6c48d801cd605c4befda5ee00a025480413 Partial-Bug: #1743749 --- roles/modify-image/defaults/main.yml | 1 + roles/modify-image/tasks/libguestfs.yml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/roles/modify-image/defaults/main.yml b/roles/modify-image/defaults/main.yml index 1b531dcbf..0e0792f65 100644 --- a/roles/modify-image/defaults/main.yml +++ b/roles/modify-image/defaults/main.yml @@ -27,3 +27,4 @@ modify_image_vc_trace: false libguestfs_mode: true # TODO(sshnaidm): implement initramfs image modifying initramfs_image: false +libguestfs_kernel_override: 3.10.0-693.el7.x86_64 diff --git a/roles/modify-image/tasks/libguestfs.yml b/roles/modify-image/tasks/libguestfs.yml index 1c8786aeb..50225bf85 100644 --- a/roles/modify-image/tasks/libguestfs.yml +++ b/roles/modify-image/tasks/libguestfs.yml @@ -44,6 +44,11 @@ > {{ working_dir }}/{{ modify_script|default('modify_image')|replace('/','_') }}.log 2>&1 environment: LIBGUESTFS_BACKEND: direct + # FIXME(ykarel) SUPERMIN_* can be removed once + # https://bugs.launchpad.net/tripleo/+bug/1743749 is completely fixed. + SUPERMIN_KERNEL_VERSION: "{{ libguestfs_kernel_override }}" + SUPERMIN_KERNEL: "/boot/vmlinuz-{{ libguestfs_kernel_override }}" + SUPERMIN_MODULES: "/lib/modules/{{ libguestfs_kernel_override }}" args: chdir: "{{ modify_image_working_dir }}"