debian13中使用virtualbox7.2.0安装win10虚拟机失败

使用virtualbox7.2.0 r170228 (Qt6.8.2 on xcb)安装win10虚拟机失败,截图如下

部分日志如下:

00:00:01.625103 VirtualBox VM 7.2.0 r170228 linux.amd64 (Aug 27 2025 08:37:09) release log
00:00:01.625107 Log opened 2025-09-12T02:02:11.070552000Z
00:00:01.625108 Build Type: release
00:00:01.625112 OS Product: Linux
00:00:01.625114 OS Release: 6.12.43+deb13-amd64
00:00:01.625117 OS Version: #1 SMP PREEMPT_DYNAMIC Debian 6.12.43-1 (2025-08-27)
00:00:01.625159 DMI Product Name: All Series
00:00:01.625176 DMI Product Version: System Version
00:00:01.625186 Firmware type: UEFI
00:00:01.625362 Secure Boot: Disabled
00:00:01.625420 Host RAM: 64209MB (62.7GB) total, 52015MB (50.7GB) available
00:00:01.625425 Executable: /usr/lib/virtualbox/VirtualBoxVM
00:00:01.625426 Process ID: 59756
00:00:01.625427 Package type: LINUX_64BITS_DEBIAN_13_0
00:00:01.709146 Installed Extension Packs:
00:00:01.709255 Oracle VirtualBox Extension Pack (Version: 7.2.0 r170228; VRDE Module: VBoxVRDP; Crypto Module: VBoxPuelCrypto)
00:00:01.711092 Console: Machine state changed to ‘Starting’
00:00:01.711507 GUI: Qt version: 6.8.2
00:00:01.711629 GUI: X11 Window Manager code: 2
00:00:01.711736 GUI: HID LEDs sync is not supported on this platform
00:00:01.719051 SUP: seg #0: R 0x00000000 LB 0x00050000
00:00:01.719051 SUP: seg #1: R X 0x00050000 LB 0x00240000
00:00:01.719051 SUP: seg #2: R 0x00290000 LB 0x00078000
00:00:01.719051 SUP: seg #3: RW 0x00308000 LB 0x0002db28
00:00:01.719051 SUP: Loaded VMMR0.r0 (/usr/lib/virtualbox/VMMR0.r0) at 0xXXXXXXXXXXXXXXXX - ModuleInit at XXXXXXXXXXXXXXXX and ModuleTerm at XXXXXXXXXXXXXXXX
00:00:01.719051 SUP: VMMR0EntryEx located at XXXXXXXXXXXXXXXX and VMMR0EntryFast at XXXXXXXXXXXXXXXX
00:00:01.727026 Guest architecture: x86
00:00:01.727314 Guest OS type: ‘Windows10_64’
00:00:01.729441 fHMForced=true - No raw-mode support in this build!
00:00:01.729516 Using execution engine 1
00:00:01.738922 File system of ‘/home/hailo/virtual-machine/VirtualBox/Win10/Win10.vdi’ is fuse
00:00:01.741004 File system of ‘/home/hailo/backup/Download/iso/zh-cn_windows_10_business_editions_version_22h2_updated_may_2023_x64_dvd_b7e877b8.iso’ (DVD) is fuse
00:00:01.751802 Shared Clipboard: Service loaded
00:00:01.751876 Shared Clipboard: Mode: Off
00:00:01.751978 Shared Clipboard: Service running in normal mode
00:00:01.753248 Drag and drop service loaded
00:00:01.753311 Drag and drop mode: Off
00:00:01.770226 GUI: UIMediumEnumerator: Medium-enumeration finished!
00:00:01.770854 X Server details: vendor: The X.Org Foundation, release: 12401006, protocol version: 11.0, display string: :0
00:00:01.770995 Using XKB for keycode to scan code conversion
00:00:01.771996 Audio: Detected default audio driver type is ‘ALSAAudio’
00:00:01.784562 ERROR [COM]: aRC=VBOX_E_IPRT_ERROR (0x80bb0005) aIID={6ac83d89-6ee7-4e33-8ae6-b257b2e81be8} aComponent={ConsoleWrap} aText={The VBoxGuestPropSvc service call failed with the error VERR_HGCM_SERVICE_NOT_FOUND}, preserve=false aResultDetail=-2900

以下内容节选自我尚未发布的新一版《Debian食用手册》

Author: smgdream
License: CC BY-NC-SA 4.0

VirtualBox

对于Linux内核版本为6.16及以上的Linux系统使用VirtualBox 7.2.2及更新版本可正常使用VirtualBox,不过无法同时使用VirtualBox虚拟机和KVM虚拟机。

但对于版本为6.12.x到6.15.x的Linux内核处境就有点尴尬了。VirtualBox从7.2.0某一小版本开始提供了对Debian Trixie的支持,我们可以正常安装并新建设置虚拟机。但你将发现无法启动虚拟机,这是因为从Linux 6.12开始,当加载KVM时将会自动启用虚拟化(通过kvm.enable_virt_at_load功能),这将会独占系统的虚拟化特性,故需要通过一些方法来关闭kvm虚拟化才能使用VirtualBox,方法如下:

方法一
在使用虚拟机前执行以下命令关闭kmv模块以释放虚拟化资源。

modprobe -r kvm_intel kvm

注:如果后续需要使用kvm需重启计算机。

方法二
设置内核命令行参数或modprobe配置以关闭kvm.enable_virt_at_load功能,相应两种子方法如下(以下的法一法二选其一即可):
法一 设置内核启动参数
创建配置文件/etc/default/grub.d/disable-kvm-virt-at-load.cfg并在其中写入以下内容。

GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX kvm.enable_virt_at_load=0"

法二 添加modeset配置
创建配置文件/etc/modprobe.d/disable-kvm-virt-at-load.conf并在其中写入以下内容。

options kvm enable_virt_at_load=0

参考资料

[1] [Bug]: Unsupported resolution for screen shot: 0x0 (screen 0) #144
[2] [Req]: Please set kvm.enable_virt_at_load=0 in /etc/modprobe.d #188
[3] Trouble starting VB - disable KVM
[4] #22248 closed defect (wontfix) Trouble with loaded module “kvm” starting a VM under Kernel 6.12
[5] Linux_6.12 - Linux Kernel Newbies
[6] Linux 6.12 - Linus Torvalds
[7] [PATCH v3 8/8] KVM: Enable virtualization at load/initialization by default - Sean Christopherson
[8] KVM: Add a module param to allow enabling virtualization when KVM is loaded
[9] Re: KVM default behavior change on module loading in kernel 6.12 - by Sean Christopherson
[10] Re: KVM default behavior change on module loading in kernel 6.12 - by Paolo Bonzini
[11] Changelog for VirtualBox 7.2.2
[12] [Bug]: Linux host VERR_SVM_IN_USE after update kernel to 6.14 #81
[13] [Bug]: VMs fail to start with critical error on Linux hosts with Kernel 6.12+ due to KVM module conflict #141

1 个赞

最简单的办法是建议楼主去用 Gnome Boxes ?