Hello @Victor Gomes
Unfortunately you cannot create VM custom image directly from VMSS, but you can use existing custom image that is used by VMSS and modify it.
High Level steps are:
- Create and configure a source VM from VMSS custom image
- Create an Azure Compute Gallery
- Create a specialized image definition
- Create an image version from above VM
- Create a scale set from a specialized image
- Share an image gallery
https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/tutorial-use-custom-image-cli