<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hot-Plug on ousfifty's blog</title><link>https://blog.ous50.moe/en/tags/hot-plug/</link><description>Recent content in Hot-Plug on ousfifty's blog</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><copyright>ousfifty 2020-</copyright><lastBuildDate>Fri, 08 Aug 2025 11:26:29 +0800</lastBuildDate><atom:link href="https://blog.ous50.moe/en/tags/hot-plug/index.xml" rel="self" type="application/rss+xml"/><item><title>Advanced FnOS Configuration and Usage Tips</title><link>https://blog.ous50.moe/en/p/advanced-fnos-configuration-and-usage-tips/</link><pubDate>Fri, 08 Aug 2025 11:26:29 +0800</pubDate><guid>https://blog.ous50.moe/en/p/advanced-fnos-configuration-and-usage-tips/</guid><description>&lt;p&gt;This article focuses on optimizing &lt;a class="link" href="https://www.fnnas.com/" target="_blank" rel="noopener"
 &gt;FnOS&lt;/a&gt;. For instructions on installing FnOS on PVE or a physical machine, please see the &lt;a class="link" href="../installing-fnos-on-proxmox-ve-pve/" &gt;previous article&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="network-optimization"&gt;&lt;a href="#network-optimization" class="header-anchor"&gt;&lt;/a&gt;Network Optimization
&lt;/h2&gt;&lt;p&gt;The following optional steps can improve network throughput and privacy.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Execute this script to enable the BBR congestion control algorithm:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cat &amp;gt; /etc/sysctl.d/99-enable-bbr.conf &lt;span class="s"&gt;&amp;lt;&amp;lt;EOF
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;net.core.default_qdisc=fq
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;net.ipv4.tcp_congestion_control=bbr
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Apply the BBR configuration without rebooting:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sysctl -p /etc/sysctl.d/99-enable-bbr.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Execute this script to enable modern IPv6 privacy address standards (RFC 7217 and RFC 4941):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cat &amp;gt; /etc/sysctl.d/99-enable-private-ipv6.conf &lt;span class="s"&gt;&amp;lt;&amp;lt;EOF
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;net.ipv6.conf.all.use_tempaddr = 2
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;net.ipv6.conf.default.use_tempaddr = 2
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;net.ipv6.conf.all.addr_gen_mode=1
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;net.ipv6.conf.default.addr_gen_mode=1
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Apply the sysctl configuration:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sysctl -p /etc/sysctl.d/99-enable-private-ipv6.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 &lt;blockquote&gt;
 &lt;p&gt;🚨 &lt;strong&gt;Warning&lt;/strong&gt;: Do not use the “EUI-64” option in the FnOS web interface. Doing so will &lt;strong&gt;negate these privacy enhancements by exposing the device’s MAC address&lt;/strong&gt; in its IPv6 address.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Applying Network Changes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To activate the new IPv6 address settings, the network interface must be reset. This can be done with &lt;code&gt;nmcli&lt;/code&gt; without a full system reboot.&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;&lt;strong&gt;🚨 Important&lt;/strong&gt;: Execute these commands from the PVE web console (&lt;code&gt;Xterm.js&lt;/code&gt;), as running them over SSH &lt;strong&gt;will cause a disconnection due to the IPv6 address change&lt;/strong&gt; and may not be recoverable.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Identify the Connection Name&lt;/strong&gt;
List all active connections to find the name of your primary interface.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;nmcli connection show
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The output will list available connections. Note the name of your Ethernet connection, which is often &lt;code&gt;Wired connection 1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2: Reset the Connection&lt;/strong&gt;
Use the identified name to restart the network interface:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;nmcli connection down &lt;span class="s2"&gt;&amp;#34;Wired connection 1&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; nmcli connection up &lt;span class="s2"&gt;&amp;#34;Wired connection 1&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The network interface will restart. You can confirm the new IPv6 address configuration using &lt;code&gt;ip a&lt;/code&gt; or in the &lt;code&gt;Summary&lt;/code&gt; page for the VM in the PVE web console.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Enabling IPv6 Router Advertisements (RA) for Hosted Virtual Machines&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To allow VMs inside it to also acquire IPv6 addresses via SLAAC, its RA settings must be changed:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cat &amp;gt; /etc/sysctl.d/99-virtual-machine.conf &lt;span class="s"&gt;&amp;lt;&amp;lt;EOF
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;net.ipv6.conf.all.accept_ra = 2
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;net.ipv6.conf.default.accept_ra = 2
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sysctl -p /etc/sysctl.d/99-virtual-machine.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="enabling-memory-and-cpu-hot-plug-as-a-pveqemu-guest"&gt;&lt;a href="#enabling-memory-and-cpu-hot-plug-as-a-pveqemu-guest" class="header-anchor"&gt;&lt;/a&gt;Enabling Memory and CPU Hot-plug as a PVE/QEMU Guest
&lt;/h2&gt;&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Modify &lt;code&gt;/etc/default/grub&lt;/code&gt; to enable memory hot-plug:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-diff" data-lang="diff"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gd"&gt;- GRUB_CMDLINE_LINUX=&amp;#34;modprobe.blacklist=pcspkr&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gi"&gt;+ GRUB_CMDLINE_LINUX=&amp;#34;modprobe.blacklist=pcspkr memhp_default_state=online&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a UDEV rule to enable CPU hot-plug:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cat &amp;gt; /lib/udev/rules.d/80-hotplug-cpu.rules &lt;span class="s"&gt;&amp;lt;&amp;lt;EOF
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;SUBSYSTEM==&amp;#34;cpu&amp;#34;, ACTION==&amp;#34;add&amp;#34;, TEST==&amp;#34;online&amp;#34;, ATTR{online}==&amp;#34;0&amp;#34;, ATTR{online}=&amp;#34;1&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Shut down the virtual machine.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the PVE web console, on the &lt;code&gt;Processor&lt;/code&gt; page, check &amp;ldquo;Enable NUMA&amp;rdquo;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the PVE web console, on the &lt;code&gt;Options&lt;/code&gt; page, check &lt;code&gt;Memory&lt;/code&gt; and &lt;code&gt;CPU&lt;/code&gt; in the &amp;ldquo;Hotplug&amp;rdquo; options list.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</description></item></channel></rss>