Installation and Deployment
- Basic libvirt components must be installed and deployed in common application scenarios.
- VSched contains two binary files vas-daemon and vas-cli whose user and user group are root and file permission is 500.
- The service deployment path is /usr/local/vas/.
- VSched supports both static and dynamic core binding. Static core binding is used by default. For details about dynamic core binding, see VSched Deployment (Dynamic Core Binding Mode).
- Obtain the BoostKit-boostvirt-vas-1.0.0.zip software package as instructed in Obtaining Software Packages and decompress the package to obtain the boostvirt-vas-1.0.0.rpm package.
- Check whether libsecurec is installed on all service nodes.
- Run the following command to check whether libsecurec has been installed on a node:
rpm -qa | grep libsecurec
- If libsecurec has been installed, go to the next step. If not, install it using the software repository.
yum install libsecurec
- Run the following command to check whether libsecurec has been installed on a node:
- Check that the libvirt virtualization software is installed on all service nodes and configure the software.
- Install the libvirt virtualization software.
yum install qemu libvirt edk2-aarch64
- After the installation is complete, configure the qemu.conf file.
Modify the following configuration items in /etc/libvirt/qemu.conf:
user = "root" group = "root"
- After the configuration is complete, reload the configuration.
systemctl daemon-reload
- Restart the libvirt service.
systemctl restart libvirtd
- Check the libvirt service status.
- Install the libvirt virtualization software.
- Install the boostvirt-vas-1.0.0.rpm package on all service nodes.
- Check whether the boostvirt-vas-1.0.0.rpm package has been installed in the environment.
rpm -qa| grep vas-daemon
If the RPM package has been installed in the environment, uninstall it to ensure that the environment is clean.
rpm -e boostvirt-vas-1.0.0
- Go to the RPM package storage directory and install the package.
rpm -ivh boostvirt-vas-1.0.0.rpm
If the following information is displayed during the installation of the UBS Virt-awaresched RPM package, check whether the corresponding component has been installed and deployed as prompted. If the component is not installed, install it.
Failed dependencies
- Check whether the boostvirt-vas-1.0.0.rpm package has been installed in the environment.
- After the installation is complete on the service nodes, start vas-daemon.
- Check the vas-daemon status.
systemctl status vas-daemon
If the service is not started, run the following command to start the service:systemctl start vas-daemon
- Optional: Modify the service configuration file /usr/lib/systemd/system/vas-daemon.service as instructed in Configuration Description.
[Unit] Description=virtual machine schedule daemon After=network.target [Service] Type=simple User=root Group=root RestartSec=5s CPUQuota=100% MemoryLimit=128M ExecStart=/usr/local/vas/bin/vas_daemon start server -smt true --sched-policy affinity --dynamic-util-thresh 85 --skip-cpuset "" --range-affinity true Restart=on-failure CapabilityBoundingSet=CAP_CHOWN CAP_DAC_OVERRIDE AmbientCapabilities=CAP_CHOWN CAP_DAC_OVERRIDE [Install] WantedBy=multi-user.target
- After the modification is complete, save and exit the service configuration file. Then, run the following command to load the configuration:
systemctl daemon-reload
- Restart the service.
systemctl restart vas-daemon
- Check the vas-daemon status.
VSched Deployment (Dynamic Core Binding Mode)
- Configure grub.cfg.
- Open /boot/efi/EFI/openEuler/grub.cfg.
vi /boot/efi/EFI/openEuler/grub.cfg
- Press i to enter the insert mode and add dynamic_affinity=enable to the end of the startup sub-item of the current OS.
You can run the cat /proc/cmdline command to check the startup sub-item of the current OS. The following uses 6.6.0-98.0.0.103.oe2403sp2.aarch64 as an example.
linux /vmlinuz-6.6.0-98.0.0.103.oe2403sp2.aarch64 root=/dev/mapper/openeuler-root ro rd.lvm.lv=openeuler/root rd.lvm.lv=openeuler/swap cgroup_disable=files apparmor=0 crashkernel=1024M,high smmu.bypassdev=0x1000:0x17 smmu.bypassdev=0x1000:0x15 arm64.nopauth console=tty0 dynamic_affinity=enable
- Press Esc, type :wq!, and press Enter to save the file and exit. Restart the OS for the command line parameter settings to take effect.
- Open /boot/efi/EFI/openEuler/grub.cfg.
- Optional: Obtain and install the optimization patch, and recompile and install the kernel.
- Configure the local Yum repository. For details, see Configuring the Local Yum Repository.
Obtain the local repository image file openEuler-24.03-LTS-SP2-everything-aarch64-dvd.iso.
- Install the compilation software and its dependencies.
yum install gcc make patch kernel-source-6.6.0-98.0.0.103.oe2403sp2.aarch64 flex bison openssl-devel elfutils-libelf-devel dwarves rpm-build
- Go to the compilation directory and modify the .config file in the directory.
cd /usr/src/linux-6.6.0-98.0.0.103.oe2403sp2.aarch64/
Leave the value of the following configuration item in the .config file blank:
CONFIG_SYSTEM_TRUSTED_KEYS="certs/openeuler-cert.pem"
The following shows the modification result. Save the file after the modification.
CONFIG_SYSTEM_TRUSTED_KEYS=""
- After applying the patch code to the corresponding file, run the following commands to compile and install the kernel:
make binrpm-pkg -j 128 rpm -ivh /home/linux-6.6.0-98.0.0.103.oe2403sp2.aarch64/rpmbuild/RPMS/aarch64/kernel-6.6.0+-xxx.aarch64.rpm --force
After the installation is complete, restart the OS. On the BMC, you can select the kernel to be started during the startup. After the startup, run the following command to check whether BOOT_IMAGE is the newly compiled kernel. The vmlinuz-6.6.0+ kernel is used as an example. The returned output contains the kernel version.
cat /proc/cmdline
- Enable the optimization function.
echo 1 > /proc/sys/kernel/dynamic_affinity_cluster_sched
- Configure the local Yum repository. For details, see Configuring the Local Yum Repository.
- Determine the core selection range.
The DA_UTIL_TASKGROUP switch determines the CPU core usage threshold policy in dynamic affinity mode. By default, it is enabled. Table 2 describes the configurations.
Table 2 DA_UTIL_TASKGROUP configuration description Configuration Item
Command
Description
Enabled
echo DA_UTIL_TASKGROUP > /sys/kernel/debug/sched/features
This switch is enabled by default.
When it is enabled, the core selection range is determined by the preferred core usage by the task group.
Disabled
echo NO_DA_UTIL_TASKGROUP > /sys/kernel/debug/sched/features
You are advised to disable this switch if group scheduling is not used.
When it is disabled, the core selection range is determined by the total preferred core usage (including processes not included in the task group).
- Configure VSched parameters.
- Open the /usr/lib/systemd/system/vas-daemon.service file.
vi /usr/lib/systemd/system/vas-daemon.service
- Press i to enter the insert mode and change affinity to dynamicAffinity. The following is an example:
ExecStart=/usr/local/vas/bin/vas_daemon start server -smt true --sched-policy dynamicAffinity --dynamic-util-thresh 85 --skip-cpuset "" --range-affinity true
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Run the following commands for the settings to take effect:
systemctl daemon-reload systemctl restart vas-daemon
- Check the service status. If the service status is active (running), the service is started.
systemctl status vas-daemon
- Open the /usr/lib/systemd/system/vas-daemon.service file.