6. Kernel module management
echo “options vhost_net experimental_zcopytx=1”
> /etc/modprode.d/vhost_net.conf
modprobe –r vhost_net
modprobe vhost_net
Actually you should do:
7. Configuration file path
You have to know about:
• The guest xml path:
/etc/libvirt/qemu/guest_name.xml
OR
• The command to edit guest xml:
virsh edit guest_name
Substitute to a number!
8. Try & Error
virsh memtune virtual_machine --hard-limit size
It is wrong!!
It should be:
9. Using systemd
Using echo command to change /sys settings will be lost after reboot!
Solutions:
• Put the commands into /etc/rc.local
OR
• Create a systemd script :
vi /etc/systemd/system/set_transparent_hugepages.service
[Unit]
Description=Disable transparent hugepages
After=multi-user.target
[Service]
ExecStart=/usr/bin/bash -c 'echo never > /sys/kernel/mm/transparent_hugepage/enabled'
[Install]
WantedBy=graphical.target
systemctl enable set_transparent_hugepages.service