Import an image

更新时间:
复制 MD 格式

If the images provided by Elastic Desktop Service (EDS) Enterprise do not meet your business requirements, you can create a custom image and import it to the Elastic Desktop Service (EDS) Enterprise console. You can then use the custom image to create a cloud computer.

Prerequisites

  • If you are a RAM user, you must first contact the Alibaba Cloud account owner to grant you permission to import images for Elastic Desktop Service (EDS) Enterprise and operate Object Storage Service (OSS) buckets.For more information, see Grant a RAM user system permissions for Elastic Desktop Service (EDS) Enterprise.

  • You have activated Object Storage Service (OSS). For instructions, see Activate OSS.

  • If you create a custom image on a VM, ensure that you have a stable network connection.

Limitations

Before you create and import a custom image, note the following limitations:

  • Alibaba Cloud does not guarantee the security of imported custom images. You are responsible for the image content.

  • You can import only Windows images. Linux images are not supported.

  • Only Windows Professional and Enterprise editions are supported. Windows Home edition is not supported.

  • The following Windows image versions are not supported:

    • Windows XP

    • Windows 7

    • Windows 8

    • Windows 8.1

  • You cannot import ISO image files.

    • If you have an ISO image file, you must first create a VM from it, then install and configure the operating system as described in this topic to create an importable image for Elastic Desktop Service (EDS) Enterprise.

    • If you have an image file in a format such as VDI, you must convert it to a supported format before importing it into Elastic Desktop Service (EDS) Enterprise. See Convert image formats for instructions.

  • Images that use the UEFI boot mode are not supported. Use the BIOS boot mode instead.

Before you begin

Procedure

Step 1: Create a VM

The following steps use VirtualBox 7.0.4 as an example. Steps may differ for other versions.

  1. Open VirtualBox.

  2. In the upper-right corner, click New.

  3. Select Name and Operating System, enter a name for the VM, and select the operating system type and version.

  4. Select Hardware and set the memory size and number of CPUs.

    Important
    • You can set the memory size and number of CPUs as needed. These settings do not affect the cloud computer specifications.

    • Elastic Desktop Service (EDS) Enterprise does not support EFI boot. Do not select Enable EFI.

  5. Select Hard Disk, choose a file location, and set the disk size and type.

    Note
    • We recommend a disk size of 40 GB. You can resize the disk in the console later.

    • Elastic Desktop Service (EDS) Enterprise supports importing images only in RAW, VHD, and QCOW2 formats. If you select a different disk type, you must convert the format before importing the image. We recommend selecting VHD (Virtual Hard Disk) as the disk type.

  6. Confirm the VM information and click Finish.

Step 2: Install Windows OS

Install the Windows operating system on the VM you created.

Important

UEFI mode is not supported for OS installation. Use BIOS mode instead.

  1. Open VirtualBox.

  2. Find the new VM and click Start.

  3. Install the Windows operating system. Select the required installation parameters and wait for the installation to complete.

  4. Delete the system recovery partition.

    Warning

    The system disk must have only the boot partition (drive C). Extra partitions may prevent the instance from starting or block disk resizing.

    FAQ: When I create a cloud computer by importing an image, I select a 100 GiB system disk. Why is the system disk of the created cloud computer only 40 GiB?

    This occurs because the system recovery partition was not deleted. Using a disk partitioning tool to allocate space in this state will make the cloud computer unusable.

    1. Open the DiskPart window.

      You can open it by entering diskpart in the search box, or by running the diskpart command in Windows PowerShell.

    2. Run the list disk command to view the list of disks.

    3. Run the select disk <disk_number> command to select the target disk.

      For example: select disk 0. Replace the disk number with the actual one for your use case.

    4. Run the list volume command to view the disk partitions.

      • If a recovery partition (Recovery Partition) is in the Volume list, run the following commands:

        1. Run the select volume <partition_number> command to select the target partition.

          For example: select volume 1. Replace the partition number with the actual one for your use case.

        2. Run the delete part override command to delete the partition.

          If the deletion fails, use another disk tool to format the disk, then retry.

      • If the Volume list does not contain a recovery partition, no action is required.

Step 3: System configuration

  1. Install the Cloud Assistant Agent.

    Click the Cloud Assistant Agent download link to download and install the agent.

    Important
    • After you install the Cloud Assistant Agent, verify that the Aliyun Assist Service is running. If not, restart the VM and the service.

      Check Task Manager. If AliyunService shows as Running, the service started successfully.

    • On some Windows versions, the Cloud Assistant Agent may not auto-start after image deployment. Place a shortcut to the service executable in the Windows Startup folder to ensure auto-start.

      • The path to the Cloud Assistant Agent is C:\ProgramData\aliyun\assist\<agent_version>\aliyun_assist_service.exe.

      • The path to the Startup folder for some Windows versions is C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp.

  2. Open Windows PowerShell and run the following command to disable User Account Control (UAC).

    reg.exe add HKLM\Software\MicroSoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
  3. Run the netsh advfirewall set allprofiles state off command to disable the Windows built-in firewall.

Step 4: Get Windows image file

Locate the Windows image file you created.

The image file is at the Folder path specified when you created the VM.

Note

If you manually changed the path after creating the VM, use the updated path.

Step 5: Upload image file to OSS

Upload the image file to an OSS bucket before importing it into the console.

  1. Get the OSS bucket address from the console.

    1. Log on to the EDS enterprise console.

    2. In the left-side navigation pane, choose Images Center > Image.

    3. On the Image page, click Create Image.

    4. In the Create Image panel, click the Import Image tab.

    5. Under Get OSS Bucket Address, click Obtain, and then click Copy to save the address.

  2. Log on to ossbrowser.

    ossbrowser 2.0

    For more information, see Log on to ossbrowser 2.0.

    1. On the AK Logon tab, enter the following information:

      • AccessKeyId and AccessKeySecret: Obtain an AccessKey pair (AccessKeyId and AccessKeySecret) for your Alibaba Cloud account or RAM user. For instructions, see Create an AccessKey pair.

        Important

        The AccessKeyId and AccessKeySecret that you enter must belong to the account you use to log on to the console:

        • If you use an Alibaba Cloud account to log on to the console, enter the AccessKeyId and AccessKeySecret of that account.

        • If you use a RAM user to log on to the console, enter the AccessKeyId and AccessKeySecret of that RAM user.

      • endpoint:

        • For public cloud regions, select Public Domain Name.

        • For regions such as Beijing Government Cloud, Hangzhou Finance Cloud, and Shanghai Finance Cloud, ossbrowser 2.0 is not supported. Use ossbrowser instead.

      • Preset OSS Path: Enter the OSS bucket address obtained from the console.

        Note

        The address copied from the console starts with oss://. Remove this prefix before pasting. Otherwise, an error occurs.

    2. In the upper-right corner, click Advanced Settings.

    3. From the Default Region drop-down list, select the region of the OSS bucket, then click Logon.

      Note

      If the region is a finance cloud or government cloud region, no changes are required.

    ossbrowser

    For more information, see Install ossbrowser 1.0.

    • endpoint:

      • For public cloud regions, select Default (Public Cloud).

      • For the Hangzhou Finance Cloud region, select Custom and enter https://oss-cn-hzfinance.aliyuncs.com in the text box to the right.

      • For the Beijing Government Cloud region, select Custom and enter https://oss-cn-north-2-gov-1.aliyuncs.com in the text box to the right.

    • AccessKeyId and AccessKeySecret: Obtain an AccessKey pair (AccessKeyId and AccessKeySecret) for your Alibaba Cloud account or RAM user. For instructions, see Create an AccessKey pair.

      Important

      The AccessKeyId and AccessKeySecret that you enter must belong to the account you use to log on to the console:

      • If you use an Alibaba Cloud account to log on to the console, enter the AccessKeyId and AccessKeySecret of that account.

      • If you use a RAM user to log on to the console, enter the AccessKeyId and AccessKeySecret of that RAM user.

    • Preset OSS Path: Enter the OSS bucket address obtained from the console.

    • Region: The region of the OSS bucket.

  3. Upload the image file to the bucket.

    Important

    Elastic Desktop Service (EDS) Enterprise supports importing image files only in RAW, VHD, and QCOW2 formats. The files cannot be compressed. If your image file is in another format, you must convert it. For instructions, see Convert image formats.

  4. Obtain and record the OSS Object address.

    ossbrowser 2.0

    1. In the row of the uploaded image, click the ... icon in the Actions column and select Get Address.

    2. In the Get Address dialog box, enter a validity period (such as 3600 seconds), click Generate, then click Copy Address.

    ossbrowser

    In the row of the uploaded image, click Get Address to obtain and record the OSS Object address.

Step 6: Import the image

  1. Log on to the EDS enterprise console.

  2. In the left-side navigation pane, choose Images Center > Image.

  3. In the top navigation bar, select a region.

  4. On the Image page, click Create Image.

  5. In the Create Image panel, click the Import Image tab.

  6. Configure the following parameters.

    Parameter

    Description

    Image Name

    Enter a name for the image.

    Note

    The name must be 2 to 128 characters in length, start with a letter or Chinese character, and cannot start with http:// or https://. It can contain digits, colons (:), underscores (_), and hyphens (-).

    Region

    This must match the region of the OSS bucket.

    OSS object address

    Enter the OSS object address obtained in the previous step.

    Image Name

    Enter the image name as prompted on the UI.

    OS

    Only Windows images are supported.

    System Disk (GiB)

    Enter the system disk size.

    The system disk size must be larger than the image file size. Valid range: 5 to 500 GiB.

    GPU Driver

    To use this image for GPU-accelerated cloud computers with Enterprise Graphics instance types, select Yes.

    Agreement Type

    Keep the default value.

    License Type

    Select the image activation method.

    Bring Your Own License (BYOL): Activate the image by using your own license.

    Protection Capability

    To use antivirus and vulnerability scanning from Alibaba Cloud Security Center on your cloud computer, select Enable.

  7. Click OK.

What to do next

After importing the image, create a cloud computer template and use it to create cloud computers.

FAQ

Resolve AccessDenied error in ossbrowser

Symptoms

When you log on to ossbrowser to upload an image, the AccessDenied: the bucket you access does not belong to you. error appears after entering your AccessKeyId and AccessKeySecret.

Cause

The AccessKeyId and AccessKeySecret do not match the account logged in to the console.

Solution

Ensure the AccessKeyId and AccessKeySecret used for ossbrowser match the account used for the console.

  • If you use an Alibaba Cloud account to log on to the console, enter the AccessKeyId and AccessKeySecret of that account.

  • If you use a RAM user to log on to the console, enter the AccessKeyId and AccessKeySecret of that RAM user.

Using an Alibaba Cloud account's AccessKeyId and AccessKeySecret poses a high security risk. For better security, use a RAM user's credentials for both the console and ossbrowser.

Note

Before a RAM user can log on to the console, you must grant the AliyunECDFullAccess permission to that user. For instructions, see Grant system policies of Elastic Desktop Service (EDS) Enterprise to a RAM user.