<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>KVM on Dapeng Zhang</title><link>https://zhangdapeng.dev/tags/kvm/</link><description>Recent content in KVM on Dapeng Zhang</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Fri, 22 Aug 2025 15:34:55 +0000</lastBuildDate><atom:link href="https://zhangdapeng.dev/tags/kvm/index.xml" rel="self" type="application/rss+xml"/><item><title>QEMU/KVM-虚拟管理器启动失败原因排查记录</title><link>https://zhangdapeng.dev/p/qemukvm-xu-ni-guan-li-qi-qi-dong-shi-bai-yuan-yin-pai-cha-ji-lu/</link><pubDate>Fri, 22 Aug 2025 15:34:55 +0000</pubDate><guid>https://zhangdapeng.dev/p/qemukvm-xu-ni-guan-li-qi-qi-dong-shi-bai-yuan-yin-pai-cha-ji-lu/</guid><description>&lt;p&gt;&lt;strong&gt;总结：&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;为什么 Genymotion 和 QEMU/KVM 不能同时使用&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;豆包给的答案是：&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;CPU 虚拟化资源独占：Genymotion 通常基于 VirtualBox 进行虚拟化，而 KVM 是直接利用 CPU 虚拟化功能的内核模块。CPU 的虚拟化功能（如 Intel 的 VT-x 或 AMD 的 AMD-V）一般只能被一个虚拟化管理程序独占使用。当 Genymotion 通过 VirtualBox 占用了这些资源后，QEMU/KVM 就无法再获取到所需的 CPU 虚拟化资源，从而无法正常工作，反之亦然。&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;昨天因为使用Genymotion所以执行了&lt;code&gt;rmmod kvm&lt;/code&gt;和&lt;code&gt;rmmod kvm_amd&lt;/code&gt;，导致今天使用QEMU/KVM的时候，虚拟系统管理器报错了&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;启动域时出错: unsupported configuration: Domain requires KVM, but it is not available. Check that virtualization is enabled in the host BIOS, and host configuration is setup to load the kvm modules.&lt;/p&gt;
&lt;p&gt;Traceback (most recent call last):
File &amp;ldquo;/usr/share/virt-manager/virtManager/asyncjob.py&amp;rdquo;, line 71, in cb_wrapper
callback(asyncjob, *args, **kwargs)&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-^^^^^^^^^^^^^^^^^^^^^^^^^^^" data-lang="^^^^^^^^^^^^^^^^^^^^^^^^^^^"&gt;File &amp;#34;/usr/share/virt-manager/virtManager/asyncjob.py&amp;#34;, line 107, in tmpcb
callback(*args, **kwargs)
~~~~~~~~^^^^^^^^^^^^^^^^^
File &amp;#34;/usr/share/virt-manager/virtManager/object/libvirtobject.py&amp;#34;, line 57, in newfn
ret = fn(self, *args, **kwargs)
File &amp;#34;/usr/share/virt-manager/virtManager/object/domain.py&amp;#34;, line 1384, in startup
self._backend.create()
~~~~~~~~~~~~~~~~~~~~^^
File &amp;#34;/usr/lib/python3/dist-packages/libvirt.py&amp;#34;, line 1379, in create
raise libvirtError(&amp;#39;virDomainCreate() failed&amp;#39;)
libvirt.libvirtError: unsupported configuration: Domain requires KVM, but it is not available. Check that virtualization is enabled in the host BIOS, and host configuration is setup to load the kvm modules.
&lt;/code&gt;&lt;/pre&gt;
 &lt;/blockquote&gt;
&lt;p&gt;{% img &lt;a class="link" href="https://res.cloudinary.com/dy5dvcuc1/image/upload/v1755848862/gowhich/2025-08-22_15-42.png" target="_blank" rel="noopener"
 &gt;https://res.cloudinary.com/dy5dvcuc1/image/upload/v1755848862/gowhich/2025-08-22_15-42.png&lt;/a&gt; &amp;quot;&amp;quot; %}&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;解决方案：&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;通过命令重新加载一下就可以了&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;
modprobe kvm

modprobe kvm_amd
&lt;/code&gt;&lt;/pre&gt;</description></item></channel></rss>