Updated on 2024-10-18 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:
    • Xen ECSs: S1, C1, C2, and M1 ECSs.
    • KVM ECSs: See the Virtualization column in ECS Specifications.

Constraints

  • The ECS needs to be stopped during the the specification modification, so you are advised to perform this operation during off-peak hours.
  • 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.

Step 1: Create a System Disk Snapshot

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, create a snapshot for the system disk first.

  1. Before you create a system disk snapshot, check the ECS.

    Stop and then start the ECS to ensure that services can run properly after the ECS is started.

  2. For details 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 have verified that services are running properly.

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 the management console.
  2. Click in the upper left corner and select your region and project.
  3. Click . Under Compute, click Elastic Cloud Server.
  4. 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.

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

    The Modify ECS Specifications page is displayed.

  6. Select the new ECS type, vCPUs, and memory as prompted.
  7. (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.

  8. Select the check box to confirm that operations in Step 3: Install or Upgrade UVP VMTools has been performed.
  9. 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 have verified that services are running properly.
    • If ECS specifications failed to be modified and the ECS becomes unavailable, reinstall the OS. This operation will clear the data on the system disk while the data on data disks is not affected.

(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, contact customer service or reinstall the ECS OS to resolve this issue. For details, see Reinstalling the OS.

Reinstalling the OS will clear the system disk data, but the data on data disks is not affected.

After the specifications are modified, manually delete the snapshot on the snapshot page if you have verified that services are running properly.