Changing the OS
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
- An OS change takes about 1 to 4 minutes to complete. 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, or the login will fail.
- The target ECS must have a system disk attached.
- For a yearly/monthly ECS, the system disk capacity may be insufficient if you change the image type. You need to detach the system disk, expand the disk capacity, attach the expanded disk, and then change the OS.
- For a yearly/monthly ECS:
- OS change is supported only when both the source and target OSs are free of charge.
- If an ECS is created from a private image in KooGallery and is billed on a yearly/monthly basis, the OS cannot be changed.
- OS change between Windows and Linux is only supported in the Chinese mainland regions.
- The EVS disk quota must be greater than 0.
- The system disk type cannot be changed.
- H2 ECSs do not support OS change.
- 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.
- Switching between ECSs in BIOS and UEFI boot modes is not supported.
- The OS cannot be changed between x86 and Kunpeng ECSs.
- Changing the OS will cause the standard snapshot that is being created to fail. Do not perform this operation when a standard snapshot is being created.
Notes
After the OS is changed, the original OS and system disk will not be retained. You need to redeploy services in the new OS. This may interrupt your services for a long time. Therefore, read through the notes before changing an ECS OS.
|
Resources and Environment |
Impact After the OS Is Changed |
|---|---|
|
OS |
The original OS is not retained.
When you change the OS from Windows to Linux or from Linux to Windows, note the following:
|
|
ECS size |
No impact |
|
System disk |
|
|
Data disks |
There are no impacts on data disks. |
|
IP and MAC addresses |
No impact |
|
Custom settings (such as DNS and hostname) |
Custom settings of the original OS will be reset. You need to configure them again.
|
|
Runtime status |
The ECS with OS changed will be automatically started. |
|
Local RDP file |
For a Windows ECS, if you set a new password during OS change, the locally stored RDP file will become invalid. In such a case, you need to download an RDP file again for logging in to the ECS. |
|
Service runtime environment |
The service runtime environment must be redeployed in the new OS. |
Billing Rules
- The OS change itself is free. After the OS of a pay-per-use ECS is changed, the ECS will be billed based on the new configuration (including the system disk, specifications, and KooGallery image).
- After the OS of a pay-per-use ECS is changed, the expenditure may be different because the system disk capacity in the new OS may increase. For details, see Product Pricing Details.
The new system disk may have a larger capacity after an OS change, so you may be billed more.
Prerequisites
- The ECS data has been backed up.
For details, see Cloud Backup and Recovery.
- If you want to change the login authentication mode from password to key pair during the OS change, ensure that you have created a key file.
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
- Log in to the management console.
- Click
in the upper left corner and select a region and project. - Click
. Under Compute, click Elastic Cloud Server. - Locate the row containing the target ECS and choose More > Manage Image > Change OS in the Operation column.
Before changing the OS, stop the ECS first or select Stop the ECS in the Change OS dialog box.
- Select the target image.
For yearly/monthly ECSs, if the system disk capacity of the current OS is less than that of the new OS, you need to detach the system disk, expand its capacity, and attach the system disk to the ECS again. Then, you can change the OS.
For instructions about how to expand the system disk capacity, see Expansion Overview.
Figure 1 Changing an OS
- Set Login Mode.
You can set the login mode for the ECS whose OS is to be changed based on service requirements.
- If you select Password for Login Mode, you can use the original password or enter a new one.
- If you select Key pair for Login Mode, select an available key pair from the drop-down list or create a key pair. For details, see (Recommended) Creating a Key Pair on the Management Console.
- Click OK.
- On the Change OS page, confirm the settings, read and agree to the agreement or disclaimer, and click OK.
After the application is submitted, the ECS status changes to Changing OS. When this status disappears, the OS change is complete.
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.
- 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 using fdisk.
- Mount the partition so that you can use the data disk.
- Check the mount result.
- Write the new partition information into /etc/fstab.
- If the OS change fails, perform steps 3 to 8 again to retry the OS change.
- If the attempt still fails, contact customer service for manual recovery at the backend.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot