Modifying libvirt and QEMU Configurations
To enable libvirt to monitor VMs and use KAEzlib for acceleration during live migration, modify related configurations in libvirt and QEMU. The configuration modification needs to be performed on both the source and target physical hosts.
Modifying Live Migration Configurations
Modify the /etc/libvirt/libvirtd.conf file to enable libvirt to monitor the VM status during live migration. Let libvirt listen to port 16509 on all network ports through TCP.
listen_tls = 0 listen_tcp = 1 tcp_prot = "16509" listen_addr = "0.0.0.0" auth_tcp = "none"
- The preceding configurations are usually used in development and test environments or scenarios that do not require high security. If higher security is required, you need to configure the listening address, identity authentication, and encryption protocol.
- Disable the firewall or enable port 16509 on the firewall.
Adding the KAE Device Configurations
- Check the model of the /dev/hisi_zip-xx device.
1ll /sys/class/uacce/
- Modify the /etc/libvirt/qemu.conf file.
Modify the /etc/libvirt/qemu.conf file to allow libvirt/QEMU to use the KAEzlib device. The value of hisi_zip-xx must be the same as that in step 1.
cgroup_device_acl = [ "/dev/null", "/dev/full", "/dev/zero", "/dev/random", "/dev/urandom", "/dev/ptmx", "/dev/kvm", "/dev/hisi_zip-10", "/dev/hisi_zip-11", "/dev/hisi_zip-8", "/dev/hisi_zip-9" ] - After the configuration is modified, restart the libvirt service.
1 2 3 4
systemctl stop libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tls.socket libvirtd-tcp.socket systemctl stop libvirtd systemctl daemon-reload systemctl start libvirtd-tcp.socket
Parent topic: Installation and Usage