tencent cloud

Cloud Virtual Machine

동향 및 공지
제품 동향
공용 이미지 업데이트 동향
운영 체제 공식 지원 종료 계획
제품 공지
제품 소개
CVM 개요
제품 장점
기본 개념
리전 및 가용존
신규 사용자 가이드
Service Regions and Service Providers
제품 요금
요금 개요
과금 방식
과금 항목
과금 방식 변경 개요
인스턴스 구매
사양 변경 요금 설명
연체 설명
빠른 시작
사용자 정의 Linux 인스턴스 구매
사용자 정의 Windows 인스턴스 구매
사용자 가이드
운영 가이드 개요
사용 제한 개요
인스턴스
스팟 인스턴스
예약 인스턴스
이미지
스토리지
백업 및 복구
네트워크
보안
비밀번호/키
모니터링 및 알람
운영 관리
편리한 기능
서버 마이그레이션
온라인 마이그레이션
마이그레이션 요금
장애 처리
CVM에 로그인할 수 없는 문제 처리 방법
Windows 인스턴스 로그인 관련 장애
Linux 인스턴스 로그인 관련 장애
기타 인스턴스 로그인 관련 장애
인스턴스 실행 장애
Linux 인스턴스 메모리 장애
네트워크 장애
실습 튜토리얼
CVM 선택 제안
환경 구축
웹사이트 구축
애플리케이션 구축
시각화 페이지 구축
로컬 파일을 CVM에 업로드
네트워크 성능 테스트
기타 실습 튜토리얼
API 참조
History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
보안 및 컴플라이언스
Cloud Access Management(CAM)
네트워크
자주 묻는 질문
리전 및 가용존 문제
요금
인스턴스 문제
스토리지 문제
이미지 관련 문제
서버 마이그레이션 관련 문제
네트워크 관련 문제
보안 관련 문제
운영 체제 관련 문제
운영 및 모니터링 관련 문제
CAM 관련 문제
NTP 서비스 관련 문제
적용 시나리오 관련 문제
Agreements
CVM Service Level Agreements
Red Hat Enterprise Linux Image Service Agreement
Public IP Service Level Agreement
용어집
문서Cloud Virtual Machine

Importing Linux ISO Images to Tencent Cloud CVM Instances

포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-11-20 10:34:20

Scenarios

Since ISO images typically cannot be used directly, when you need to use ISO images on Cloud Virtual Machine (CVM) instances, you can create custom CVM images based on the ISO images to achieve the purpose of importing ISO images to CVM instances. This document introduces the specific operations for importing Linux ISO images to CVM instances.

Basic Concepts

ISO Images

ISO images are optical disc images generally used for burning optical discs. ISO images of different distributions mainly provide the feature of installing the operating system, and the images themselves typically cannot be used directly.
Features of ISO images:
ISO images generally provide the feature of installing the system to a hard disk.
ISO images are read-only. Files within an ISO image cannot be modified. When booted from an ISO image, an overlayFS may be attached at the root directory to provide the modification feature. The upper layer of the attached overlayFS is tmpfs. Changes are stored in memory and are lost upon restart.
Typical steps for using an ISO image are shown in the figure below:


Server Images

Server images provide all the information required to start a CVM instance.
Comparison between server images and ISO images:
A server image allows a CVM instance to be started and immediately used for business deployment, while an ISO image has many limitations when being used to start a CVM instance, and it generally cannot be used directly.
CVM instances created through server images support read-write operations, and system configurations or files are saved after a system restart. However, the modifications are lost upon the ISO image restart.

Import Solutions

ISO images cannot be imported and used directly; server images are disk images that can be started directly. You can create custom CVM images based on ISO images. The following text provides two solutions for reference:

Solution 1: Importing Through the Rescue Mode (Recommended)

Import Process



Advantages, Disadvantages, and Limitations

Advantages:
This solution has good compatibility, supporting both Legacy BIOS and UEFI boot modes.
This solution does not need to modify grub.
This solution can be used when the instance has no public network access capability.
Disadvantages:
It is required to enter the rescue mode manually.
Since redundant data replication is performed multiple times, the process is relatively long.
Limitations:
This solution is suitable for Linux ISO images. Earlier Linux distributions may have compatibility issues.

Operation Steps

1. Download the ISO images from the official website of the corresponding distribution, and import them to CVM instances.
1.1 Download the ISO images.
1.2 Upload the ISO images to a Cloud Object Storage (COS) bucket.
1.3 Import the ISO images of the COS bucket to CVM instances.
Note:
When images are imported, select Enable Forced Import.
Ensure that the operating system architecture is selected correctly. (Generally 64-bit, namely, x86_64. For arm images, select arm_64.)
Ensure that the currently selected boot mode is consistent with that of the image file. Otherwise, using this image may affect the boot of your instance.

2. Use the imported images to create instances. For detailed operations, see Creating an Instance via a Custom Image.
Note:
When instances are created, at least one data disk needs to be attached, and the disk capacity should not exceed the system disk capacity. After the images are imported, the default available space is equal to the data disk size.
The sizes of both the data disk and system disk should be greater than the recommended disk size for the distribution.
If your instance does not require a data disk, it is recommended to select the pay-as-you-go billing mode first. After the successful import of the ISO images, you can return the data disk and then change to a suitable billing mode as needed. For detailed operations, see Converting Pay-as-You-Go to Yearly/Monthly Subscription.
The configuration of the created instance should meet the recommended configuration requirements of the distribution. In this example, Ubuntu 24.10 is used, with the instance configured as SA5.MEDIUM4. The illustration is shown below:

3. Log in to the newly created CVM instance through VNC, install the ISO system on the data disk vdb, and set the root password.
Note:
Depending on the requirements of different distributions, you may need to clear the disk before installation.
Forcibly importing ISO images and creating instances are equivalent to writing the ISO images directly into the system disk vda using the dd command. Since the currently running program is the installation program on the system disk vda, it is not possible to install the system on the system disk vda.


4. After the installation is completed, it is recommended to shut down the instance directly in the CVM console and then enter the rescue mode.



5. In the rescue mode, write the content of the data disk into the system disk using the dd command.
dd if=/dev/vdb of=/dev/vda bs=2M status=progress

6. In the rescue mode, clear the first 64 MB of the data disk using the dd command. This prevents issues caused by duplicate UUIDs between the data disk and the system disk.
dd if=/dev/zero of=/dev/vdb bs=2M count=32

Running Environment

Operating System: Ubuntu 24.04.3 LTS / x86_64

Runtime Version: GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)


7. Exit the rescue mode, and after exiting, the instance is restarted automatically.
After the instance is started, if the data disk is no longer needed, you can detach and terminate the data disk. For details, see Detaching a Cloud Disk and Terminating a Cloud Disk.
Note:
It is recommended to install cloud-init to provide the capability for customizing configurations during instance initialization. For details, see Installing Cloud-Init on a Linux Instance.

Solution 2: Importing Through Data Disks

Import Process



Advantages, Disadvantages, and Limitations

Advantages:
There is less redundant data replication, and the process is relatively short.
Disadvantages:
Operations are different between Legacy BIOS and UEFI boot modes.
For images in the Legacy BIOS boot mode, the operation of grub is required.
Limitations:
This solution is suitable for Linux ISO images. Earlier Linux distributions may have compatibility issues.
ISO files installed on the Windows operating system cannot be written to disks using the dd command, and installation of additional tools is required.

Operation Steps

1. Create CVM instances.
The configuration of the created instance should meet the recommended configuration requirements of the distribution. In this example, Ubuntu 24.10 is used, with the instance configured as SA5.MEDIUM4.
For detailed operations, see Creating an Instance.
Note:
When instances are created, attach at least one data disk, and ensure that the data disk size exceeds the distribution ISO size.
It is required to manually set the login password for the instance to facilitate subsequent VNC login.
The system disk should be greater than the recommended disk size for the distribution, and have sufficient space to download and store ISO images in subsequent steps.
The instance should have the public network access capability. You need to select Assign a Public IP Address when creating the instance to facilitate the download of ISO images through the public network.
The operating system information on the instance displayed in the CVM console may not match the operating system of the ISO file. This cannot be unified, but does not affect instance operation.

If your instance does not require a data disk, it is recommended to select the pay-as-you-go billing mode first. After the successful import of the ISO images, you can return the data disk and then change to a suitable billing mode as needed. For detailed operations, see Converting Pay-as-You-Go to Yearly/Monthly Subscription.
UEFI Boot
BIOS Boot
The downloaded ISO images should support the UEFI boot mode (generally supported). When creating an instance, you need to select the TencentOS Server 3.1 (TK4) UEFI Edition image.

The downloaded ISO images should support the BIOS boot mode. When creating an instance, you need to select the TencentOS Server 3.1 (TK4) image (whose name does not contain the UEFI suffix).



2. After the instance is created, log in to the instance through VNC and paste the URL to download the corresponding ISO image file.


3. Write the ISO images into the data disk using the dd command.
dd if=<ISO file name> of=/dev/vdb bs=2M status=progress

4. Restart the instance through VNC.
UEFI Boot
BIOS Boot
1. For the UEFI boot type of instances using the TencentOS Server 3.1 (TK4) UEFI Edition image, immediately press F2 multiple times after the restart until you access the firmware interface.

Note:
After the restart, you should press F2 multiple times to access the firmware interface; if you miss the opportunity to press F2, the grub interface is accessed instead. On the grub interface, press the c key to access the grub cmdline interface. You can also enter the fwsetup command on the grub interface to access the firmware interface.


2. On the firmware interface, select the Boot Manager option.

3. Select to boot from UEFI Misc Device 2 (Device 2 indicates the second disk, which is the data disk).

1. For the BIOS boot type of instances using the TencentOS Server 3.1 (TK4) image, the grub interface is accessed after the restart.

2. Press the up arrow key or down arrow key on the grub interface to interrupt the countdown.

3. Press the c key on the grub interface to access the grub cmdline, and then run the command below to boot from the data disk.
grub> set root=(hd1) # Set the root variable to (hd1), which is Disk 1. Disks are indexed from 0, so Disk 1 is the second disk.
grub> chainloader +1 # This is a fixed writing method. +1 indicates loading the MBR from the location specified by the root variable.
grub> boot # Boot.
Note:
grub may not recognize the NVMe disks during BIOS boot, which specifically refer to the NVMe local disks on Cloud Bare Metal (CBM) instances.
When the above steps are performed successfully, the GRUB interface of the ISO image (Ubuntu 24.10) is accessed, and select Try or Install Ubuntu Server.

5. Install the system to the system disk.
Note:
Depending on the requirements of different distributions, you may need to clear the disk before installation.


6. After the system installation is completed, restart the instance.
After the instance is started, if the data disk is no longer needed, you can detach and terminate the data disk. For details, see Detaching a Cloud Disk and Terminating a Cloud Disk.
Note:
It is recommended to install cloud-init to provide the capability for customizing configurations during instance initialization. For details, see Installing Cloud-Init on a Linux Instance.

FAQs

After the System Installation Is Completed and the Instance Is Restarted, the Instance Fails to Obtain an IP Address Through DHCP

Issue Symptoms

In the output result of ip addr, the eth NIC does not have an IP address.


Solutions

It is recommended to use one of the methods below to obtain the IP address:
Note:
After the IP address is obtained using one of the following methods, it is recommended to install cloud-init to provide the capability for customizing configurations during instance initialization. For details, see Installing Cloud-Init on a Linux Instance.
Method 1: If NetworkManager is installed on the instance, you can use the nmtui command to adjust the network configuration of the machine. After configuration adjustment, the machine automatically obtains an IP address through DHCP.



Method 2: If NetworkManager is not installed on the instance, but there is the dhclient command, you can obtain an IP address by running dhclient -1 -d <NIC name>. After the IP address is obtained, you can exit the dhclient process using Ctrl + C.

Method 3: If there is no NetworkManager or the dhclient command, you can consider obtaining IP address information directly from /dev/sr0 and performing manual configuration.


How to Determine the Current System Boot Mode? How to Determine the Boot Mode Supported by the ISO Images?

Method of determining the current system boot mode: You can determine the current system boot mode according to the contents of the /sys/firmware directory. If the /sys/firmware directory contains an efi directory, UEFI boot is used; otherwise, BIOS boot is used.


Method of determining whether an ISO file supports BIOS boot: If the first 0 to 446 bytes of the ISO file are not empty, it generally supports BIOS boot; otherwise, it does not support BIOS boot.

Method of determining whether an ISO file supports UEFI boot: Based on experience, most ISO images created after 2010 support UEFI boot, while earlier images may or may not support it.
A more formal method is to check whether the ISO file contains the efi/boot/bootx64.efi file. The bootx64.efi file is required to be stored in a UEFI boot partition in the FAT format or in the ISO file system. Below is a check method for reference:




도움말 및 지원

문제 해결에 도움이 되었나요?

피드백