Skip to content

Commit

Permalink
fix open-vm-tools installation in debian11
Browse files Browse the repository at this point in the history
Signed-off-by: fgierlinger <2966031+fgierlinger@users.noreply.github.com>
  • Loading branch information
fgierlinger committed Jun 24, 2024
1 parent 6fe9fa2 commit 4bb4272
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 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,16 @@

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
fi
apt-get install -y open-vm-tools;
mkdir /mnt/hgfs;
systemctl enable open-vm-tools
Expand Down

0 comments on commit 4bb4272

Please sign in to comment.