Alright, this was a bit of hard to hunt down, basically open-vm-tools don’t work for Hyper-V since they are focused for VMWare.

This actually became quiet a head-scratcher for me to make sure my VMs stay healthy. After some searches and hit and try methods, i came up with the following steps.

Step 1: ssh into your Rocky Linux:

ssh username@rockylinuxip

Step2 : update your Rocky Linux:

sudo dnf update -y

Step 3: Install UDF Filesystem support.

sudo dnf install udftools
sudo modprobe udf

Step 4: Install Hyper-V specific integration packages:

Step 4A: Use the following if you are not using Azure and only using Hyper-V

sudo dnf install cloud-init cloud-utils-growpart gdisk hyperv-daemons
sudo systemctl enable cloud-init.service

Step 4B: Use the if you are using Azure

sudo dnf install WALinuxAgent cloud-init cloud-utils-growpart gdisk hyperv-daemons
sudo systemctl enable waagent.service
sudo systemctl enable cloud-init.service

Step 4: Reboot

And you are done, The steps above is enough for integrating Rocky Linux 8.x to your Hyper-V 2016 and up enviornment. If you need to do an integration for Azure specifically i recommend you to follow recommended steps from Microsoft for RHEL, Rocky Linux 8.x, Alma Linux 8.x and Oracle Linux 8

https://docs.microsoft.com/en-us/azure/virtual-machines/linux/redhat-create-upload-vhd

Categorized in:

Hyper-V, Linux,

Last Update: November 7, 2023