Changing a Xen ECS to a KVM ECS (Windows)
Scenarios
Before changing a Xen ECS that runs Windows to a KVM ECS, make sure that PV driver and UVP VMTools have been installed on the Windows ECS.
This section describes how to install the PV driver and UVP VMTools and change Xen to KVM.
- Xen ECSs include S1, C1, C2, and M1 ECSs.
- To obtain KVM ECSs, see the Virtualization Type column in ECS Specifications.
- Before changing a Xen ECS to a KVM ECS, install the desired driver on the ECS. Otherwise, the ECS will be unavailable after the modification is performed. For example, starting the OS will fail.
- When changing Xen to KVM for a Linux ECS, follow the instructions provided in Automatically Changing a Xen ECS to a KVM ECS (Linux).
Constraints
- If a Windows ECS is attached with a cross-region disk, the ECS specifications cannot be modified. Otherwise, ECS data may be lost.
- A Xen ECS with more than 24 VBD disks attached cannot be changed to a KVM ECS.
- A Xen ECS can be changed to a KVM ECS, but a KVM ECS cannot be changed to a Xen ECS.
Procedure
Table 1 describes the operations.
Step 1: Create a System Disk Snapshot
Before modifying the specifications, back up the system disk by creating a system disk snapshot and install drivers on the ECS. Otherwise, once the ECS becomes unavailable after the modification, the data in the system disk may be lost.
For instructions about how to create a system disk snapshot, see Creating a Snapshot in Elastic Volume Service User Guide.
After the specifications are modified, manually delete the snapshot on the snapshot page if you verify that services have been recovered.
Step 2: Check the UVP VMTools Version
- Download the driver check script.
Execute the script as the administrator and wait for the check result.
Select an address for downloading the script based on the region where the ECS is located:- CN East-Shanghai 2: https://cn-east-2-server-resize.obs.cn-east-2.myhuaweicloud.com/windows/server_resize/check_kvm_drivers.vbs
- CN North-Beijing 1: https://cn-north-1-server-resize.obs.cn-north-1.myhuaweicloud.com/windows/server_resize/check_kvm_drivers.vbs
- CN South-Guangzhou: https://cn-south-1-server-resize.obs.cn-south-1.myhuaweicloud.com/windows/server_resize/check_kvm_drivers.vbs
After checking that the desired driver has been installed, the system automatically tags the ECS. The specifications of only the ECSs with such a tag can be modified.
- If the check result is "Check version successes!", the driver version meets service requirements and the ECS is tagged. Then, go to Step 4: Modify Specifications.
- If the check result is "Check version success but set metadata failed! Please run this script again later.", the driver version meets service requirements but tagging the ECS failed. In such a case, try again later.
- If the check result is "Check version failed! Please install drivers at first.", the driver version does not meet service requirements. In such a case, install or upgrade UVP VMTools by following the instructions provided in Step 3: Install or Upgrade UVP VMTools.
Step 3: Install or Upgrade UVP VMTools
When you install or upgrade UVP VMTools, if the PV driver has been installed on the ECS, the system will check the PV driver version. Ensure that the PV driver version meets service requirements. Otherwise, installing UVP VMTools will fail on the ECS. This section describes how to check the installation of the PV driver and UVP VMTools.
Before installing the PV driver or UVP VMTools, ensure that the ECS meets the following requirements:
- The available system disk size of the ECS is greater than 2 GB.
- To prevent a driver installation failure, uninstall third-party virtualization platform tools, such as Citrix Xen Tools and VMware Tools, before installing the driver. For instructions about how to uninstall the tools, see the official documents of the tools.
- Disable antivirus software or intrusion detection software. Enable them after installing the driver.
- Check whether the PV driver version meets the UVP VMTools dependency requirements.
Switch to the C:\Program Files (x86)\Xen PV Drivers\bin directory, open the version.ini file, and view the PV driver version.
pvdriverVersion=5.0.104.010
- If the directory is available and the driver version is 5.0 or later, the PV driver meeting service requirements has been installed. In such a case, go to step 6 to install UVP VMTools.
- If the directory is unavailable or the driver version is earlier than 5.0, the PV driver has not been properly installed or the version does not meet service requirements. Then, go to the next step to uninstall the PV driver and install a new one.
- Record the User Account Control (UAC) configuration of the ECS.
If the PV driver version is earlier than 5.0, DisableLUA is added to the registry during PV driver installation to prevent too many pop-up windows during driver upgrade, and EnableLUA is added to the registry during PV driver uninstallation (this has been resolved in PV driver 5.0 and later versions). To prevent adverse impact on your services, if the PV driver version is earlier than 5.0, record the UAC configuration before uninstalling the PV driver, and check and restore the EnableLUA configuration in the registry after installing the PV driver of the new version. For details about UAC configurations, see official Microsoft documents.
- In the Run dialog box, enter regedit and click OK to open the registry editor.
- Record the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA value. Figure 2 EnableLUA
- Uninstall the PV driver of the old version.
- On the ECS OS, choose Start > Control Panel.
- Click Uninstall a program.
- Uninstall GPL PV Drivers for Windows x.x.x.xx as prompted.
- Restart the ECS.
- Install the PV driver of the new version.
- Download the PV driver installation package.
Download PV driver at https://ecs-instance-driver.obs.cn-north-1.myhuaweicloud.com/pvdriver-windows.zip.
- Decompress the PV driver software package.
- Run Setup.exe and install the PV driver as prompted.
- Restart the ECS as prompted for the PV driver to take effect.
- Download the PV driver installation package.
- Check and restore the UAC configuration.
- In the Run dialog box, enter regedit and click OK to open the registry editor.
- Check the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA value and compare it with the value recorded before the PV driver is uninstalled. If they are different, change the value to the one recorded in step 2.
- Install or upgrade UVP VMTools.
- Download the UVP VMTools installation package.
Download UVP VMTools at https://ecs-instance-driver.obs.cn-north-1.myhuaweicloud.com/vmtools-windows.zip.
- Decompress the UVP VMTools installation package.
- Double-click vmtools-windows.iso.
- Run Setup.exe and install UVP VMTools as prompted.
The installation program will automatically adapt to the OS version and identify whether UVP VMTools is newly installed or upgraded.
- Restart the ECS as prompted for UVP VMTools to take effect.
- Check whether UVP VMTools has been installed. For details, see Step 2: Check the UVP VMTools Version.
- Download the UVP VMTools installation package.
Step 4: Modify Specifications
- Log in to management console.
- Click
in the upper left corner and select the desired region and project. - Under Computing, click Elastic Cloud Server.
- On the Elastic Cloud Server page, view the status of the target ECS.
If the ECS is not in Stopped state, click More in the Operation column and select Stop.
- Click More in the Operation column and select Modify Specifications.
The Modify ECS Specifications page is displayed.
- Select the new ECS type, vCPUs, and memory as prompted.
- (Optional) Set DeH.
If the ECS is created on a DeH, the system allows you to change the DeH.
To do so, select the target DeH from the drop-down list. If no DeH is available in the drop-down list, remaining DeH resources are insufficient and cannot be used to create the ECS with specifications modified.
- Select the check box to confirm that step Step 3: Install or Upgrade UVP VMTools has been performed.
- Click OK.
- The cloud platform automatically creates a system disk snapshot for you. After the specifications are modified, manually delete the snapshot on the snapshot page if you verify that services have been recovered.
- If modifying the ECS specifications failed and the ECS becomes unavailable, reinstall the OS to recover the ECS. However, this operation will clear the system disk data, and data disk data is retained.
(Optional) Step 5: Check Disk Attachment
After a Xen ECS is changed to a KVM ECS, disk attachment may fail. Therefore, check disk attachment after specifications modification. If disks are properly attached, the specifications modification is successful.
Follow-up Procedure
If the ECS with specifications modified is displayed in the ECS list but its OS cannot be started after the ECS is remotely logged in, contact customer service or reinstall the ECS OS to rectify this fault. For details, see Reinstalling the OS.
Reinstalling the OS will clear the system disk, but not affecting data disks.
After the specifications are modified, manually delete the snapshot on the snapshot page if you verify that services have been recovered.
Last Article: General Operations for Modifying Specifications
Next Article: Automatically Changing a Xen ECS to a KVM ECS (Linux)

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.