ECS does not support importing ISO images directly. You must use VirtualBox to create a virtual machine, install an operating system, and then export the image in VMDK or VHD format, which ECS supports.
Procedure
Follow these steps if you have already installed the VirtualBox tool and prepared an ISO image file.
This example uses VirtualBox version 7.1.0 to install Windows Server 2022 Datacenter Evaluation with a graphical interface.
Step 1: Create a virtual machine
Configure the environment.
Open
Oracle VirtualBox. Click Global Settings and switch to the Expert tab.Customize the Default Machine Folder, then click OK.
Virtual machine files take up significant disk space. Store them on a data disk if possible.
Create a virtual machine.
Click New. In the Name and operating system section, set the following parameters.
Name: Enter a custom name for the virtual machine.
ISO Image File: Select the prepared ISO image file.
Skip Unattended Installation: Check Skip Unattended Installation.
In the Hard disk section, select Create a virtual hard disk now.
Hard disk file type: Choose VHD or VMDK format to ensure the image can be imported into ECS without additional conversion.
Click Complete to create a virtual machine.
Step 2: Install the operating system
BIOS: A traditional firmware interface used to initialize hardware and load the operating system. It is mainly used for compatibility with older operating systems (such as Windows XP and earlier versions).
UEFI: A modern replacement for BIOS that supports Secure Boot and offers faster startup times.
The instance type and the image boot mode must match. If they do not match, the instance might fail to start. For details, see Boot mode rules.
BIOS
Set the virtual machine boot mode to BIOS.
Select the new virtual machine and click Settings in the menu bar.
Under System, make sure Enable EFI (special OSes only) is not checked.
Install the operating system.
Click Start in the menu bar.
Follow the on-screen prompts to select your preferred language and other options. Click Next, then click Install now.
Select the operating system to install and click Next.
Accept the Microsoft Software License Terms and click Next.
Click Custom: Install Only Microsoft Server Operating System.
Repartition the disk.
Automatic installation creates a recovery partition at the end of the system disk, which blocks later expansion of the primary partition. Repartition manually instead.
On the Operating System Installation Location interface, hover over Hotkeys in the menu bar, click , and press the
ShiftandF10keys to open the command line window.Run the
diskpartcommand to open the partitioning tool.Clean the target disk.
# Select target disk 0. select disk 0 # Clean all partitions. cleanCreate partitions.
# (Optional) Create a boot partition for boot files. This example uses 200 MB; keep it under 300 MB. create partition primary size=200 active # Mark the partition as active. # Create the primary partition for the operating system. create partition primary # List partitions. Two main partitions indicate success. list partitionType
exittwice and press Enter each time to close the command prompt.
On the Where do you want to install Windows? screen, click Refresh to load the new partition information.
Select the primary partition and click Next. Wait for the operating system installation to complete.
Log on to the operating system.
After installation, the system starts automatically. Follow the prompts to set a password.
Hover your cursor over Hotkeys in the menu bar, and click to unlock the screen.
Enter your custom password to log on.
Confirm successful BIOS-mode boot.
Right-click the
icon and open Disk Management. Verify that Disk 0 shows the system partition as Healthy.Right-click the
icon, select Run, type msinfo32, and press Enter to open System Information. Check that BIOS Mode shows Legacy. This confirms successful BIOS-mode boot.
UEFI
Set the virtual machine boot mode to UEFI.
Select the new virtual machine and click Settings in the menu bar.
Under System, check Enable EFI (special OSes only) and click OK.
Create an operating system.
Select the new virtual machine and click Start in the menu bar.
When the message press any key to boot from CD or DVD appears, press any key to load the installer.
Follow the on-screen prompts to select your preferred language and other options. Click Next, then click Install now.
Select the operating system to install and click Next.
Accept the Microsoft Software License Terms and click Next.
Click Custom: Install Only Microsoft Server Operating System.
Repartition the disk.
Automatic installation creates a recovery partition at the end of the system disk, which blocks later expansion of the primary partition. Repartition manually instead.
On the Installation Location Of The Operating System interface, hover over Hotkeys in the menu bar, click , and press
ShiftandF10to open the command-line window.Run the
diskpartcommand to open the partitioning tool.Clean the target disk.
# Select target disk 0 select disk 0 # Clean all partitions cleanConvert the disk to GPT format for UEFI boot.
convert gptCreate partitions.
# UEFI requires an EFI system partition for boot files. This example uses 200 MB; keep it under 300 MB. create partition efi size=200 # Create the primary partition for the operating system. create partition primary # List partitions. Two partitions (EFI system and primary) indicate success. list partitionType
exittwice to close the command prompt.
On the Where do you want to install Windows? screen, click Refresh to load the new partition information.
Select the primary partition and click Next. Wait for the operating system installation to complete.
Log on to the operating system.
After installation, the system starts automatically. Follow the prompts to set a password.
Hover your cursor over Hotkeys in the menu bar, and click to unlock the screen.
Enter your custom password to log on.
Confirm successful UEFI-mode boot.
Right-click the
icon and open Disk Management. Verify that Disk 0 shows the EFI system partition as Healthy.Right-click the
icon, select Run, type msinfo32, and press Enter to open System Information. Check that BIOS Mode shows UEFI. This confirms successful UEFI-mode boot.
Step 3: System configuration
Enable Remote Desktop connections to Windows.
Click the
icon and open Control Panel.In Control Panel, select System and Security.
Under System, click Allow remote access.
On the Remote tab, confirm that Allow remote connections to this computer is checked.
Disable the built-in Windows firewall.
In Control Panel, under System and Security, click Check firewall status under Windows Defender Firewall.
In the navigation pane on the left, select Turn Windows Defender Firewall on or off.
On the Customize settings for each network location page, set both Private network settings and Public network settings to Turn off Windows Defender Firewall.
What to do next
Install Vminit to ensure the ECS instance running the image completes initialization successfully.
Install virtio drivers. Before importing the image, verify and install virtio drivers to prevent the ECS instance from failing to start.