Disk UUIDs and Linux on Azure

I recently ran a few tests to figure out how UUIDs behave on Azure when we capture VM Images, copy VHDs, move Virtual Machines and re-provision them in different data centers.

My observations have shown me that UUIDs do not change unless one of the following actions is performed on the VHD partition:

  1. UUIDs are assigned when we create a File System.
  2. UUIDs change if we use tune2fs to change the UUID or if we use mkfs to replace the File System.

Each Virtual Machine has a Temp Disk (sdb). This is a physical disk, and we should never take a UUID dependency on it. The reason for this warning, is that its UUID is to be considered volatile. It changes every time Azure moves the Virtual Machine to a host. It may also change if the Azure Fabric replaces the Temp Disk File System.

Lastly, it’s important to note that the UUID of a Virtual Machine OS Disk is assigned when it is created. On CentOS Virtual Machines, the root is mounted using the UUID. Don’t worry thought, it will not change.

In the following scenarios, I noticed that the UUIDs are unaffected:

  1. When we copy VHDs, the UUIDs do not change.
  2. When we deploy a VM using a VM Image, the UUIDs remain the identical.
  3. When we capture an image with attached data disks, the OS Disk UUID remains, and we must make copies of the attached Data Disks.

In this last scenario, a copy of the Data Disks is required to keep the Data Disk UUIDs. Without these disks, a Virtual Machine created from the VM Image would result in a prompt a boot time. This prompt appears because the Virtual Machine is unable to find the Partition UUIDs that match the UUIDs from the fstab. Ultimately, this can result in a failed deployment and create can be challenging to troubleshoot and fix.

Trackbacks and Pingbacks:

  1. Dew Drop – September 2, 2015 (#2082) | Morning Dew - September 2, 2015

    […] Disk UUIDs and Linux on Azure (Alexandre Brisebois) […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.