Skip to content

Instantly share code, notes, and snippets.

@lennysh
Last active July 28, 2021 10:39
Show Gist options
  • Save lennysh/974a779299cb65bca3eda2c10d05f781 to your computer and use it in GitHub Desktop.
Save lennysh/974a779299cb65bca3eda2c10d05f781 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Script to install the virtual packages for Hyper-V in Debian
echo "Installing the needed packages..."
apt install hyperv-daemons
echo ""
echo "Making the needed changes to '/etc/initramfs-tools/modules' ..."
echo "" >> /etc/initramfs-tools/modules
echo "# Hyper-V Modules" >> /etc/initramfs-tools/modules
echo "hv_vmbus" >> /etc/initramfs-tools/modules
echo "hv_storvsc" >> /etc/initramfs-tools/modules
echo "hv_blkvsc" >> /etc/initramfs-tools/modules
echo "hv_netvsc" >> /etc/initramfs-tools/modules
echo "hv_balloon" >> /etc/initramfs-tools/modules
echo "hv_utils" >> /etc/initramfs-tools/modules
echo ""
echo "Running 'update-initramfs -u' ..."
update-initramfs -u
echo ""
echo "Please reboot to finish..."
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment