Hi TJ Jones,
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
NVMe temporary storage is ephemeral, meaning it resets every time the VM is stopped or deallocated. Even if you manually format and configure a swap file, this setup is lost when the VM is shut down or deallocated.
create a script to automatically format the NVMe storage and configure the swap file every time the VM starts. The swap file must be placed on the NVMe temporary storage after it is initialized. Use the Azure Custom Script Extension to deploy the script during VM provisioning. This extension ensures the script is executed on every VM boot.
Please let us know if you have any further queries. Thank you.