'How to create Azure VM with Linux custom Partion using Packer

I am exploring Azure cloud, If I install virtual machine it comes cloud provider enabled partitions,

But what I need to achieve is custom partitions and I am Planning use Packer if it is possible with Packer.

Is it possible to create Ubuntu Linux Azure image with custom partitions.

/root = 20GB
/tmp = 10GB
/var = 30GB

I should use LVM as well.

I searched documents, I could find any desired documents for the same. if anybody provides me example of config or documentation it would be really great.



Solution 1:[1]

When using a single disk, has to decide the partition method to be used, and nowadays, it could be either MBR or GPT (GUID Partition Table). The first is older, and it is dated from the decade.

The partition may help to address some common issues, such as the use of different file systems, logical separation of data, and so forth.

The MBR is older, and it has some limitations, such as the maximum of four primary partitions in a disk, or three primary and one extended that allows 12 logical partitions. However, the maximum partition size is 2TB. The GPT is more flexible, allowing 128 partitions out of the box and virtually 8 zebibytes (ZiB)

For more information about you can achieve that you many refer this document

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 RahulKumarShaw-MT