Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Elastic Cloud Server/ User Guide/ Instances/ Modifying ECS Specifications (vCPUs and Memory)/ Automatically Changing a Xen ECS to a KVM ECS (Linux)

Automatically Changing a Xen ECS to a KVM ECS (Linux)

Updated on 2024-10-18 GMT+08:00

Scenarios

Before changing a Xen ECS that runs Linux to a KVM ECS, make sure that the required drivers have been installed and configured on the ECS.

This section describes how to use a script to automatically install drivers on the ECS, configure the device name, and change Xen to KVM.

NOTE:
  • Xen ECSs include S1, C1, C2, and M1 ECSs.
  • To obtain KVM ECSs, see the Virtualization column in ECS Specifications.
  • To support both Xen and KVM, Linux ECSs require the xen-pv and virtio drivers. Before changing a Xen ECS to a KVM ECS, make sure that the Linux ECS has been configured, including driver installation and automatic disk attachment.

Constraints

  • The ECS needs to be stopped during the the specification modification, so you are advised to perform this operation during off-peak hours.
  • To prevent data loss, the specifications of Linux ECSs that use LVM or RAID arrays cannot be modified.
  • 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 automatically changing a Xen ECS to a KVM ECS.
Figure 1 Flowchart for automatically changing a Xen ECS to a KVM ECS
Table 1 describes the operations for automatically changing a Xen ECS to a KVM ECS using a script.
Table 1 Procedure for automatically changing a Xen ECS to a KVM ECS using a script

Step

Operation

1

Step 1: Create a System Disk Snapshot

2

Step 2: Use a Script to Automatically Install Drivers

3

Step 3: Modify Specifications

4

(Optional) Step 4: Check Disk Attachment

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.
NOTE:

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

Step 2: Use a Script to Automatically Install Drivers

Use a script to install drivers on an ECS. If your ECS does not support configuration using a script, manually configure it by referring to Manually Changing a Xen ECS to a KVM ECS (Linux).

  1. Log in to the ECS.
  2. Run the following command to download the driver installation script to the root directory:

    curl URL > ~/resize_ecs_modify_linux.sh

    In the preceding command, URL is the address for downloading the specifications modification script.

    Select an address for downloading the optimization script based on the region where the ECS is located:

    URL for downloading the script: https://latin-server-resize.obs.na-mexico-1.myhuaweicloud.com/linux/server_resize/resize_ecs_modify_linux.sh

  3. Run the following command to execute the script which automatically checks and installs the native Xen PV driver and virtio driver:

    bash resize_ecs_modify_linux.sh

    Figure 2 Executing the script
  4. Wait until the script is executed.

    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 "{Image name} already contain xen and virtio driver", the driver has been installed.
    • If the check result is "Success to set kvm meta!" or "this server already has kvm meta.", the ECS has been tagged. Then, go to Step 3: Modify Specifications.
    • If the check result is "Failed to set metadata, please try again.", tagging the ECS failed. In such a case, try again later.

    If the installation failed, manually configure the ECS by following the instructions provided in Manually Changing a Xen ECS to a KVM ECS (Linux) or contact customer service.

    Figure 3 Successful script execution
    NOTE:

Step 3: 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 the configuration is complete.
  9. Click OK.
    NOTE:
    • 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 4: 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.

NOTE:

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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback