
This brings in the latest fixes which is often important for nested virtualization. It is required for ppc64el. This stack is installed via a new post-install.d script in the trove integration element ubuntu-xenial-guest. A user that is manually creating datastore images may install this stack by setting the following environment variable prior to running the disk-image-create command. export DIB_USE_HWE_KERNEL=true Change-Id: Iaf01c543ea210bd4725ab909aff6884df451b198
30 lines
710 B
Bash
30 lines
710 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
set -o xtrace
|
|
|
|
# The HWE stack must be installed for nested virtualization on ppc64el. This
|
|
# environment variable is set automatically by trovestack, but it may also be
|
|
# set by the user when manually invoking disk-image-create.
|
|
|
|
case "$DIB_USE_HWE_KERNEL" in
|
|
true|True|TRUE|yes|Yes|YES)
|
|
DIB_USE_HWE_KERNEL=true
|
|
;;
|
|
*)
|
|
DIB_USE_HWE_KERNEL=false
|
|
;;
|
|
esac
|
|
|
|
if [ "$DIB_USE_HWE_KERNEL" == "true" ]; then
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
PKG_ARCH=$(dpkg --print-architecture)
|
|
|
|
case "$PKG_ARCH" in
|
|
amd64|arm64|ppc64el|s390x)
|
|
apt-get --allow-unauthenticated install -y linux-generic-hwe-16.04
|
|
;;
|
|
esac
|
|
fi
|