Modifying the Kernel Module
In the DaoCloud DC1000 hardware environment, the host kernel needs to be adapted for driver installation on the VM. Obtain the kernel source code in advance.
- Obtain the kernel source code. See Table 4.
- Decompress the kernel source code and go to the root directory.
unzip kernel-6.6.0-72.0.0.zip cd kernel-6.6.0-72.0.0
- Suppress the local version number.
1touch .scmversion - Obtain the kernel patch file general.patch according to Software Requirements.
- Apply the patch in the kernel source code directory kernel-6.6.0-72.0.0.
patch -p1 < general.patch
- Generate a .config file in the source code directory.
cp /boot/config-`uname -r` .config make menuconfig
- On the displayed configuration page, select Load.

- Select OK in the following page:

- On the kernel configuration interface, configure the kernel compilation options listed in Table 1.
Table 1 Kernel compilation options Option
Required Value
LOCALVERSION
-patched-vm
DEBUG_INFO_BTF
N
SYSTEM_TRUSTED_KEYS
Clear the content.
The configuration result should be:
( ) Additional X.509 keys for default system keyring
Configuration methods:
- Press / for search.
- Press Y to compile the selected item into the kernel. The corresponding item is displayed as [*].
- Press N to exclude the selected item. The corresponding item is displayed as [].
- Press M to compile the selected item into a module (in KO format). The corresponding item is displayed as <M>.
- Press Enter to edit the selected item.
- Press the corresponding number to select a search result.
- After the modification is complete, select <Save> to save the modification.
- After saving the modification, select <Exit> to exit.
- Install dependencies and enable the LXCFS service. If you need to divide the command into multiple lines, add a backslash (\) at the end of each line.
yum install -y dwarves dpkg dpkg-devel openssl openssl-devel ncurses ncurses-devel bison flex bc libdrm build elfutils-libelf-devel docker lxc lxcfs lxcfs-tools git tar patch make gcc systemctl start lxcfs systemctl enable lxcfs

- Compile the kernel code.
make -j72
- Install the new kernel.
make modules_install make install
- Set the boot kernel.
grub2-set-default 'openEuler (6.6.0-patched-vm) 24.03 (LTS-SP1)'
- Reboot the server.
reboot
- After the reboot, confirm that the kernel is switched to 6.6.0-patched-vm.
uname -r
Parent topic: Host Environment Configuration