Skip to content

Commit

Permalink
Fix arm64 builds for debian 11 (#1571)
Browse files Browse the repository at this point in the history
* fix open-vm-tools installation in debian11

Signed-off-by: fgierlinger <[email protected]>

* prevent "unknown ioctl 1976" log spam

Signed-off-by: fgierlinger <[email protected]>

---------

Signed-off-by: fgierlinger <[email protected]>
Co-authored-by: Corey Hemminger <[email protected]>
  • Loading branch information
fgierlinger and Stromweld authored Jul 22, 2024
1 parent 4496079 commit 1fb7b9e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packer_templates/scripts/_common/vmware_debian_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@

case "$PACKER_BUILDER_TYPE" in
vmware-iso|vmware-vmx)
# determine the major Debian version we're runninng
major_version="$(grep VERSION_ID /etc/os-release | awk -F= '{print $2}' | tr -d '"')"
architecture="$(uname -m)"

# open-vm-tools for amd64 are only available in bullseye-backports repo
echo "install open-vm-tools"
if [ "$major_version" -eq 11 ] && [ "$architecture" = "aarch64" ]; then
echo 'deb http://deb.debian.org/debian bullseye-backports main' >> /etc/apt/sources.list
apt-get update
cat > /etc/modprobe.d/blacklist.conf <<EOF
blacklist vsock_loopback
blacklist vmw_vsock_virtio_transport_common
EOF
fi
apt-get install -y open-vm-tools;
mkdir /mnt/hgfs;
systemctl enable open-vm-tools
Expand Down

0 comments on commit 1fb7b9e

Please sign in to comment.