Skip to main content
The Disks section of the image configuration defines the physical disk layout, partition structure, and output artifacts for your Azure Linux image.

Disk Configuration

Each disk entry defines a complete disk layout:
PartitionTableType
string
required
Partition table type: gpt or mbr
MaxSize
number
required
Maximum disk size in megabytes (for virtual disks)
Artifacts
array
Array of artifact definitions specifying output image format
Partitions
array
Array of partition definitions. Omit for rootfs-only images
TargetDisk
object
Required for unattended ISO installer. Defines physical disk for installation

Example Disk Configuration

{
    "Disks": [
        {
            "PartitionTableType": "gpt",
            "MaxSize": 4096,
            "Artifacts": [
                {
                    "Name": "core",
                    "Type": "vhdx"
                }
            ],
            "Partitions": [...]
        }
    ]
}

Artifacts

Artifacts define the output image format and compression:
Name
string
required
Base name for the output artifact
Type
string
Image type: vhd, vhdx, iso, qcow2, etc. Default: raw disk image
Compression
string
Compression format: tar.gz, gz, xz, etc.

VHDX Disk Image

"Artifacts": [
    {
        "Name": "otherName",
        "Type": "vhdx"
    }
]

Compressed Rootfs

"Artifacts": [
    {
        "Name": "core",
        "Compression": "tar.gz"
    }
]
Rootfs artifacts (with compression like tar.gz) do not support partitions.

Partition Configuration

Partitions define the layout of each disk:
ID
string
required
Unique identifier for the partition
Name
string
Partition label. Required when using partlabel mount identifier
Start
number
required
Start offset in megabytes from beginning of disk
End
number
required
End offset in megabytes. Set to 0 to use remaining space
FsType
string
required
Filesystem type: fat32, fat16, vfat, ext2, ext3, ext4, xfs, linux-swap
Flags
array
Special partition flags for boot handling
Type
string
Partition type using friendly name (alternative to TypeUUID)
TypeUUID
string
Partition type UUID (alternative to Type)

EFI Boot + Root Partition

"Partitions": [
    {
        "ID": "boot",
        "Flags": ["esp", "boot"],
        "Start": 1,
        "End": 9,
        "FsType": "fat32"
    },
    {
        "ID": "rootfs",
        "Start": 9,
        "End": 0,
        "FsType": "ext4",
        "Type": "linux-root-amd64"
    }
]

Legacy GRUB Boot + Root Partition

"Partitions": [
    {
        "ID": "boot",
        "Flags": ["grub"],
        "Start": 1,
        "End": 9,
        "FsType": "fat32"
    },
    {
        "ID": "rootfs",
        "Start": 9,
        "End": 0,
        "FsType": "ext4"
    }
]

Three-Partition Layout (EFI + Boot + Root)

"Partitions": [
    {
        "ID": "efi",
        "Flags": ["esp", "boot"],
        "Start": 1,
        "End": 65,
        "FsType": "fat32"
    },
    {
        "ID": "boot",
        "Start": 65,
        "End": 565,
        "FsType": "ext4"
    },
    {
        "ID": "rootfs",
        "Name": "rootfs",
        "Start": 565,
        "End": 0,
        "FsType": "ext4"
    }
]

Partition Flags

Special flags control boot and partition handling:
esp
flag
UEFI ESP (EFI System Partition)
boot
flag
Boot partition
grub
flag
GRUB boot partition
bios_grub
flag
BIOS GRUB boot partition
dmroot
flag
Device mapper root device (for encryption)

Partition Types

Friendly names for partition types (alternative to TypeUUID):
TypeUUIDDescription
linux0fc63daf-8483-4772-8e79-3d69d8477de4Generic Linux filesystem
espc12a7328-f81f-11d2-ba4b-00a0c93ec93bEFI System Partition
xbootldrbc13c2ff-59e6-4262-a352-b275fd6f7172Extended boot loader
linux-root-amd644f68bce3-e8cd-4db1-96e7-fbcaf984b709Linux root (x86-64)
linux-swap0657fd6d-a4ab-43c4-84e5-0933c84b4f4fLinux swap
linux-home933ac7e1-2eb4-4f13-b844-0e14e2aef915Linux home
linux-srv3b8f8425-20e0-4f3b-907f-1a25a76f98e8Linux /srv
linux-var4d21b016-b534-45c2-a9fb-5c16e091fd2dLinux /var
linux-tmp7ec6f557-3bc5-4aca-b293-16ef5df639d1Linux /tmp
linux-lvme6d6d379-f507-44c2-a23c-238f2a3df928Linux LVM
linux-raida19d880f-05fc-4d3b-a006-743f0f84911eLinux RAID
linux-luksca7d7ccb-63ed-4c53-861c-1742536059ccLinux LUKS
linux-dm-crypt7ffec5c9-2d00-49b7-8941-3ea10a5586b7Linux dm-crypt

Using Partition Types

{
    "ID": "rootfs",
    "Start": 9,
    "End": 0,
    "FsType": "ext4",
    "Type": "linux-root-amd64"
}

Target Disk (ISO Installer)

Required for unattended ISO installers to specify installation target:
{
    "TargetDisk": {
        "Type": "path",
        "Value": "/dev/sda"
    }
}

Common Configurations

Virtual Machine (VHDX)

{
    "Disks": [
        {
            "PartitionTableType": "gpt",
            "MaxSize": 4096,
            "Artifacts": [
                {
                    "Name": "core",
                    "Type": "vhdx"
                }
            ],
            "Partitions": [
                {
                    "ID": "boot",
                    "Flags": ["esp", "boot"],
                    "Start": 1,
                    "End": 9,
                    "FsType": "fat32"
                },
                {
                    "ID": "rootfs",
                    "Start": 9,
                    "End": 0,
                    "FsType": "ext4"
                }
            ]
        }
    ]
}

Container Rootfs

{
    "Disks": [
        {
            "Artifacts": [
                {
                    "Name": "core",
                    "Compression": "tar.gz"
                }
            ]
        }
    ]
}
Container rootfs images do not include partitions.

Next Steps

System Configuration

Configure partition mounting and system settings

Examples

View complete configuration examples

Build docs developers (and LLMs) love