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

Changing the OS

Updated on 2025-01-27 GMT+08:00

Scenarios

Changing an ECS OS will change the system disk attached to the ECS. After the change, the system disk ID of the ECS will be changed, and the original system disk will be deleted.

If the OS running on an ECS cannot meet service requirements, change the ECS OS.

The cloud platform supports changing between image types (public images, private images, and shared images) and between OSs. You can change your OS by changing your ECS image.

Constraints

  • The OS change takes about 10 to 20 minutes During this process, the ECS status is Changing OS.
  • Do not perform any operations on the ECS before the system injects the password or key. Otherwise, the login will fail.
  • The ECS for which you want to change the OS must be in any of the following states: Stopped, Reinstallation failed, or Failed to change the OS.
  • The target ECS must have a system disk attached.
  • The EVS disk quota must be greater than 0.
  • The system disk type cannot be changed.
  • The system disk can be encrypted.
  • For details about the change between different OSs, see Notes on Change Between Windows and Linux.
  • An ISO image created from an ISO file cannot be used to change the OS of an ECS. You need to install an OS and drivers on the ECS and use the ECS to create a system disk image first.
  • The boot mode (BIOS or UEFI) cannot be changed.

Notes

  • After the OS is changed, the original OS is not retained, and the original system disk is deleted, including the data in all partitions of the system disk.
  • Back up data before changing the OS. For details, see Backing Up an ECS.
  • Changing the OS does not affect data in data disks.
  • After the OS is changed, your service running environment must be deployed in the new OS again.
  • After the OS is changed, the ECS will be automatically started.
  • After the OS is changed, the system disk type of the ECS cannot be changed.
  • After the OS is changed, the IP and MAC addresses of the ECS remain unchanged.
  • After the OS is changed, customized configurations, such as DNS and hostname of the original OS will be reset and require reconfiguration.
  • It takes about 10 to 20 minutes to change the OS. During this process, the ECS is in Changing OS state.
  • After the OS is changed, the password for logging in to the ECS is reset. To retrieve the password, perform the following operations:
  • The system disk capacity of an ECS with OS changed may change because the system disk capacity specified by the image of the changed OS may be changed.
  • You can choose to encrypt the system disk of an ECS during OS change.

Notes on Change Between Windows and Linux

When you change the OS from Windows to Linux or from Linux to Windows, note the following:

  • To change Windows to Linux, install an NTFS partition tool, such as NTFS-3G for data reads and writes on the Windows ECS.
  • To change Linux to Windows, install software, such as Ext2Read or Ext2Fsd to identify ext3 or ext4.
    NOTE:

    If there are LVM partitions on the Linux ECS, these partitions may fail after the OS is changed to Windows. Therefore, a change from Linux to Windows is not recommended.

Prerequisites

  • The data is backed up.

    For details, see Backing Up an ECS.

  • If you want to change the login authentication mode from password to key pair during the OS change, create a key file in advance.

    For details, see (Recommended) Creating a Key Pair on the Management Console.

  • If you plan to use a private image to change the OS, ensure that a private image is available. For details about how to create a private image, see Image Management Service User Guide.
    • If the image of a specified ECS is required, make sure that a private image has been created using this ECS.
    • If a local image file is required, make sure that the image file has been imported to the cloud platform and registered as a private image.
    • If a private image from another region is required, make sure that the image has been copied.
    • If a private image from another user account is required, make sure that the image has been shared with you.

Procedure

  1. Log in to the management console.
  2. Under Computing, choose Elastic Cloud Server.
  3. Locate the row containing the target ECS and choose More > Manage Image/Backup > Change OS in the Operation column.

    Only stopped ECSs support OS change. If the ECS is not stopped, stop it before proceeding with changing.

  4. Select the target image.

    For details, see Creating an ECS.

    Figure 1 Changing an OS
  5. (Optional) Select the Encryption option to encrypt the system disk during OS change.

    To enable encryption, click Create Xrole to assign KMS access permissions to EVS. If you have rights granting permissions, assign the KMS access permissions to EVS. If you do not have the required permissions, contact the user who has the Security Administrator permissions to assign the KMS access permissions.

    Encryption parameters are as follows:

    • Encryption: indicates that the EVS disk has been encrypted.
    • Create Xrole: assigns KMS access permissions to EVS to obtain KMS keys. After the permissions are assigned, follow-up operations do not require assigning permissions again.
    • Xrole Name: set to EVSAccessKMS, which means that permissions have been assigned to EVS to obtain KMS keys for encrypting or decrypting EVS disks.
    • KMS Key Name: specifies the name of the key used by the encrypted EVS disk. You can select an existing key, or click Create KMS Key and create a new one on the KMS console. The default value is evs/default.
    • KMS Key ID: specifies the ID of the key used by the encrypted data disk.
  6. (Optional) Select a License Type (Use license from the system or Bring your own license (BYOL)) if the changed OS running on your ECS is billed. For more details, see License Types.
    The following OSs are billed:
  7. Configure the login mode.

    If the target ECS uses key pair authentication, you can replace the original key pair.

  8. Click OK.
  9. In the Change OS dialog box, confirm the specifications, and click OK.

    After the application is submitted, the status Changing OS is displayed. When this status disappears, the OS change is complete.

    NOTE:

    During the OS change process, a temporary ECS is created. After the OS change is complete, this ECS will be automatically deleted.

Follow-up Procedure

  • If the OSs before and after the OS change are both Linux, and automatic mounting upon system startup has been enabled for data disks, the data disk partition mounting information will be lost after the OS is changed. In such a case, you need to update the /etc/fstab configuration.
    1. Write the new partition information into /etc/fstab.

      It is a good practice to back up the /etc/fstab file before writing data into it.

      To enable automatic partition mounting upon system startup, see Initializing a Linux Data Disk (fdisk).

    2. Mount the partition so that you can use the data disk.

      mount Disk partition Device name

    3. Check the mount result.

      df -TH

  • If the OS change is unsuccessful, perform steps 2 to 9 again to retry the OS change.
  • If the second OS change attempt is unsuccessful, contact customer service for manual recovery at the backend.

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