Ensure your custom Windows images meet these requirements before importing them to Alibaba Cloud or releasing them in Alibaba Cloud Marketplace.
Disk partitions
Disk partitions for Alibaba Cloud images must meet the following requirements:
-
Disk size: The system disk must be at least 20 GiB. The recommended size is 40 GiB.
-
Partitions: Requirements are listed in the following table.
ImportantConfigure your local image to support either BIOS or UEFI boot mode to accommodate various instance types. When you import the image, ensure the boot mode setting matches the actual boot mode.
-
To configure the boot mode when creating a local image, see Create a VM and install OS.
-
To set the boot mode during image import, see Import a custom image.
-
Call the DescribeInstanceTypes operation to query supported boot modes for an instance type. Check the
SupportBootModesresponse parameter.
Partition type
BIOS boot mode
UEFI boot mode
System partition
-
Required.
-
Type: primary partition.
-
Minimum size: 100 MiB.
-
Must be active and non-read-only.
-
File system: NTFS.
-
Required.
-
Type: EFI partition.
-
Minimum size: 100 MiB.
-
File system: FAT32.
Windows partition
-
Required.
-
Type: primary partition.
-
Minimum size: 20 GiB.
-
Must be active and non-read-only.
-
File system: NTFS.
Important-
Both the system partition and Windows partition are required. They can be separate partitions.
-
The Windows partition must be the last partition. Otherwise, system disk resizing may fail.
Other partitions
Includes recovery, reserved, and data partitions. Not recommended.
-
Required software and tools
-
Install Cloud Assistant
Cloud Assistant is a native automated O&M tool for ECS that runs shell, PowerShell, and batch commands on instances without passwords or jump servers. Use it for automated O&M, process polling, software management, service control, and patch updates. See Install the Cloud Assistant Agent.
-
Use Security Center to protect the server
Security Center provides alert notifications, virus detection and removal, webshell detection, client protection, and image scanning to protect cloud and on-premises servers.
-
Install the virtio driver
The virtio driver ensures the image works on ECS instances. See Install the virtio driver.
System configuration suggestions
Configure the following system settings when creating Alibaba Cloud images:
-
Enable Remote Desktop
Enable Remote Desktop Connection for Alibaba Cloud Marketplace images.
-
Configure registry settings for Remote Desktop:
Key
Item
Recommended value
Description
HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server
fDenyTSConnections
0
Enables Remote Desktop Connection.
HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
UserAuthentication
1
Enables Network Level Authentication (NLA).
-
Allow inbound access to port 3389.
Windows RDP uses port 3389. Configure firewall rules to allow inbound access to this port.
-
-
Enable automatic paging file management
Run
Wmic computersystem set AutomaticManagedPagefile=Trueto let the system automatically adjust paging file sizes and directories based on memory usage.NoteA paging file is a Windows virtual memory mechanism that transfers infrequently used data from memory to disk, freeing memory for active data.
-
Disable power hibernation
Run
powercfg.exe /h offto disable hibernation and delete the Hibernate.sys file, reducing image size.NoteHibernation saves the system state to a file on disk and shuts down the computer, allowing quick restoration to the previous state when resumed.
System security recommendations
Configure the following security settings when creating Alibaba Cloud images:
-
Enable Microsoft Defender
Enable Microsoft Defender and update virus definitions. Microsoft Defender provides anti-malware and web protection.
-
Start Microsoft Defender.
MpCmdRun.exe -wdenable -
Update virus definitions to detect the latest threats.
MpCmdRun.exe -RemoveDefinitions -DynamicSignatures MpCmdRun.exe -SignatureUpdate
-
-
Install security patch updates.
Install the latest security patches.
-
Install the Malicious Software Removal Tool (MSRT).
MSRT protects Windows computers from prevalent malware by finding and removing threats and reverting their changes. It is released monthly as part of Windows Update or as a standalone tool. Download MSRT.
Clear image information
Clear logs, historical records, and residual files generated during image creation to minimize image size and remove sensitive information.
-
Clear browser records.
-
Clear Windows Update logs.
-
Clear event records.
-
Clear system logs.
-
Clear temporary files.
-
Clear Windows Update temporary and log files.