An Azure service that is used to provision Windows and Linux virtual machines.
On Azure marketplace RHEL images the OS disk is prebuilt with XFS and you cannot change that from the Azure VM creation UI because the filesystem already exists inside the image. If your requirement truly means every disk including the root OS disk must be EXT4, you need to deploy from a custom image where the OS was installed with EXT4 instead of XFS. The usual approach is to create a temporary VM from a RHEL ISO or a generic RHEL image in another environment, run a manual installation using the RHEL installer or a kickstart file where you explicitly select EXT4 for all mount points, then generalize the VM and capture it as an Azure Managed Image or Shared Image Gallery image and deploy new VMs from that image.
If the requirement applies only to data disks, you can attach managed disks after deployment and format them as EXT4 inside the VM because Azure does not enforce filesystem type on data disks. After attaching a disk you identify it and create an EXT4 filesystem and mount it with commands like:
lsblk
sudo parted /dev/sdc --script mklabel gpt mkpart primary ext4 0% 100%
sudo mkfs.ext4 /dev/sdc1
sudo mkdir /data
sudo mount /dev/sdc1 /data
echo '/dev/sdc1 /data ext4 defaults,nofail 0 2' | sudo tee -a /etc/fstab
If you want automated provisioning you can use cloud-init or a custom script extension to format all non-OS disks as EXT4 during first boot. A simple cloud-init snippet would look like:
#cloud-config
disk_setup:
/dev/sdc:
table_type: gpt
layout: true
overwrite: true
fs_setup:
- label: data1
filesystem: ext4
device: /dev/sdc1
mounts:
- ["/dev/sdc1", "/data", "ext4", "defaults,nofail", "0", "2"]
If you confirm the software requires EXT4 even for the root filesystem, the only viable Azure-native solution is building a custom RHEL image with EXT4 during OS installation using kickstart such as:
part /boot --fstype=ext4 --size=1024
part / --fstype=ext4 --grow --size=10240
part swap --recommended
Then deprovision and capture the VM:
sudo waagent -deprovision+user -force
Create an Azure image from the stopped VM and deploy future VMs from that image so every disk starts as EXT4.
For more details, refer to https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/deploying_rhel_8_on_microsoft_azure/assembly_deploying-a-rhel-image-as-a-virtual-machine-on-microsoft-azure_cloud-content-azure
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin