How to Run
- How to Run
Prints the help information. The printed information is as follows:
NAME: nvwa - a tool used for openEuler kernel update. USAGE: nvwa [global options] command [command options] [arguments...] COMMANDS: update specify kernel version for nvwa to update init init nvwa running environment help, h Shows a list of commands or help for one command GLOBAL OPTIONS: --help, -h show help (default: false)
nvwa update <kernel version>
When the kernel is live upgraded to a version, the NVWA searches for the kernel image and ramfs in the /boot directory. The kernel must be named in the vmlinuz-<kernel version> format, and rootfs in the initramfs-<kernel version>.img format.
Note that the upgrade may fail. If the upgrade fails, some processes or services that are dumped will stop running.
Clears the running information generated by NVWA and modifies the systemd configuration. This command is used to clear the running information before the NVWA is executed or after the execution fails.
For services that need to be saved using NVWA, you need to set StandardOutput and StandardError in the configuration. The following uses Redis as an example:
[Unit] Description=Redis persistent key-value database After=network.target [Service] ExecStart=/usr/bin/redis-server /etc/redis.conf --supervised systemd Type=notify User=redis Group=redis RuntimeDirectory=redis RuntimeDirectoryMode=0755 StandardOutput=file:/root/log1.log StandardError=file:/root/log2.log [Install] WantedBy=multi-user.target
To use the acceleration feature, you need to modify the cmdline and allocate proper memory. For details, click here.
SELINUX needs to be disabled during the running process.
Theoretically, you need to disable the NVWA service only after you run the NVWA update command and before you restart the system to restore the process. It is recommended that SELinux be disabled during the entire process.
NVWA Acceleration Feature Description and Usage
The cpu park command uses the kexec process to make the CPU stay busy waiting, so as to respond to the interrupt request sent by the primary core more quickly, and reduce the status changes.
To use cpu park, you need to add "cpuparkmem=0x200000000" to cmdline. 0x200000000 is the start address of the memory that is not used by other programs. cpuparkmem occupies the memory space whose size is about 1 MB from this address.
Note that if the memory is sufficient, it is recommended that the address range be after 4G(0x100000000). The first 4 GB is usually reserved by each system component, which is prone to conflict.
quick kexec accelerates image loading using kexec.
To use quick kexec, you need to enable related options in the configuration file. For more information, see "Configuration" in Installation and Deployment.
pin memory accelerates the storage and recovery of the CRIU.
To use pin memory, you need to enable related options in the configuration file. For more information, see "Configuration" in Installation and Deployment.
Generated Log Information
The logs generated by the kernel live upgrade tool consist of two parts:
Logs generated during running
Run the service
nvwa statuscommand to view logs.
Logs generated while retaining the running information
The logs are stored in the process/service folder in the path specified by criu_dir.