当前位置:首页>Linux>KVM 虚拟化深度解析:Linux 最强内核级虚拟机(二)

KVM 虚拟化深度解析:Linux 最强内核级虚拟机(二)

  • 2026-07-03 00:21:25
KVM 虚拟化深度解析:Linux 最强内核级虚拟机(二)

上一期由于篇幅所限,还有一些关键问题未能展开说明。为了让整体内容更加完整、逻辑更加清晰,本期我们将延续上一次的话题,继续深入探讨 KVM 虚拟化实战中的几个关键细节与注意事项。

相关内容可参考往期文章链接:KVM 虚拟化深度解析:Linux 最强内核级虚拟机(一)

KVM 虚拟机 vCPU 数量不符合预期

现象

使用如下命令创建了 Windows 虚拟机,分配了 16 个 vCPU,但是系统中只显示 2 个 vCPU。

virt-install  --accelerate \--name windows10 \--memory 16384 \--vcpus 16 \--controller type=scsi,model=virtio-scsi \--disk path=/home/sdb1/KVM/VMs/windows10.qcow2,size=200,sparse=true,cache=none,bus=ide,format=qcow2 \--cdrom=/home/sdb1/KVM/ISOs/zh-cn_windows_10_business_editions_version_22h2_updated_feb_2025_x64_dvd_016e01fc.iso \--graphics vnc,listen=0.0.0.0,port=5901,password=Tmp4950Pa20 \--network network=default \--os-variant=win10

原因

--vcpus 16 不指定拓扑时,KVM 默认把 16 个 vCPU 以 16 个独立插槽(socket) 的方式呈现给虚拟机:

默认拓扑:16 socket × 1 core × 1 thread = 16 vCPU

而 Windows 10 的版本对物理插槽有限制:

Windows 版本
最大物理插槽数
家庭版
1
专业版
2
专业工作站版
4
企业版/数据中心版
2

挂载的镜像是 Business Editions,包含专业版,最多识别 2 个物理插槽,所以只用到了 2 个 vCPU。

Linux 无授权锁插槽,只受硬件与内核配置限制。

解决方案

重新定义 CPU 拓扑,把 16 个 vCPU 放在 1 个或 2 个插槽里:

### 方案一:1个插槽,16个核心(推荐)virt-install \  --vcpus 16,sockets=1,cores=16,threads=1 \  ...其他参数不变...### 方案二:2个插槽,每个8核(如果需要模拟多路)virt-install \  --vcpus 16,sockets=2,cores=8,threads=1 \  ...其他参数不变...### 方案三:1个插槽,4核超线程(模拟常见桌面CPU)virt-install \  --vcpus 16,sockets=1,cores=8,threads=2 \  ...其他参数不变...

如果虚拟机已经创建,直接修改 XML,不需要重新安装,直接编辑现有虚拟机配置:

virsh edit windows10

找到 CPU 部分,修改为:

<vcpu placement="static">16</vcpu><cpu mode="host-passthrough">  <topology sockets="1" cores="8" threads="2"/></cpu>

关于 NUMA 的建议

如果宿主机有两个 NUMA 节点,跨 NUMA 访问内存会有额外延迟。如果想进一步优化性能,可以把虚拟机的 CPU 和内存都绑定在同一个 NUMA 节点上:

<vcpu placement="static">16</vcpu><cpu mode="host-passthrough">  <topology sockets="1" cores="8" threads="2"/></cpu><numatune>  <memory mode="strict" nodeset="0"/></numatune>

这样虚拟机的内存全部从 NUMA node0 分配,避免跨节点访问,延迟更低。不过前提是 node0 有足够的空闲内存(本次实验中有 16GB 分配给 Windows,node0 需要有足够空间)。

修改完后重启虚拟机生效:

virsh shutdown windows10virsh start windows10

NUMA 是什么?

NUMA = Non-Uniform Memory Access,非统一内存访问架构,简单来说:

  • • 现代多 CPU / 多核服务器,内存不是 “大家共用一块”
  • • 每个 CPU 插槽(或一组核心)会绑定一部分本地内存
  • • 访问自己本地内存快,访问别的 CPU 管的内存慢
  • • 系统把每个 “CPU + 本地内存” 的组合,叫做一个 NUMA 节点(Node)

结果验证

查询支持的操作系统版本名称

用命令行创建虚拟机时,不知道你有没有关注 --os-variant 这个参数,它后面对应的是要安装的虚拟机操作系统名称,必须完全精确,不能写错、不能简写,我们如何知道安装某一个系统时应该写哪个名字?当然是可以查询的了^_^

不同的 KVM 版本支持的系统版本会有不同,以下输出做了大量删减,仅供参考。

[root@ovirt-node02 ~]# osinfo-query  os Short ID             | Name                                               | Version  | ID                                      ----------------------+----------------------------------------------------+----------+----------------------------------------  android-x86-8.1      | Android-x86 8.1                                    | 8.1      | http://android-x86.org/android-x86/8.1   android-x86-9.0      | Android-x86 9.0                                    | 9.0      | http://android-x86.org/android-x86/9.0   archlinux            | Arch Linux                                         |          | http://archlinux.org/archlinux/rolling   asianux-unknown      | Asianux unknown                                    | unknown  | http://asianux.com/asianux/unknown       asianux4.6           | Asianux Server 4 SP6                               |          | http://asianux.com/asianux/4.6           asianux4.7           | Asianux Server 4 SP7                               |          | http://asianux.com/asianux/4.7           asianux7.0           | Asianux Server 7                                   | 7.0      | http://asianux.com/asianux/7.0           asianux7.1           | Asianux Server 7 SP1                               | 7.1      | http://asianux.com/asianux/7.1           asianux7.2           | Asianux Server 7 SP2                               | 7.2      | http://asianux.com/asianux/7.2           asianux7.3           | Asianux Server 7 SP3                               | 7.3      | http://asianux.com/asianux/7.3           asianux8.0           | Asianux Server 8                                   | 8.0      | http://asianux.com/asianux/8.0           centos6.10           | CentOS 6.10                                        | 6.10     | http://centos.org/centos/6.10            centos6.2            | CentOS 6.2                                         | 6.2      | http://centos.org/centos/6.2             centos6.3            | CentOS 6.3                                         | 6.3      | http://centos.org/centos/6.3             centos6.4            | CentOS 6.4                                         | 6.4      | http://centos.org/centos/6.4             centos6.5            | CentOS 6.5                                         | 6.5      | http://centos.org/centos/6.5             centos6.6            | CentOS 6.6                                         | 6.6      | http://centos.org/centos/6.6             centos6.7            | CentOS 6.7                                         | 6.7      | http://centos.org/centos/6.7             centos6.8            | CentOS 6.8                                         | 6.8      | http://centos.org/centos/6.8             centos6.9            | CentOS 6.9                                         | 6.9      | http://centos.org/centos/6.9             centos7.0            | CentOS 7                                           | 7        | http://centos.org/centos/7.0             centos8              | CentOS 8                                           | 8        | http://centos.org/centos/8               debian1.1            | Debian GNU/Linux 1.1                               | 1.1      | http://debian.org/debian/1.1             debian1.2            | Debian GNU/Linux 1.2                               | 1.2      | http://debian.org/debian/1.2             debian1.3            | Debian GNU/Linux 1.3                               | 1.3      | http://debian.org/debian/1.3             debian10             | Debian 10                                          | 10       | http://debian.org/debian/10              debian11             | Debian 11                                          | 11       | http://debian.org/debian/11              debian2.0            | Debian GNU/Linux 2.0                               | 2.0      | http://debian.org/debian/2.0             debian2.1            | Debian GNU/Linux 2.1                               | 2.1      | http://debian.org/debian/2.1             debian2.2            | Debian GNU/Linux 2.2                               | 2.2      | http://debian.org/debian/2.2             debian3              | Debian GNU/Linux 3.0                               | 3.0      | http://debian.org/debian/3               debian3.1            | Debian GNU/Linux 3.1                               | 3.1      | http://debian.org/debian/3.1             debian4              | Debian GNU/Linux 4.0                               | 4.0      | http://debian.org/debian/4               debian5              | Debian GNU/Linux 5.0                               | 5.0      | http://debian.org/debian/5               debian6              | Debian 6.0                                         | 6.0      | http://debian.org/debian/6               debian7              | Debian 7                                           | 7        | http://debian.org/debian/7               debian8              | Debian 8                                           | 8        | http://debian.org/debian/8               debian9              | Debian 9                                           | 9        | http://debian.org/debian/9               ol7.4                | Oracle Linux 7.4                                   | 7.4      | http://oracle.com/ol/7.4                 ol7.5                | Oracle Linux 7.5                                   | 7.5      | http://oracle.com/ol/7.5                 ol7.6                | Oracle Linux 7.6                                   | 7.6      | http://oracle.com/ol/7.6                 ol7.7                | Oracle Linux 7.7                                   | 7.7      | http://oracle.com/ol/7.7                 ol7.8                | Oracle Linux 7.8                                   | 7.8      | http://oracle.com/ol/7.8                 ol7.9                | Oracle Linux 7.9                                   | 7.9      | http://oracle.com/ol/7.9                 ol8.0                | Oracle Linux 8.0                                   | 8.0      | http://oracle.com/ol/8.0                 ol8.1                | Oracle Linux 8.1                                   | 8.1      | http://oracle.com/ol/8.1                 ol8.2                | Oracle Linux 8.2                                   | 8.2      | http://oracle.com/ol/8.2                 ol8.3                | Oracle Linux 8.3                                   | 8.3      | http://oracle.com/ol/8.3                 ol8.4                | Oracle Linux 8.4                                   | 8.4      | http://oracle.com/ol/8.4                 ol8.5                | Oracle Linux 8.5                                   | 8.5      | http://oracle.com/ol/8.5                 openbsd6.8           | OpenBSD 6.8                                        | 6.8      | http://openbsd.org/openbsd/6.8           openbsd6.9           | OpenBSD 6.9                                        | 6.9      | http://openbsd.org/openbsd/6.9           opensolaris2009.06   | OpenSolaris 2009.06                                | 2009.06  | http://sun.com/opensolaris/2009.06       opensuse-factory     | openSUSE                                           | factory  | http://opensuse.org/opensuse/factory     opensuse-unknown     | openSUSE                                           | unknown  | http://opensuse.org/opensuse/unknown     opensuse10.2         | openSUSE 10.2                                      | 10.2     | http://opensuse.org/opensuse/10.2        opensuse10.3         | openSUSE 10.3                                      | 10.3     | http://opensuse.org/opensuse/10.3        opensuse11.0         | openSUSE 11.0                                      | 11.0     | http://opensuse.org/opensuse/11.0        opensuse11.1         | openSUSE 11.1                                      | 11.1     | http://opensuse.org/opensuse/11.1        opensuse11.2         | openSUSE 11.2                                      | 11.2     | http://opensuse.org/opensuse/11.2        opensuse11.3         | openSUSE 11.3                                      | 11.3     | http://opensuse.org/opensuse/11.3        opensuse11.4         | openSUSE 11.4                                      | 11.4     | http://opensuse.org/opensuse/11.4        opensuse12.1         | openSUSE 12.1                                      | 12.1     | http://opensuse.org/opensuse/12.1        opensuse12.2         | openSUSE 12.2                                      | 12.2     | http://opensuse.org/opensuse/12.2        opensuse12.3         | openSUSE 12.3                                      | 12.3     | http://opensuse.org/opensuse/12.3        opensuse13.1         | openSUSE 13.1                                      | 13.1     | http://opensuse.org/opensuse/13.1        opensuse13.2         | openSUSE 13.2                                      | 13.2     | http://opensuse.org/opensuse/13.2        opensuse15.0         | openSUSE Leap 15.0                                 | 15.0     | http://opensuse.org/opensuse/15.0        opensuse15.1         | openSUSE Leap 15.1                                 | 15.1     | http://opensuse.org/opensuse/15.1        opensuse15.2         | openSUSE Leap 15.2                                 | 15.2     | http://opensuse.org/opensuse/15.2        opensuse15.3         | openSUSE Leap 15.3                                 | 15.3     | http://opensuse.org/opensuse/15.3        opensuse42.1         | openSUSE Leap 42.1                                 | 42.1     | http://opensuse.org/opensuse/42.1        opensuse42.2         | openSUSE Leap 42.2                                 | 42.2     | http://opensuse.org/opensuse/42.2        opensuse42.3         | openSUSE Leap 42.3                                 | 42.3     | http://opensuse.org/opensuse/42.3        popos17.10           | Pop!_OS 17.10                                      | 17.10    | http://system76.com/popos/17.10          popos18.04           | Pop!_OS 18.04                                      | 18.04    | http://system76.com/popos/18.04          popos18.10           | Pop!_OS 18.10                                      | 18.10    | http://system76.com/popos/18.10          popos19.04           | Pop!_OS 19.04                                      | 19.04    | http://system76.com/popos/19.04          popos19.10           | Pop!_OS 19.10                                      | 19.10    | http://system76.com/popos/19.10          popos20.04           | Pop!_OS 20.04                                      | 20.04    | http://system76.com/popos/20.04          popos20.10           | Pop!_OS 20.10                                      | 20.10    | http://system76.com/popos/20.10          pureos8              | PureOS                                             | 8        | http://pureos.net/pureos/8               rhel-atomic-7.0      | Red Hat Enterprise Linux Atomic Host 7.0           | 7.0      | http://redhat.com/rhel-atomic/7.0        rhel-atomic-7.1      | Red Hat Enterprise Linux Atomic Host 7.1           | 7.1      | http://redhat.com/rhel-atomic/7.1        rhel-atomic-7.2      | Red Hat Enterprise Linux Atomic Host 7.2           | 7.2      | http://redhat.com/rhel-atomic/7.2        rhel-atomic-7.3      | Red Hat Enterprise Linux Atomic Host 7.3           | 7.3      | http://redhat.com/rhel-atomic/7.3        rhel-atomic-7.4      | Red Hat Enterprise Linux Atomic Host 7.4           | 7.4      | http://redhat.com/rhel-atomic/7.4        rhel6.1              | Red Hat Enterprise Linux 6.1                       | 6.1      | http://redhat.com/rhel/6.1               rhel6.10             | Red Hat Enterprise Linux 6.10                      | 6.10     | http://redhat.com/rhel/6.10              rhel6.2              | Red Hat Enterprise Linux 6.2                       | 6.2      | http://redhat.com/rhel/6.2               rhel6.3              | Red Hat Enterprise Linux 6.3                       | 6.3      | http://redhat.com/rhel/6.3               rhel6.4              | Red Hat Enterprise Linux 6.4                       | 6.4      | http://redhat.com/rhel/6.4               rhel6.5              | Red Hat Enterprise Linux 6.5                       | 6.5      | http://redhat.com/rhel/6.5               rhel6.6              | Red Hat Enterprise Linux 6.6                       | 6.6      | http://redhat.com/rhel/6.6               rhel6.7              | Red Hat Enterprise Linux 6.7                       | 6.7      | http://redhat.com/rhel/6.7               rhel6.8              | Red Hat Enterprise Linux 6.8                       | 6.8      | http://redhat.com/rhel/6.8               rhel6.9              | Red Hat Enterprise Linux 6.9                       | 6.9      | http://redhat.com/rhel/6.9               rhel7.0              | Red Hat Enterprise Linux 7.0                       | 7.0      | http://redhat.com/rhel/7.0               rhel7.1              | Red Hat Enterprise Linux 7.1                       | 7.1      | http://redhat.com/rhel/7.1               rhel7.2              | Red Hat Enterprise Linux 7.2                       | 7.2      | http://redhat.com/rhel/7.2               rhel7.3              | Red Hat Enterprise Linux 7.3                       | 7.3      | http://redhat.com/rhel/7.3               rhel7.4              | Red Hat Enterprise Linux 7.4                       | 7.4      | http://redhat.com/rhel/7.4               rhel7.5              | Red Hat Enterprise Linux 7.5                       | 7.5      | http://redhat.com/rhel/7.5               rhel7.6              | Red Hat Enterprise Linux 7.6                       | 7.6      | http://redhat.com/rhel/7.6               rhel7.7              | Red Hat Enterprise Linux 7.7                       | 7.7      | http://redhat.com/rhel/7.7               rhel7.8              | Red Hat Enterprise Linux 7.8                       | 7.8      | http://redhat.com/rhel/7.8               rhel7.9              | Red Hat Enterprise Linux 7.9                       | 7.9      | http://redhat.com/rhel/7.9               rhel8.0              | Red Hat Enterprise Linux 8.0                       | 8.0      | http://redhat.com/rhel/8.0               rhel8.1              | Red Hat Enterprise Linux 8.1                       | 8.1      | http://redhat.com/rhel/8.1               rhel8.2              | Red Hat Enterprise Linux 8.2                       | 8.2      | http://redhat.com/rhel/8.2               rhel8.3              | Red Hat Enterprise Linux 8.3                       | 8.3      | http://redhat.com/rhel/8.3               rhel8.4              | Red Hat Enterprise Linux 8.4                       | 8.4      | http://redhat.com/rhel/8.4               rhel8.5              | Red Hat Enterprise Linux 8.5                       | 8.5      | http://redhat.com/rhel/8.5               rhel9.0              | Red Hat Enterprise Linux 9.0                       | 9.0      | http://redhat.com/rhel/9.0               rhl6.0               | Red Hat Linux 6.0                                  | 6.0      | http://redhat.com/rhl/6.0                rhl6.1               | Red Hat Linux 6.1                                  | 6.1      | http://redhat.com/rhl/6.1                rhl6.2               | Red Hat Linux 6.2                                  | 6.2      | http://redhat.com/rhl/6.2                rhl7                 | Red Hat Linux 7                                    | 7        | http://redhat.com/rhl/7                  rhl7.1               | Red Hat Linux 7.1                                  | 7.1      | http://redhat.com/rhl/7.1                rhl7.2               | Red Hat Linux 7.2                                  | 7.2      | http://redhat.com/rhl/7.2                rhl7.3               | Red Hat Linux 7.3                                  | 7.3      | http://redhat.com/rhl/7.3                rhl8.0               | Red Hat Linux 8.0                                  | 8.0      | http://redhat.com/rhl/8.0                rhl9                 | Red Hat Linux 9                                    | 9        | http://redhat.com/rhl/9                  rocky8.4             | Rocky Linux 8.4                                    | 8.4      | http://rockylinux.org/rocky/8.4          rocky8.5             | Rocky Linux 8.5                                    | 8.5      | http://rockylinux.org/rocky/8.5          rocky8.6             | Rocky Linux 8.6                                    | 8.6      | http://rockylinux.org/rocky/8.6          rocky9.0             | Rocky Linux 9.0                                    | 9.0      | http://rockylinux.org/rocky/9.0      sled12sp1            | SUSE Linux Enterprise Desktop 12 SP1               | 12.1     | http://suse.com/sled/12.1                sled12sp2            | SUSE Linux Enterprise Desktop 12 SP2               | 12.2     | http://suse.com/sled/12.2                sled12sp3            | SUSE Linux Enterprise Desktop 12 SP3               | 12.3     | http://suse.com/sled/12.3                sled12sp4            | SUSE Linux Enterprise Desktop 12 SP4               | 12.4     | http://suse.com/sled/12.4                sled12sp5            | SUSE Linux Enterprise Desktop 12 SP5               | 12.5     | http://suse.com/sled/12.5                sles12               | SUSE Linux Enterprise Server 12                    | 12       | http://suse.com/sles/12                  sles12sp1            | SUSE Linux Enterprise Server 12 SP1                | 12.1     | http://suse.com/sles/12.1                sles12sp2            | SUSE Linux Enterprise Server 12 SP2                | 12.2     | http://suse.com/sles/12.2                sles12sp3            | SUSE Linux Enterprise Server 12 SP3                | 12.3     | http://suse.com/sles/12.3                sles12sp4            | SUSE Linux Enterprise Server 12 SP4                | 12.4     | http://suse.com/sles/12.4                sles12sp5            | SUSE Linux Enterprise Server 12 SP5                | 12.5     | http://suse.com/sles/12.5                sles9                | SUSE Linux Enterprise Server 9                     | 9        | http://suse.com/sles/9                   solaris10            | Solaris 10                                         | 10       | http://sun.com/solaris/10                solaris11            | Oracle Solaris 11                                  | 11       | http://oracle.com/solaris/11             solaris9             | Solaris 9                                          | 9        | http://sun.com/solaris/9                 trisquel9            | Trisquel                                           | 9        | http://trisquel.info/trisquel/9          ubuntu20.04          | Ubuntu 20.04 LTS                                   | 20.04    | http://ubuntu.com/ubuntu/20.04           ubuntu20.10          | Ubuntu 20.10                                       | 20.10    | http://ubuntu.com/ubuntu/20.10           ubuntu21.04          | Ubuntu 21.04                                       | 21.04    | http://ubuntu.com/ubuntu/21.04           ubuntu21.10          | Ubuntu 21.10                                       | 21.10    | http://ubuntu.com/ubuntu/21.10           win1.0               | Microsoft Windows 1.0                              | 1.0      | http://microsoft.com/win/1.0             win10                | Microsoft Windows 10                               | 10.0     | http://microsoft.com/win/10              win2.0               | Microsoft Windows 2.0                              | 2.0      | http://microsoft.com/win/2.0             win2.1               | Microsoft Windows 2.1                              | 2.1      | http://microsoft.com/win/2.1             win2k                | Microsoft Windows 2000                             | 5.0      | http://microsoft.com/win/2k              win2k12              | Microsoft Windows Server 2012                      | 6.3      | http://microsoft.com/win/2k12            win2k12r2            | Microsoft Windows Server 2012 R2                   | 6.3      | http://microsoft.com/win/2k12r2          win2k16              | Microsoft Windows Server 2016                      | 10.0     | http://microsoft.com/win/2k16            win2k19              | Microsoft Windows Server 2019                      | 10.0     | http://microsoft.com/win/2k19            win2k22              | Microsoft Windows Server 2022                      | 10.0     | http://microsoft.com/win/2k22            win2k3               | Microsoft Windows Server 2003                      | 5.2      | http://microsoft.com/win/2k3             win2k3r2             | Microsoft Windows Server 2003 R2                   | 5.2      | http://microsoft.com/win/2k3r2           win2k8               | Microsoft Windows Server 2008                      | 6.0      | http://microsoft.com/win/2k8             win2k8r2             | Microsoft Windows Server 2008 R2                   | 6.1      | http://microsoft.com/win/2k8r2           win3.1               | Microsoft Windows 3.1                              | 3.1      | http://microsoft.com/win/3.1             win7                 | Microsoft Windows 7                                | 6.1      | http://microsoft.com/win/7               win8                 | Microsoft Windows 8                                | 6.2      | http://microsoft.com/win/8               win8.1               | Microsoft Windows 8.1                              | 6.3      | http://microsoft.com/win/8.1             win95                | Microsoft Windows 95                               | 4.0      | http://microsoft.com/win/95              win98                | Microsoft Windows 98                               | 4.1      | http://microsoft.com/win/98              winme                | Microsoft Windows Millennium Edition               | 4.9      | http://microsoft.com/win/me              winnt3.1             | Microsoft Windows NT Server 3.1                    | 3.1      | http://microsoft.com/winnt/3.1           winnt3.5             | Microsoft Windows NT Server 3.5                    | 3.5      | http://microsoft.com/winnt/3.5           winnt3.51            | Microsoft Windows NT Server 3.51                   | 3.51     | http://microsoft.com/winnt/3.51          winnt4.0             | Microsoft Windows NT Server 4.0                    | 4.0      | http://microsoft.com/winnt/4.0           winvista             | Microsoft Windows Vista                            | 6.0      | http://microsoft.com/win/vista           winxp                | Microsoft Windows XP                               | 5.1      | http://microsoft.com/win/xp

命令行部署的 Windows 虚拟机是如何完成系统安装的?

你是否好奇,全是命令行的执行方式,如何完成操作系统安装过程中需要图形化操作的内容?这个秘密就存在于以下选项中:

--graphics vnc,listen=0.0.0.0,port=5901,password=Tmp4950Pa20
  • • --graphics 设置虚拟机的图形显示方式
  • • vnc 图形输出使用 VNC 协议
  • • listen=0.0.0.0 VNC 监听所有网卡 IP
  • • port=5901 VNC 连接端口号,设置不同的端口号就可以管理不同的虚拟机
  • • password=Tmp4950Pa20 VNC 连接密码

下载一个 VNC 客户端,使用上面的连接信息,即可在图形界面环境中完成操作系统的安装。

命令行管理虚拟机时的注意事项

强制关闭

有时候使用 virsh shutdown myvm 过于温柔无法关闭虚拟机,可以通过 virsh destroy myvm 进行强制断电。

查询虚拟机的 IP 地址

虚拟机默认使用 DHCP 的方式获得 IP,可以通过如下命令查询:

[root@appt02 ~]# virsh net-dhcp-leases default
 Expiry Time          MAC address        Protocol  IP address                Hostname        Client ID or DUID
-------------------------------------------------------------------------------------------------------------------
 2026-04-27 22:44:00  52:54:00:25:a1:ef  ipv4      192.168.122.39/24         DESKTOP-82TEH0H 01:52:54:00:25:a1:ef
 2026-04-27 22:27:27  52:54:00:88:12:7c  ipv4      192.168.122.210/24        WIN-BVHD77ISGU6 01:52:54:00:88:12:7c

安全删除

使用 virsh undefine myvm 时仅删除了相关的定义文件,对应的磁盘文件还在占用空间。查询virsh的帮助手册时会发现有一个选项 --remove-all-storage 可以达成我们的目标,而如果你真的使用 virsh undefine --remove-all-storage myvm 想一并删除磁盘文件时,会发现它连系统镜像 ISO文件也一并删除了,这通常不是我们需要的结果(保留 ISO 文件方便下次使用)。

标准删除虚拟机的流程,可以这样操作:

  1. 1. 正常关机/强制关机
    virsh shutdown myvm # 正常关机virsh destroy myvm  # 强制关机
  2. 2. 确认已关机
     virsh list --all
  3. 3. 删除定义文件
    virsh undefine myvm
  4. 4. 手动删除磁盘文件
    rm /path/to/xxx.qcow2

写在最后

在实际部署和使用 KVM 的过程中,很多问题往往出在一些容易被忽视的配置细节或经验盲区,例如性能调优、网络配置、存储选择以及常见故障的排查思路等。这些内容看似零散,却直接影响到虚拟化环境的稳定性与使用体验。

祝你用的愉快~


💬 欢迎在评论区留下你的真知灼见~

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-04 13:54:05 HTTP/2.0 GET : https://f.mffb.com.cn/a/489971.html
  2. 运行时间 : 0.162780s [ 吞吐率:6.14req/s ] 内存消耗:4,705.65kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=fb82f6ef172a02b166f02ed5f27de78e
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000448s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000621s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.003634s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.011435s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000523s ]
  6. SELECT * FROM `set` [ RunTime:0.024578s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000588s ]
  8. SELECT * FROM `article` WHERE `id` = 489971 LIMIT 1 [ RunTime:0.003059s ]
  9. UPDATE `article` SET `lasttime` = 1783144445 WHERE `id` = 489971 [ RunTime:0.022272s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000328s ]
  11. SELECT * FROM `article` WHERE `id` < 489971 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000575s ]
  12. SELECT * FROM `article` WHERE `id` > 489971 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000667s ]
  13. SELECT * FROM `article` WHERE `id` < 489971 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.010079s ]
  14. SELECT * FROM `article` WHERE `id` < 489971 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002766s ]
  15. SELECT * FROM `article` WHERE `id` < 489971 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.008504s ]
0.164518s