Copied.
How Do I Configure Software During Image Creation?
If the software required for creating an image fails to be automatically deployed using a script, perform the steps below to manually configure the software.
Activating the VM Administrator Account
The Administrator account is used to configure the cloud server and encapsulate images.
- On the menu bar of the cloud server, right-click Start and choose Run from the shortcut menu. Enter compmgmt.msc and press Enter.
- On the Computer Management page, choose Computer Management (Local) > System Tools > Local Users and Groups > Users.
- In the right pane, right-click Administrator and choose Properties.
The Administrator Properties window is displayed.
- On the General page, deselect Account is disabled, and click OK.
The Administrator account is activated, and its default password is empty.
- Right-click Administrator and choose Set Password.
- Set a password for the Administrator account and ensure that the password is not empty. Otherwise, the task execution will fail.
- Password requirements:
- Contains at least one uppercase letter (A–Z), one lowercase letter (a–z), one digit (0–9), and one special character (~!@#$%^&*()-_=+\|{};:'",<.>/? or space).
- Contains 8 to 32 characters.
- Cannot be the same as the recent three passwords.
- Cannot contain the username or the username spelled in reverse.
- Click Proceed. The Set Password for Administrator dialog box is displayed.
- Set a password for the Administrator account, confirm the password, and click OK.
The password is set.
- Click OK.
- On the menu bar of the cloud server, right-click Start and choose Shut down or sign out > Sign out.
- Log out of the cloud server and log in to the cloud server as the Administrator user.
- On the Choose privacy settings for your device window, click Next three times, and then click Accept.
- Click Next to agree to the cross-border transfer of personal data. The Windows desktop GUI is displayed.
Installing VirtIO Drivers
For a VM installed using a Windows image, the NIC driver becomes available only after the VirtIO driver is installed.
- On the cloud server, choose Start > File Explorer. In the left pane, select the CD drive (X) and double-click to open it.
- Double-click virtio-win-gt-x64 and install it as prompted.
- Start Device Manager and check whether the driver has been installed.
- Right-click Strat 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.
Enabling the Group Policy That Allows Standard User Groups To Shut Down Windows
- On the VM, right-click Start and choose Run. In the Run text box, enter gpedit.msc and press Enter.
The Local Group Policy Editor window is displayed.
- In the Local Group Policy Editor navigation pane, choose Computer Configuration > Windows Settings > Security Settings > Local Policies > User Rights Assignment, as shown in Figure 2.
- In the right pane, double-click Shut down the system. The Shut down the system Properties dialog box is displayed.
- Click Add User or Group. The Select Users or Groups dialog box is displayed.
- Click Object Types, select Groups, and click OK.
- In the Enter the object names to select area, enter Users to query and add the Users group to the policy.
- Click OK.
- Click OK.
Disabling the Firewall
- On the menu bar of the cloud server, right-click Start and choose Run from the shortcut menu. Enter gpedit.msc and press Enter.
- 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 and 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 Firewall: Protect all network connections dialog box is displayed.
- Select Disabled and click OK.
Disabling Fast Startup
- On the menu bar of the cloud server, right-click Start and choose Run from the shortcut menu. Enter control and press Enter.
- On the Control Panel page, choose System and Security > Power Options. In the left pane, click Choose what the power button does, as shown in Figure 5.
- Click Change settings that are currently unavailable, as shown in Figure 6.
- Deselect Turn on fast start-up, as shown in Figure 7.
- Click Save changes.
Configuring NIC Persistence Using Group Policies
- Create a startup script named DisableChecksum.ps1 in the C:/Windows/Setup/Scripts directory on the cloud server.
- If there is no Scripts directory, create it manually.
- This step is mandatory only for Windows 11.
- Copy the following content to DisableChecksum.ps1:
$adapters = Get-NetAdapter | Where-Object {$_.MediaConnectState -eq "Connected" -or $_.InterfaceDescription -like "*"} Write-Output $adapters foreach ($adapter in $adapters) { $name = $adapter.Name Write-Host "Disabling checksum offload for: $name" $properties = @( "IPv4 Checksum Offload", "IP Checksum Offload", "TCP Checksum Offload (IPv4)", "TCP Checksum Offload (IPv6)", "UDP Checksum Offload (IPv4)", "UDP Checksum Offload (IPv6)", "TCP Checksum Offload IPv4", "TCP Checksum Offload IPv6", "UDP Checksum Offload IPv4", "UDP Checksum Offload IPv6", "IPv4 Checksum Offload", "IPv6 Checksum Offload" ) foreach ($prop in $properties) { try { $current = Get-NetAdapterAdvancedProperty -Name $name -DisplayName $prop -ErrorAction SilentlyContinue Write-Output "Current: $current" Write-Output "Prop: $prop" if ($current) { Set-NetAdapterAdvancedProperty -Name $name -DisplayName $prop -DisplayValue "Disabled" -ErrorAction Stop Write-Host " Disabled: $prop" } } catch { } } } - On the menu bar of the cloud server, right-click Start and choose Run from the shortcut menu. Enter gpedit.msc and press Enter.
- On the Local Group Policy Editor page, choose Windows Settings > Scripts (Startup/Shutdown), as shown in Figure 8.
- Double-click Startup, as shown in Figure 9.
- On the displayed Startup Properties page, click the PowerShell Scripts tab.
- Click Add to go to the Add a Script window.
- Click Browse, select the file created in 1, and click OK. The script parameters are empty by default.
- Click OK and then click OK again.
Disabling Windows Updates
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 menu bar of the cloud server, right-click Start and choose Run from the shortcut menu. Enter gpedit.msc and press Enter.
- In the Local Group Policy Editor window, choose Computer Configuration > Administrative Templates > Windows Components > Windows Update > Manage end user experience.
- Configuring automatic updates
- Double-click Configure Automatic Updates on the right. The Configure Automatic Updates page is displayed.
- Select Disabled and click OK, as shown in Figure 10.
- Removing access to use all Windows Update features
- Double-click Remove access to use all Windows Update features. The Remove access to use all Windows Update features page is displayed.
- Select Enabled and click OK, as shown in Figure 11.
- Configuring automatic updates
Enabling Hibernation
- On the menu bar of the cloud server, click
, enter cmd, right-click Command Prompt and choose Run as administrator from the shortcut menu. - Run the powercfg -h on command to enable hibernation.

Deleting the System Recovery Partition
- On the menu bar of the cloud server, right-click Start and choose Run from the shortcut menu. Enter cmd and press Enter.
- Open the CLI and enter diskpart. Then, press Enter to go to the diskpart window.
- Print the disk list and select the system disk.
list disk # The number 0 indicates that the selected disk is the system disk. Select a disk as required. select disk 0
- List disk partitions to check whether the recovery partition exists. If yes, go to 5. If no, skip the subsequent operations.
list partition # In the example shown in Figure 12, 4 indicates the number of the recovery partition.
- Select the recovery partition to be deleted.
select partition 4
The number 4 in this command is used only as an example. Change it as required.
- Delete the recovery partition.
delete partition override
- Merge the freed recovery-partition space into the primary partition for capacity expansion. (In Figure 12, the primary partition is 3.)
select partition 3 extend
Enabling Applications to Use the OS Microphone
Perform this operation only for Windows Server 2019 and Windows Server 2022.
- Choose Start > Settings. The OS setting page is displayed.
- Click Privacy. The privacy setting page is displayed.
- In the list on the left, click Microphone. The page for setting microphone permissions is displayed.
- Enable Let apps use my microphone.
Changing the Power Plan to High Performance
- On the cloud server, click
, enter Control Panel, and open it. - On the Control Panel page, choose Hardware and Sound > Power Options.
- Click Show additional plans and select High performance, as shown in Figure 13.
- Click Change plan settings next to High performance. Select Never for Turn off the display.
- Click Save changes.
Disabling Hybrid Sleep
- On the menu bar of the cloud server, right-click Start and choose Run from the shortcut menu. Enter gpedit.msc and press Enter.
- In the Local Group Policy Editor window, choose Computer Configuration > Administrative Templates > System > Power Management > Sleep Settings.
- Configure the following sleep settings in sequence:
- Specifying the system sleep timeout (plugged in)
- Double-click Specify the system sleep timeout (plugged in) to go to the Specify the system sleep timeout (plugged in) page.
- Select Enabled and set System Sleep Timeout (seconds) to 0, as shown in Figure 14.
- Click OK.
- Turning off hybrid sleep (plugged in)
- Double-click Turn off hybrid sleep (plugged in) to go to the Turn off hybrid sleep (plugged in) page.
- Select Enabled, as shown in Figure 15.
- Click OK.
- Specifying the system sleep timeout (on battery)
- Double-click Specify the system sleep timeout (on battery) to go to the Specify the system sleep timeout (on battery) page.
- Select Enabled and set System Sleep Timeout (seconds) to 0, as shown in Figure 16.
- Click OK.
- Turning off hybrid sleep (on battery)
- Double-click Turn off hybrid sleep (on battery) to go to the Turn off hybrid sleep (on battery) page. Select Enabled, as shown in Figure 17.
- Click OK.
- Specifying the unattended sleep timeout (plugged in)
- Double-click Specify the unattended sleep timeout (plugged in) to go to the Specify the unattended sleep timeout (plugged in) page.
- Select Enabled and set Unattended Sleep Timeout (seconds) to 0, as shown in Figure 18.
- Click OK.
- Specifying the unattended sleep timeout (on battery)
- Double-click Specify the unattended sleep timeout (on battery) to go to the Specify the unattended sleep timeout (on battery) page.
- Select Enabled and set Unattended Sleep Timeout (seconds) to 0, as shown in Figure 19.
- Click OK.
- Specifying the system sleep timeout (plugged in)
Installing 7-Zip
- Go to the C:\software directory where the software package is stored, double-click 7z1900-x64.exe, and install the software as prompted.
- Check whether the environment variables contain 7-Zip.
- On the menu bar of the cloud server, right-click Start and choose Run from the shortcut menu. Enter sysdm.cpl and press Enter.
The System Properties dialog box is displayed.
- On the Advanced tab, click Environment Variables.
- Double-click Path in System variables.
- Check whether the 7-Zip installation directory exists.
- If yes, the installation is complete.
- If no, perform 2.e to manually add environment variables.
- Click New and enter the 7-Zip installation directory, for example, C:\Program Files\7-Zip\. Then, click OK.
- On the menu bar of the cloud server, right-click Start and choose Run from the shortcut menu. Enter sysdm.cpl and press Enter.
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 cloud server.
If a message appears during the installation, indicating that SmartScreen cannot be accessed, just ignore it and proceed with the installation.
(Optional) Deleting the Microsoft Language Package
- Choose Start, search for Windows PowerShell, and click Run as administrator. The Windows PowerShell running page is displayed.
- Run the following command to 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 regularly by Microsoft. Pay attention to Microsoft announcements and update the OS in a timely manner.
(Optional) Installing Application Software
- Go to C:\software where the package is stored and install the application.
Some security software (such as antivirus software, safeguards, and firewalls) may conflict with the Microsoft encapsulation tool. This may cause desktop creation to fail or may result in a blue screen (BSOD) or a black screen on the created desktop. Therefore, install security software only after desktops are provisioned.
Installing Cloudbase-Init
- 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 20.
The version number in the figure is for reference only. Use the actual version number.
- Deselect the options shown in Figure 21.
- 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 netbios_host_name_compatibility=false to the last line of the file so that the hostname can have a maximum of 63 characters.
If you are using NetBIOS in your network, the hostname cannot exceed 15 characters because NetBIOS has a 15-character limit.
- Add 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 netbios_host_name_compatibility=false to the last line of the file so that the hostname can have a maximum of 63 characters.
- Check whether cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin, is present in C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf\cloudbase-init-unattend.conf.
- If it is, delete it before performing subsequent operations.
- If not, perform subsequent operations.
- Add cloudbaseinit.plugins.common.userdata.UserDataPlugin at the end of plugins=. Add a comma (,) in front of the added configuration item.
Creating a Temporary Local User Admin
- 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.
- 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 use the Administrator account to log in again.
- On the VM, right-click Start and choose Run. In the Run text box, enter compmgmt.msc and press Enter.
The Computer Management window is displayed.
- In the navigation pane, choose Local Users and Groups > Users.
- Right-click and choose New User from the shortcut menu.
- In the New User dialog box, enter the username and password, confirm the password, and click Create.
Set the username to admin.
- In the navigation tree, choose Local Users and Groups > Groups.
- Right-click Administrators and choose Add to Group from the shortcut menu.
If you need to add administrators to other groups, select an option according to your actual situation.
- In the Administrators Properties dialog box, click Add to add the created user to the group.
- Click OK and close the Administrators Properties dialog box.
- Close the Server Manager window.
Configuring the SAN Policy for a Cloud Server
- Change the SAN policy to OnlineAll for a Windows cloud server you are using to create an image. Otherwise, when you use the image to create a cloud server, the disks may be offline.
- Specify the SAN policy type. Windows has three types of SAN policies: OnlineAll, OfflineShared, and OfflineInternal, as shown in Table 1.
Table 1 SAN policies of Windows Type
Description
OnlineAll
All newly detected disks are automatically set to online.
OfflineShared
All newly detected disks on sharable buses, such as FC or iSCSI, are offline by default, whereas disks on non-sharable buses are online.
OfflineInternal
All newly detected disks are offline.
- Right-click
and choose Run from the shortcut menu. In the displayed text box, enter cmd and press Enter. - Run the following command to query the SAN policy of the cloud server using DiskPart:
- Run the following command to view the SAN policy of the cloud server: san
- If the SAN policy is OnlineAll, run exit to exit DiskPart and close the CLI window.
- If no, go to 2.d.
- Right-click
Installing SysAgent and SysPrep
- Open the C:\software directory on the cloud server, double-click HW.SysAgent.Installer_64.msi and HW.SysPrep.Installer_64.msi, and install them as prompted.
Installing AppCenterAgent and AppCenter
- Open the C:\software directory on the cloud server, double-click WKSAppCenterAgent.msi and WKSAppCenter.msi, and install them as prompted.
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




















