Updated on 2024-01-11 GMT+08:00

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 ECS.

This section describes how to install the PV driver and UVP VMTools and change Xen to KVM.

  • ECSs can be classified as the following based on the virtualization types:
  • Before changing a Xen ECS to a KVM ECS, install the required drivers on the ECS first, or the ECS will be unavailable after the modification is complete. 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

Figure 1 shows the flowchart for changing a Xen ECS to a KVM ECS.
Figure 1 Flowchart for changing a Xen ECS to a KVM ECS

Table 1 describes the operations for changing a Xen ECS to a KVM ECS.

(Optional) Step 1: Back Up the System Disk

If you modify the specifications of an ECS without installing the driver, the ECS may become unavailable and the data on the system disk may be lost. Therefore, back up the system disk first.

  1. Before you create a system disk backup, check the ECS.
  2. For instructions about how to back up the system disk, seeCreating a VBS Backup.

Step 2: Check the UVP VMTools Version

Before modifying specifications, check the UVP VMTools version.
  1. Log in to the ECS.
  2. Download the driver check script.

    Execute the script as the administrator and wait for the check result.

    URL for downloading the script: https://latin-server-resize.obs.na-mexico-1.myhuaweicloud.com/windows/server_resize/check_kvm_drivers.vbs

    After checking that the required driver has been installed, the system automatically tags the ECS. The specifications of only the tagged ECSs can be modified.

    • If the check result is "Check version success!", 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 upgrading UVP VMTools, ensure that the ECS meets the following requirements:

  • The available system disk size of the ECS is greater than 2 GB.
  • Third-party virtualization platform tools, such as Citrix Xen Tools and VMware Tools, have been uninstalled to prevent driver installation failures. For instructions about how to uninstall the tools, see the official documents of the tools.
  • Antivirus software or intrusion detection software has been disabled. You can enable them after the driver is installed.
  1. 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, see the following steps to uninstall the PV driver and install a new one.
  2. 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, you need to record the UAC configuration before uninstalling the PV driver. Then check and restore the EnableLUA configuration in the registry after installing the new version. For details about UAC configurations, see official Microsoft documents.

    1. In the Run dialog box, enter regedit and click OK to open the registry editor.
    2. Record the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA value.
      Figure 2 EnableLUA
  3. Uninstall the PV driver of the old version.
    1. On the ECS OS, choose Start > Control Panel.
    2. Click Uninstall a program.
    3. Uninstall GPL PV Drivers for Windows x.x.x.xx as prompted.
    4. Restart the ECS on the management console.
  4. Install the PV driver of the new version.
    1. Download the PV driver installation package.

      Download the PV driver at https://ecs-instance-driver.obs.cn-north-1.myhuaweicloud.com/pvdriver-windows.zip.

    2. Decompress the PV driver software package.
    3. Double-click pvdriver-windows.iso.
    4. Run Setup.exe and install the PV driver as prompted.

      Wait until the driver installation is complete. Do not click Setup.exe during the installation.

    5. Restart the ECS as prompted for the PV driver to take effect.
  5. Check and restore the UAC configuration.
    1. In the Run dialog box, enter regedit and click OK to open the registry editor.
    2. Check the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA value and compare it with the value you recorded. If they are different, change the value to the one recorded in step 2.
  6. Install or upgrade UVP VMTools.
    1. Download the UVP VMTools installation package.

      Download UVP VMTools at https://ecs-instance-driver.obs.cn-north-1.myhuaweicloud.com/vmtools-windows.zip.

    2. Decompress the UVP VMTools installation package.
    3. Double-click vmtools-windows.iso.
    4. 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.

      Wait until the installation is complete. Do not click Setup.exe during the installation.

    5. Restart the ECS as prompted for UVP VMTools to take effect.
    6. Check whether UVP VMTools has been installed. For details, see Step 2: Check the UVP VMTools Version.

Step 4: Modify Specifications

  1. Log in to management console.
  2. Under Computing, click Elastic Cloud Server.
  3. 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.

  4. Click More in the Operation column and select Modify Specifications.

    The Modify ECS Specifications page is displayed.

  5. Select the new ECS type, vCPUs, and memory as prompted.
  6. (Optional) Set DeH.

    If the ECS is created on a DeH, you can change the DeH where the ECS resides.

    To do so, select the target DeH from the drop-down list. If no DeH is available in the drop-down list, it indicates that DeH resources are insufficient and cannot be used to create the ECS with specifications modified.

  7. Select the check box to confirm that step ECS has been performed.
  8. Click OK.

(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 specifications have been modified but the OS cannot be started after remote login, reinstall the ECS OS to resolve this issue. For details, see Reinstalling the OS.