Azure VM-image-Ubntu 22.04 Data Disk Partition

Amila Goonatillake 0 Reputation points
2024-04-13T13:35:23.66+00:00

I wanted to save my data in a separate azure data disk not in by default os disk. So I created a new data disk and wants to partition the disk and create file system and added a mount directory for the data disk I created. Also I added mount in persistent way in /etc/fstab file as well. But after I reboot the VM I cannot ssh or do any work because its giving error in the vm saying "VM agent is not ready state" .

So my question is why VM crashes after I just did partitioning steps for the newly created data disk attached ? Should I even have to do this kind of partition for azure data disk attached?

I'm using VM Image as 22_04-lts-gen2 Ubuntu and publisher is "Canonical"

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,144 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
572 questions
{count} votes

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 24,206 Reputation points Microsoft Employee
    2024-04-15T05:58:39.71+00:00

    Hello Amila Goonatillake

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    Ubuntu 22.04 LTS is a supported image on Azure.

    The error message "VM agent is not ready state" that you shared, indicates that the VM agent is not running or not in a ready state. It could be due to some misconfiguration or issue with the VM. You can try restarting the VM to see if it resolves the issue. If the issue persists, you can check the VM logs to identify the root cause of the issue.

    Partitioning the disk and creating a file system is a common practice when you want to use a data disk in Linux VMs. However, it is not necessary to partition the disk and create a file system if you are using Azure Managed Disks. Azure Managed Disks are already partitioned and formatted with a file system, so you can directly use them without any additional configuration.

    Few Troubleshooting steps:

    -When you modify the /etc/fstab file to include entries for mounting disks, it's essential to ensure that the entries are correct and won't cause issues during boot. Mistakes in fstab entries can lead to boot failures or unexpected behavior. Double-check your fstab entries to ensure they are correct.

    -Consider whether manual partitioning of the data disk is necessary for your use case, and if not, try attaching the disk without partitioning it.

    Hope this helps.