Use the management console to convert the instance OS to your preferred OS.

To change the operating system, you must change the system disk of an instance:

Note
Regions outside of mainland China do not currently support transition between Linux and Windows OSs. If your instance is hosted in one of these regions, you are not allowed to change the operating system between Windows and Linux. You can only change the version of Windows OS, or replace one Linux OS with another Linux OS.