I have an issue setting a persistent kernel option on a libvirt net device since that
device does not exist early enough during the boot of the KVM host.
I am using the 127.0.0.0 local net for cluster communication between the KVM host and its
guests as well as between KVM guests. In order to use addresses on the 127.0.0.0/8
network, which is reserved for local communication, two configuration changes must be made
after the system is rebooted. First the default route of 127.0.0.1/0 to the loopback
device must be deleted which I did by adding an "ip route delete" command to the
ifcfg-br0 file that starts the bridged network that is used by the KVM guests. The second
configuration change is where I am having trouble. For the second change I need to set the
kernel boolean net.ipv4.conf.pvt0.route_localnet to be true to allow routing of the
127.0.0.0/8 on the libvirt net device that I have configured to use addresses on the
127.0.0.0/8 network. Normally I would do this by adding
"net.ipv4.conf.pvt0.route_localnet = 1" to /etc/sysctl.conf but this does not
work because the libvirt pvt0 device does not exist when the settings in the
/etc/sysctl.conf are done.
My question is where can I add the command "/sbin/sysctl -w
net.ipv4.conf.pvt0.route_localnet=1" to the start-up files so the command is run
after the libvirt device pvt0 has been autostarted?
I am running on RHEL 6.4 x86_64.
--jim