<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>virtualbox on foosel.net</title><link>https://foosel.net/tags/virtualbox/</link><description>Recent content in virtualbox on foosel.net</description><generator>Hugo</generator><language>en-us</language><copyright>Gina Häußge (foosel)</copyright><lastBuildDate>Thu, 27 Feb 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://foosel.net/tags/virtualbox/feed.xml" rel="self" type="application/rss+xml"/><item><title>TIL: How to fix VirtualBox on Fedora 40 with Kernel 6.12+</title><link>https://foosel.net/til/2025-02-27-how-to-fix-virtualbox-on-fedora-40-with-kernel-612/</link><pubDate>Thu, 27 Feb 2025 00:00:00 +0000</pubDate><guid>https://foosel.net/til/2025-02-27-how-to-fix-virtualbox-on-fedora-40-with-kernel-612/</guid><description>&lt;p&gt;I (accidentally&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;) did a software update on my laptop last night, and this morning when I needed my Win10 VM for something, VirtualBox threw an error like this at me:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;VirtualBox can&amp;rsquo;t operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A quick web search for &amp;ldquo;fedora update virtualbox vboxisomaker&amp;rdquo; gave me &lt;a href="https://discussion.fedoraproject.org/t/139896"&gt;this forum post&lt;/a&gt; and consequently
&lt;a href="https://www.virtualbox.org/ticket/22248"&gt;this bug report&lt;/a&gt;, in which I found the solution: I just had to add the kernel parameter &lt;code&gt;kvm.enable_virt_at_load=0&lt;/code&gt; to disable KVM -
which comes enabled by default since Kernel 6.12. I accomplished that with grubby:&lt;/p&gt;</description><content:encoded><![CDATA[<p>I (accidentally<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>) did a software update on my laptop last night, and this morning when I needed my Win10 VM for something, VirtualBox threw an error like this at me:</p>
<blockquote>
<p>VirtualBox can&rsquo;t operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).</p>
</blockquote>
<p>A quick web search for &ldquo;fedora update virtualbox vboxisomaker&rdquo; gave me <a href="https://discussion.fedoraproject.org/t/139896">this forum post</a> and consequently
<a href="https://www.virtualbox.org/ticket/22248">this bug report</a>, in which I found the solution: I just had to add the kernel parameter <code>kvm.enable_virt_at_load=0</code> to disable KVM -
which comes enabled by default since Kernel 6.12. I accomplished that with grubby:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo grubby --update-kernel<span style="color:#f92672">=</span>ALL --args<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;kvm.enable_virt_at_load=0&#34;</span>
</span></span></code></pre></div><p>After a reboot, VirtualBox started again.</p>
<p>Given how often VirtualBox breaks for me on updates, long term I think I really need to find a different solution&hellip; And yes, I also really need to upgrade to Fedora 41, I know 😉</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>I needed to a quick reboot before an online call and promptly forgot to uncheck &ldquo;install updates&rdquo; on the reboot dialog. Which made me be late on the call. Meh.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>TIL: How to fix VirtualBox on Fedora 38 with Kernel 6.4.10+ by adding a missing include</title><link>https://foosel.net/til/2023-09-07-how-to-fix-virtualbox-on-fedora-38-with-kernel-6410/</link><pubDate>Thu, 07 Sep 2023 00:00:00 +0000</pubDate><guid>https://foosel.net/til/2023-09-07-how-to-fix-virtualbox-on-fedora-38-with-kernel-6410/</guid><description>&lt;p&gt;I recently did a software update on my laptop running Fedora 38, and that also brought in a kernel update. Starting my Win10 VirtualBox VM afterwards no longer worked as it needed the kernel module to be recompiled. However, that failed:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$ sudo /sbin/vboxconfig
[sudo] password for gina:
vboxdrv.sh: Stopping VirtualBox services.
depmod: WARNING: could not open modules.order at /lib/modules/6.3.8-200.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin at /lib/modules/6.3.8-200.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin.modinfo at /lib/modules/6.3.8-200.fc38.x86_64: No such file or directory
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
egrep: warning: egrep is obsolescent; using grep -E
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system&amp;#39;s documentation for more information.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;A look into &lt;code&gt;/var/log/vbox-setup.log&lt;/code&gt; revealed an error along the lines of this one&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;:&lt;/p&gt;</description><content:encoded><![CDATA[<p>I recently did a software update on my laptop running Fedora 38, and that also brought in a kernel update. Starting my Win10 VirtualBox VM afterwards no longer worked as it needed the kernel module to be recompiled. However, that failed:</p>
<pre tabindex="0"><code>$ sudo /sbin/vboxconfig 
[sudo] password for gina: 
vboxdrv.sh: Stopping VirtualBox services.
depmod: WARNING: could not open modules.order at /lib/modules/6.3.8-200.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin at /lib/modules/6.3.8-200.fc38.x86_64: No such file or directory
depmod: WARNING: could not open modules.builtin.modinfo at /lib/modules/6.3.8-200.fc38.x86_64: No such file or directory
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
egrep: warning: egrep is obsolescent; using grep -E
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system&#39;s documentation for more information.
</code></pre><p>A look into <code>/var/log/vbox-setup.log</code> revealed an error along the lines of this one<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>:</p>
<pre tabindex="0"><code>/tmp/akmodsbuild.bPlgZsDR/BUILD/VirtualBox-kmod-7.0.10/_kmod_build_6.4.10-200.fc38.x86_64/vboxnetflt/linux/VBoxNetFlt-linux.c: In function &#39;vboxNetFltLinuxForwardToIntNetInner&#39;:
/tmp/akmodsbuild.bPlgZsDR/BUILD/VirtualBox-kmod-7.0.10/_kmod_build_6.4.10-200.fc38.x86_64/vboxnetflt/linux/VBoxNetFlt-linux.c:1570:40: error: implicit declaration of function &#39;skb_gso_segment&#39;; did you mean &#39;skb_gso_reset&#39;? [-Werror=implicit-function-declaration]
 1570 |             struct sk_buff *pSegment = skb_gso_segment(pBuf, 0 /*supported features*/);
      |                                        ^~~~~~~~~~~~~~~
      |                                        skb_gso_reset
/tmp/akmodsbuild.bPlgZsDR/BUILD/VirtualBox-kmod-7.0.10/_kmod_build_6.4.10-200.fc38.x86_64/vboxnetflt/linux/VBoxNetFlt-linux.c:1570:40: warning: initialization of &#39;struct sk_buff *&#39; from &#39;int&#39; makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
</code></pre><p>I did some web searching and came across <a href="https://discussion.fedoraproject.org/t/87492">this post on the Fedora forums</a> with someone having the exact same issue, and found <a href="https://discussion.fedoraproject.org/t/6-4-10-200-fc38-x86-64-created-problems-with-virtual-box/87492/12">a solution in the comments courtesy of Peter Francis</a>:</p>
<blockquote>
<p>Adding</p>
<pre><code>#include &lt;net/gso.h&gt;
</code></pre>
<p>below the line</p>
<pre><code>#include &lt;linux/inetdevice.h&gt;
</code></pre>
<p>in <code>/usr/share/virtualbox/src/vboxhost/vboxnetflt/linux/VBoxNetFlt-linux.c</code> fixed it for me.</p>
<p>Hopefully when the file gets overwritten on next VirtualBox update the fix will be already added by VirtualBox’s programmers.</p>
</blockquote>
<p>And what can I say, it also fixed it for me! And should this not get fixed in the next update, now I&rsquo;ll know where to find the solution again - my own TIL post 😉</p>
<p>PS: Something tells me this won&rsquo;t be the last VirtualBox related TIL post I&rsquo;ll write&hellip;</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>This is copy-pasted from someone else, as my log file got overwritten by the successful compile later. However it looked very much like this error, apart from my Kernel already being at 6.4.13.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>TIL: How to fix VirtualBox on Fedora 38 with Kernel 6.3.5 by disabling IBT</title><link>https://foosel.net/til/2023-06-13-how-to-fix-virtualbox-on-fedora-38-with-kernel-635/</link><pubDate>Tue, 13 Jun 2023 00:00:00 +0000</pubDate><guid>https://foosel.net/til/2023-06-13-how-to-fix-virtualbox-on-fedora-38-with-kernel-635/</guid><description>&lt;p&gt;For accounting and some windows only software (👋 Affinity Designer) I have a Windows 10 VM running in VirtualBox on my Framework running Fedora 38. Apparently I got a kernel update recently and as of this morning the VM refused to start. It just hung, and a look into &lt;code&gt;journalctl&lt;/code&gt; showed something like this:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Jun 13 10:23:50 draper kernel: traps: Missing ENDBR: 0xffff9b688c308f30
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After some searching I came across &lt;a href="https://forums.virtualbox.org/viewtopic.php?p=536761#p536761"&gt;this thread on the VirtualBox forums&lt;/a&gt; which explained the issue and also includes the solution. Apparently the VirtualBox kernel driver &lt;a href="https://www.virtualbox.org/ticket/21435"&gt;triggers Intel&amp;rsquo;s IBT (indirect branch tracking)&lt;/a&gt;. The solution is to disable that&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; by passing &lt;code&gt;ibt=off&lt;/code&gt; as a kernel parameter:&lt;/p&gt;</description><content:encoded><![CDATA[<p>For accounting and some windows only software (👋 Affinity Designer) I have a Windows 10 VM running in VirtualBox on my Framework running Fedora 38. Apparently I got a kernel update recently and as of this morning the VM refused to start. It just hung, and a look into <code>journalctl</code> showed something like this:</p>
<pre tabindex="0"><code>Jun 13 10:23:50 draper kernel: traps: Missing ENDBR: 0xffff9b688c308f30
</code></pre><p>After some searching I came across <a href="https://forums.virtualbox.org/viewtopic.php?p=536761#p536761">this thread on the VirtualBox forums</a> which explained the issue and also includes the solution. Apparently the VirtualBox kernel driver <a href="https://www.virtualbox.org/ticket/21435">triggers Intel&rsquo;s IBT (indirect branch tracking)</a>. The solution is to disable that<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> by passing <code>ibt=off</code> as a kernel parameter:</p>
<pre tabindex="0"><code>sudo grubby --update-kernel=ALL --args=&#34;ibt=off&#34;
</code></pre><p>After a reboot I could rebuild the vbox kernel driver via <code>/sbin/vboxconfig</code>, which ran through without issues, and after that the VM started up just fine.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>Honestly, I&rsquo;d prefer to keep <a href="https://lwn.net/Articles/889475/">IBT</a> enabled for security reasons, but I need the VM to work. Let&rsquo;s hope VirtualBox fixes this soon, though given how long this seems to have gone on I&rsquo;m a bit skeptical.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item></channel></rss>