Configuring an ECS
Scenario
This section describes how to install application software, configure patch update, and install system patches on an ECS.
Prerequisites
- You have obtained the username and password for logging in to the ECS.
- You have created an ECS. See Creating an ECS.
- You have obtained the files listed in Required Software and decompressed Workspace_HDP_WindowsDesktop_Installer_x.x.x.iso to obtain the folder Workspace_HDP_WindowsDesktop_Installer_x.x.x.
Procedure

The operations vary depending on the OS. Follow the instructions on the GUI.
Installing a Windows OS and the VirtIO driver
- Log in to the console.
- Choose Compute > Elastic Cloud Server under All Services.
- Locate the row of the ECS created in Configuring an ECS, and click Remote Login. The window of logging in to a Windows ECS is displayed.
- In the window displayed, click the button of logging in now under VNC login.
- Before installing Windows 11, press any key immediately after logging in using VNC. If the following page is displayed, click Send CtrlAltDel in the upper right corner and then press any key. The normal loading page appears.
If the following page appears repeatedly, click Send CtrlAltDel and press any key until the normal loading page appears.
- Before installing Windows 11, press any key immediately after logging in using VNC. If the following page is displayed, click Send CtrlAltDel in the upper right corner and then press any key. The normal loading page appears.
- Select the language, time, and currency format as required, and click Next.
- Set the keyboard and input method as required and click Next.
- Select the installation option, which is Windows 11 by default. Select the declaration terms and click Next.
If a message is displayed indicating that this PC does not meet the system requirements for Windows 11, the virtualization does not support vTPM. In this case, perform the following operations:
- Restart the server.
- On the page of installation options, press Shift + F10 to open the CLI.
- Add registry entries by running the following commands:
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d "1" /f
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d "1" /f
- Close the CLI and click Next.
- On the Applicable notices and license terms page, click Accept.
- Retain the default disk.
If no default disk is available, perform the following operations:
- Click Load Driver.
- Click Browse.
- Select viostor > w11 > amd64 under CD Driver (X) and click OK.
- Select the driver file corresponding to the ISO version and check the box of hiding drivers incompatible with this computer.
- Click Install and retain the default disk.
- Click Next and click Install.
Wait till the OS installation is complete.
- Select a region as required, for example, China. Click Yes.
- Select a keyboard layout as required. Click Yes.
- Click Skip.
- Configure the network as required.
If no configuration is required, click I don't have internet in the lower left corner, and then click Continue with limited setup.
If I don't have internet is not displayed, press Shift + F10 and enter OOBE\BYPASSNRO in the CLI, and press Enter.
- Set Who Will Use This Computer? Create a user named admin and click Next.
You are advised to create a user named admin. The username and password can be used for subsequent server configuration.
- Enter the password and click Next.
- Enter the password in 15 again and click Next.
- On the displayed Create security questions for this account window, specify three security questions.
- On the Choose privacy settings for your device window, click Next three times, and then click Accept.
- In Let Cortana help you get things done, click Not now or Accept.
- Click Next to agree to the cross-border transfer of personal data. The Windows 11 desktop GUI is displayed.
- Install related drivers for Windows 11.
- Open the computer, select the CD driver (X), and double-click to open it.
- Double-click virtio-win-gt-x64 or virtio-win-gt-x86 based on the OS. Install the driver as prompted.
- After the installation is complete, start Device Manager and check whether the driver has been installed.
- Right-click
and choose Run from the shortcut menu. In the displayed text box, enter devmgmt.msc and press Enter.
- On the Device Manager page, check whether the driver has been installed, as shown in Figure 1.
- Right-click
Follow-up operations
- Check whether the resolution can be changed. If it cannot, address it based on the system boot mode.
- Right-click
and choose Run from the shortcut menu. In the displayed text box, enter msinfo32 and press Enter.
- In the right pane of the System Information dialog box, locate BIOS Mode, as shown in Figure 2.
- If the value of BIOS Mode is UEFI, address the resolution change failure by referring to What Do I Do If I Cannot Change the Resolution of a Windows OS Booted in UEFI Mode?
Skipping network connection activation upon the first startup
- When you log in to Windows 11 for the first time, press Shift+F10 on the network connection page. If the operation fails, press Fn+Shift+F10.
- In the displayed window, enter regedit and press Enter.
- In the displayed window, choose Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE.
- Right-click in the blank area on the right of the registry. In the displayed shortcut menu, create a DWORD (32-bit) value (D). Rename the new value BypassNRO. Double-click BypassNRO to change the DWORD (32-bit) value to 1, and click OK.
- In the command prompt window, enter taskkill /f /im OOBENetworkConnectionFlow.exe and press Enter to skip the network connection.
Disabling the firewall
- In the navigation pane of the Local Group Policy Editor, choose Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile.
The Domain Profile page is displayed, as shown in Figure 3.
- In the right pane, double-click Windows Defender Firewall: Protect all network connections.
The Windows Defender Firewall: Protect all network connections dialog box is displayed.
- Select Disabled.
- Click OK.
- In the navigation pane, choose Standard Profile.
The Standard Profile page is displayed, as shown in Figure 4.
- In the right pane, double-click Windows Defender Firewall: Protect all network connections.
The Windows Defender Firewall: Protect all network connections dialog box is displayed.
- Select Disabled.
- Click OK.
- Close the Local Group Policy Editor window.
- Click Start > Run.
The Run dialog box is displayed.
- Enter services.msc in the Open text box and press Enter.
The Services window is displayed.
- In the right pane, double-click Application Layer Gateway Service.
The Application Layer Gateway Service Properties (Local Computer) page is displayed.
- On the General tab, set Startup Type to Disabled, as shown in Figure 5.
- Click OK.
- Set the Startup Type of Internet Connection Sharing (ICS) and Windows Firewall to Disabled by referring to 45 to 47.
You do not need to configure Windows Defender Firewall for Windows 11.
- Close the Services window.
Disabling Windows update

System update may cause desktop system exceptions (such as blue screen, black screen, and frame freezing). To ensure system stability, verify that the patch package works properly before pushing it.
- On the ECS, right-click
in the lower left corner and choose Run from the shortcut menu.
The Run dialog box is displayed.
- Enter compmgmt.msc in the Open text box and press Enter.
The Computer Management window is displayed.
- In the navigation pane, choose Services and Applications > Services.
The Services page is displayed, as shown in Figure 6.
- In the right pane, double-click Windows Update.
The Windows Update Properties page is displayed.
- On the General tab, set Startup Type to Disabled.
- Go to Recovery. Set First failure to Take No Action.
- Click OK.

- After Cloudbase-Init is installed, it will randomize the password of the Administrator account if application software that takes effect only after a restart is installed. To prevent login failure after randomization, create a temporary account and reset the password of Administrator.
- The Administrator account of Windows OS is disabled by default. You need to enable it.
- If your login using the default password of Administrator fails after the restart, log in as the admin user and reset the password of Administrator. Then log in as the Administrator user again.
Configuring a private DNS
You can configure a private DNS server address for OBS so that Windows ECSs on Huawei Cloud can directly access OBS through the private network.
- On the ECS, click
in the lower left corner, enter cmd, and press Enter.
- Run the ipconfig /all command to check whether the DNS server is at the private DNS address in the region where the ECS resides.
Huawei Cloud provides different private DNS server addresses for different regions. For details, see What Are Huawei Cloud Private DNS Server Addresses?
- Change the DNS server address of the VPC subnet.
Locate the VPC where the ECS resides and change the DNS server address of the VPC subnet to the private DNS address. In this manner, ECSs in the VPC can use the private DNS for resolution and thereby you can access OBS on Huawei Cloud intranet. For details, see Modifying a Subnet.
The private DNS server address must be selected based on the region where the ECS is. For details, see What Are Huawei Cloud Private DNS Server Addresses?
Obtaining required installation packages
- Upload the packages obtained in Required Software, except the OS ISO file, to the OBS bucket used in Registering a Private Image Using an ISO File.
Set the object permission to Public Read.
- Record the link of each package in the OBS bucket.
On OBS Browser+, right-click the package, choose Share from the shortcut menu, and click Copy Link to obtain the download link of the package. You need to download the package within the sharing validity period.
- In the root directory of drive C on the ECS, create a folder, for example, software, for storing the package to be installed.
- Open the browser on the ECS, copy the package link recorded in 61 to the address box, and press Enter to download the package.
- Switch the input mode of the ECS to English.
- Download the required packages in sequence.
- Copy the obtained packages to C:\software.
Installing the 7-Zip
- Go to C:\software to find and decompress the 7-Zip installation package.
Installing the Visual Studio 2017 runtime library
- Go to C:\software to find the vc_redist.x64.exe and vc_redist.x86.exe packages, and double-click to install the Visual Studio 2017 runtime library.
- Restart the ECS.
Enabling a disabled Administrator account
- Right-click
in the lower left corner, enter compmgmt.msc, and press Enter.
- On the Computer Management page, choose Computer Management (Local) > System Tools > Local Users and Groups > Users.
- Right-click Properties from the shortcut menu. Deselect Account is disabled and click OK, as shown in Figure 7.
- Right-click Administrator and choose Set Password from the shortcut menu, as shown in Figure 8. Set the password of the Administrator account as prompted.
- Log out of the ECS and log in to the ECS as the Administrator user.
(Optional) Deleting the Microsoft language package
- Search for Windows PowerShell in the Start menu and click Run as administrator. The Windows PowerShell running page is displayed.
- Delete the Microsoft language package:
Get-Appxpackage -allusers *Microsoft.LanguageExperiencePackzh-CN* | remove-appxpackage
(Optional) Installing the OS patch
- Go to C:\software where the package is stored and install the OS patch.
OS patches are updated by Microsoft on an irregular basis. Pay attention to Microsoft announcements and update the OS in a timely manner.
(Optional) Installing applications
- Go to C:\software where the package is stored and install the application.
Some security software (antivirus software, safeguards, and firewalls) may conflict with the Microsoft encapsulation tool. As a result, desktop creation may fail, and the blue screen of death (BSOD) or black screen may occur on the created desktop. Therefore, install security software only after desktops are provisioned.
(Optional) Installing peripheral drivers
- Go to C:\software where the package is stored and install the peripheral driver.
Installing the Cloudbase-Init software
- Go to C:\software where the package is stored, open the Cloudbase-Init installation package, and install Cloudbase-Init as prompted.
- On the Configuration options page, configure parameters by referring to Figure 9.
The version number in the figure is for reference only. Use the actual version number.
- After the configuration is complete, deselect the options shown in Figure 10.
- Click Finish.
Configuring Cloudbase-Init
- Edit the configuration file C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf\cloudbase-init.conf in the Cloudbase-Init installation path.
- Add the netbios_host_name_compatibility=false configuration item to the last line of the configuration file so that the host name of the Windows OS can contain a maximum of 63 characters.
NetBIOS supports up to 15 characters due to the constraint of Windows OS.
- Add the configuration item metadata_services=cloudbaseinit.metadata.services.httpservice.HttpService to enable the agent to access the OpenStack data source.
- Add the following configuration item to disable Cloudbase-Init restart:
plugins=cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin,cloudbaseinit.plugins.windows.createuser.CreateUserPlugin,cloudbaseinit.plugins.common.sshpublickeys.SetUserSSHPublicKeysPlugin,cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin,cloudbaseinit.plugins.common.localscripts.LocalScriptsPlugin,cloudbaseinit.plugins.common.userdata.UserDataPlugin
- Add the netbios_host_name_compatibility=false configuration item to the last line of the configuration file so that the host name of the Windows OS can contain a maximum of 63 characters.
- In C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf\cloudbase-init-unattend.conf, check whether cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin, exists.
- If yes, delete it and perform subsequent operations.
- If no, perform subsequent operations.
- Add cloudbaseinit.plugins.common.userdata.UserDataPlugin at the end of plugins=. Add a comma (,) in front of the added configuration item.
- If you use a Windows ECS to create an image, change the SAN policy of the ECS to OnlineAll. Otherwise, when you use the image to create ECSs, the disks may be offline.
Windows has three types of SAN policies: OnlineAll, OfflineShared, and OfflineInternal.
Table 1 SAN policies of Windows Type
Description
OnlineAll
All newly detected disks are online.
OfflineShared
All disks on sharable buses, such as iSCSI and FC, are left offline by default, while disks on non-sharable buses are online.
OfflineInternal
All newly detected disks are offline.
- Execute cmd.exe and run the following command to query the current SAN policy of the ECS using DiskPart:
diskpart
- Run the following command to view the SAN policy of the ECS:
- If the SAN policy is OnlineAll, run the exit command to exit DiskPart and close cmd.exe.
- If no, go to 84.c.
- Run the following command to change the SAN policy to OnlineAll:
san policy=onlineall
- Run the exit command to exit DiskPart and close cmd.exe.
- Execute cmd.exe and run the following command to query the current SAN policy of the ECS using DiskPart:
Installing SysAgent and Sysprep
- Open Control Panel on the computer and uninstall HW.SysAgent and HW.SysPrep.
- Double-click HW.SysAgent.Installer_64.msi and HW.SysPrep.Installer_64.msi in C:\software.
Installing AppCenterAgent and AppCenter
- Open Control Panel on the computer and uninstall WKSAppCenterAgent.
- Double-click WKSAppCenterAgent.msi and WKSAppCenter.msi in C:\software.
Deleting a system recovery partition

This operation is required for Windows 10 or Windows 11 images.
- Right-click Start and choose Disk Management from the shortcut menu. Check whether the system disk (generally drive C) has a recovery partition. Go to the next step only when there is a recovery partition.
- Press Win + R, enter cmd, and enter the following content:
diskpart
The diskpart window is displayed.
- Run the following commands in sequence to delete the system recovery partition:
- Print the disk list and select the system disk.
list disk # The number 0 indicates that the selected disk 0 is the system disk. Select a disk as required. select disk 0
- Print the disk partition list and select the recovery partition to be deleted.
list partition # In this example, 4 indicates the number of the recovery partition. Select a value as required. select partition 4
- Delete the recovery partition.
delete partition override
- Print the disk list and select the system disk.
Encapsulating the image
- To create an image that is not encapsulated, perform 5 to 8.
- To create an encapsulated image, perform 5 to 7, and 9.
- If images are not encapsulated, problems may occur on some applications, such as Windows Server Update Services (WSUS).
- Images that are not encapsulated can be provisioned more quickly.
- You must encapsulate the image as the Administrator user.
- Before running the command for encapsulation, you need to modify the permission on the en-US folder in c:\Windows\System32 to allow the administrator to write data to the en-US folder.
- Go to the c:\Windows\System32 directory.
- Right-click the en-US file and choose Properties > Security > Advanced from the shortcut menu. The Advanced Security Settings page is displayed.
- On the displayed page, click Change to change the folder permission to administrator, and click OK.
- Right-click the en-US file and choose Properties > Security.
- On the en-US property page, click Edit. On the en-US permission page that is displayed, click Administrator and select OK on the right of Full control.
- Click OK.
- On the ECS, find the Windows image creation tool in C:\software and decompress it to obtain the Workspace_HDP_WindowsDesktop_XXX folder.
- Right-click
in the lower left corner, enter cmd, and press Enter.
- Switch to the directory containing the template tool:
cd C:\software\Workspace_HDP_WindowsDesktop_Installer_x.x.x
- In the displayed CLI, run the following command to create an image not encapsulated:
run_silent.bat --passive --environment_type 2 --nocheck --noshutdown --nosysprep
- In the displayed CLI, run the following command to create an encapsulated image:
run_silent.bat --passive --environment_type 2 --nocheck --noshutdown
During image creation, the ECS automatically restarts. Do not exit or stop the ECS. After the ECS is restarted, enter the ECS password to proceed with image encapsulation.
Enabling hibernation
- Right-click
in the lower left corner and choose Run from the shortcut menu.
The Run dialog box is displayed.
Run the powercfg -h on command to enable hibernation.
Stopping the ECS
- On the ECS list of the console, locate the row that contains the ECS created in Creating an ECS, and choose More > Stop to stop the ECS.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot