Hello @Avinash Awasthi
Welcome to Microsoft Q&A Platform, thanks for posting your query here.
As mentioned by Boris in the previous response, make sure you take a backup before you proceed performing the steps mentioned in the article you have shared.
However, as per official Azure Documentation it is not possible to convert an Azure Generation 1 VM to a Generation 2 VM.
To change the virtual machine generation, you need to deploy a new VM of the generation you desire and re-install the software that you are running in the virtual machine of the generation. This change only affects the base VHD image of the VM and has no impact on the data disks or attached NFS or SMB shares. Data disks, NFS, or SMB shares that originally were assigned to, for example, on a Generation 1 VM.
Hope this helps.
If you need further help on this, tag me in a comment.
If the suggested response helped you resolve your issue, please 'Accept as answer', so that it can help others in the community looking for help on similar topics.