Using a Private Image to Build an Image for a BMS Worker Node in a CCE Turbo Cluster Shared Resource Pool (Deprecated)
Constraints
- This feature is available in open beta test (OBT) only in certain regions, such as CN South-Guangzhou and CN North-Beijing 4.
- This feature is supported only for CCE Turbo clusters of v1.19 and later.
- For details about how to create a custom node image for a CCE Turbo cluster, see Creating a Custom CCE Node Image.
Image OS and Kernel Version Requirements
You have added a dedicated label to the image. Both the label key and value are cce. The image OS version must be EulerOS 2.9.
|
OS |
Cluster Version |
Kernel |
|---|---|---|
|
EulerOS release 2.9 |
v1.19.10 |
4.18.0-147.5.1.2.h340.eulerosv2r9.x86_64 |
- When creating an image, follow the instructions in this section to prevent unexpected problems.
- To log in to VMs created from base images, users are required to have the sudo root or root permissions.
Procedure
Notes
- Check whether the dependencies required by the current OS version are installed on the ECS used to create an image.
- After the image is created, the ECSs will not be deleted. You need to delete them manually.
- The private image installation package contains the script and dependent components required for installing the worker node. The package version varies depending on the cluster version.
Procedure
- Before creating an image, you need to create an ECS. The recommended ECS specifications are 4 vCPUs and memory of 8 GB.
- For details about how to use an image file to create a private image, see Appendix.
- It takes about 10 minutes to create an image, which incurs network traffic and resource fees.
- Ensure that TCP port 22 is enabled in the new inbound rule of the security group for the ECS.
- When preparing an image for a BMS in the shared resource pool, use the UEFI boot mode for the image.
- Creating a private image depends on the lvm2, conntrack, sudo, NetworkManager, haveged, ntp, numactl, ipset, and auditd components. Check whether the corresponding dependencies required by the current OS version have been installed on the ECS used to create the image.
eg: yum install lvm2 conntrack sudo NetworkManager haveged ntp numactl ipset audit -y;
If "no package" is displayed when you run the yum install haveged command, run the following commands:
yum install epel-release -y; yum install haveged -y;
Check and uninstall the unnecessary dependency: network-hotplug
eg: rpm -e network-hotplug
If the base image requires the auditd service to run properly, run the systemctl status auditd command to check the service status and disable selinux if the service runs improperly. In some cases, if selinux is enabled, the auditd service cannot run properly. (Run the vim /etc/selinux/config command and change the value of SELINUX to disabled. Check whether the /var/log/audit directory exists. If the directory does not exist, create it. Restart the node for the modification to take effect.) If the auditd service does not exist, install the auditd service.
- Set iommu=pt intel_iommu=on in the OS boot configuration file grub.cfg.
- In the UEFI boot mode, the OS boot configuration file is stored in the /boot/efi/EFI/euleros/grub.cfg directory.
An example grub.cfg file is as follows:

- Delete temporary files.
- Run the following commands to clear user login records.
echo > /var/log/btmp
- Run the following commands to delete temporary files:
rm -rf /var/lib/cloud/*
rm -rf /var/log/network-config.log
- Run the following commands to clear the residual configuration information:
For EulerOS: Check the files whose names start with ifcfg in the /etc/sysconfig/network-scripts/ folder and delete them except the ones whose names start with ifcfg-lo.
Command for viewing a file: ll /etc/sysconfig/network-scripts/
Command for deleting a file: rm -rf /etc/sysconfig/network-scripts/ifcfgxxx
- Run the following command to clear operation records:
history -w;echo > /root/.bash_history;history -c;history -c;history -c;
- Run the following commands to clear user login records.
- Stop the VM and create a private image.
- Submit a service ticket to Image Management Service IMS to apply for adding the __support_c6_22xl_physical=true tag to the private image (note that the tag starts with two underscores) and provide the private image ID.
- After the image is created, use the image to create a worker node for verification.
Appendix
This operation is required only when you use an image file to create a private image. Perform the following steps:
- Obtain a base image file from a trusted HUAWEI CLOUD image repository.
For details about how to obtain the image ID, see Quickly Importing an Image File (Windows).
- Import the obtained image file to an OBS bucket of your account.
Figure 1 Importing the image file to an OBS bucket
- On IMS, click Create Image on the Private Images tab page. Choose Image File for Source and select the image in the corresponding OBS bucket. Set Function to ECS system disk image, Boot Mode to UEFI, and System Disk (GB) to 40. Click Next to create the image.
Figure 2 Creating an image
Last Article: Using a Private Image to Build a Worker Node Image
Next Article: Adding a Salt in the password Field When Creating a Node
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.