Skip to content

Commit

Permalink
libvirt: support aarch64 arch VM
Browse files Browse the repository at this point in the history
Get correct yq package name and specify virt machine type for aarch64.

Signed-off-by: Tao Xu <[email protected]>
Reviewed-by: Seunguk Shin <[email protected]>
Reviewed-by: Nick Connolly <[email protected]>
  • Loading branch information
xutao323 committed Sep 12, 2024
1 parent 453846c commit 4ef2177
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cloud-api-adaptor/libvirt/config_libvirt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set -o pipefail
source /etc/os-release || source /usr/lib/os-release
ARCH=$(uname -m)
TARGET_ARCH=${ARCH/x86_64/amd64}
TARGET_ARCH=${ARCH/aarch64/arm64}
OS_DISTRO=ubuntu
if [[ "$ID" == "rhel" || "$ID" == "centos" || "$ID" == "fedora" ]]; then
OS_DISTRO=rhel
Expand Down
5 changes: 5 additions & 0 deletions src/cloud-api-adaptor/libvirt/kcli_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ create () {
-P multus=false \
-P autolabeller=false "
fi
if [[ ${TARGET_ARCH} == "aarch64" ]]; then
parameters="$parameters \
-P arch=$ARCH \
-P machine=virt"
fi
echo "Download $CLUSTER_IMAGE ${TARGET_ARCH} image"
# kcli support download image with archs: 'x86_64', 'aarch64', 'ppc64le', 's390x'
kcli download image $CLUSTER_IMAGE -P arch=${ARCH}
Expand Down

0 comments on commit 4ef2177

Please sign in to comment.