Configuring the ECS and Creating a Linux System Disk Image
Scenarios
After installing an OS for the temporary ECS, configure the ECS and install native Xen and KVM drivers to ensure that ECSs created subsequently are available.
This section describes how to configure a Linux ECS, install drivers, and create a Linux system disk image.
Procedure
- Configure the ECS.
For details, see Step 4: "Configure the ECS" in What Do I Do If the Initial Configurations of a Linux External Image File Are Not Completed Before the File Is Exported?
- Configuring the network.
- Run the ifconfig command to check whether the private IP address of the ECS is the same as that displayed on the console. If they are inconsistent, delete files in the network rule directory as instructed in Deleting Files in the Network Rule Directory.
- Check whether the NICs are set to DHCP. If the ECS is configured with a static IP address, change its IP address assignment mode to DHCP as instructed in Setting the NIC to DHCP.
- Run the service sshd status command to check whether SSH is enabled. If it is disabled, run the service sshd start command to enable it. Ensure that your ECS firewall, for example, Linux iptables, allows access to SSH.
- Install drivers.
To ensure that the network performance and basic functions of the ECSs created from the private image are normal, install native Xen and KVM drivers on the ECS used to create the image. Before installing native Xen and KVM drivers, uninstall the PV driver.
Disable your antivirus and intrusion detection software. You can enable the software after Xen and KVM drivers are installed.
- Uninstall the PV driver. For details, see Uninstalling the PV Driver from a Linux ECS.
- Install native Xen and KVM drivers. For details, see Installing Native Xen and KVM Drivers.
After the drivers are installed, you need to clear log files and historical records. For details, see Clearing System Logs.
- Configure a file system.
- Change the disk identifier in the GRUB configuration file to UUID. For details, see Changing the Disk Identifier in the GRUB Configuration File to UUID.
- Change the disk identifier in the fstab file to UUID. For details, see Changing the Disk Identifier in the fstab File to UUID.
- Clear the automatic attachment information of non-system disks in the /etc/fstab file to prevent impacts on subsequent data disk attachment. For details, see Detaching Data Disks from an ECS.
- (Optional) Configure value-added functions.
- Install and configure Cloud-Init. For details, see Installing Cloud-Init and Configuring Cloud-Init.
- Enable NIC multi-queue. For details, see How Do I Set NIC Multi-Queue for an Image?
- Configure dynamic acquirement of IPv6 addresses. For details, see How Do I Configure an ECS to Dynamically Acquire IPv6 Addresses?
- Configuring the network.
- Create a Linux system disk image.
For details, see Creating a System Disk Image from a Linux ECS.
Follow-up Procedure
After the system disk image is created, delete the temporary ECS in a timely manner to avoid additional fees.
Last Article: Installing a Linux OS
Next Article: Quickly Importing an Image File
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.