Updated on 2024-12-12 GMT+08:00

Optimization Process

The virtualization of ECSs is gradually changing from Xen to KVM. Therefore, private images need to support both Xen and KVM. To ensure that ECSs created from a private image can run properly, you are advised to optimize it no matter it is using Xen or KVM.

A Linux ECS can run properly only when native Xen (Xen PV) drivers and KVM (VirtIO) drivers have been installed on it and disk identifiers in its GRUB file and fstab file have been changed to UUID.

Preparations

  1. Use the Linux image to be optimized to create an ECS, and start and log in to the ECS.
  2. Check whether the private image needs to be optimized.

    For details, see Checking Whether a Private Image Needs to be Optimized.

    The virtualization type may cause slice differences in an optimization process.

Process

  1. Uninstall PV drivers from the ECS.

    For details, see Uninstalling PV Drivers from a Linux ECS.

    If the ECS is using KVM virtualization, skip this step.

  2. Change disk identifiers in the GRUB file to UUID.

    For details, see Changing Disk Identifiers in the GRUB File to UUID.

  3. Change disk identifiers in the fstab file to UUID.

    For details, see Changing Disk Identifiers in the fstab File to UUID.

  4. Install native virtualization drivers.
  5. Delete log files and historical records, and stop the ECS.

    For details, see Clearing System Logs.

  6. Create a Linux private image from the ECS.