当前位置: 首页 > news >正文

虚拟机知识点-Vagrant 在通过 VirtualBox 启动 CentOS 虚拟机时失败-VERR_NEM_VM_CREATE_FAILED

1.背景

Vagrant 在通过 VirtualBox 启动 CentOS 虚拟机时失败,报下列错误:

C:\Users\ymcfy>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' version '2004.01' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...default: Adapter 1: nat
==> default: Forwarding ports...default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.Command: ["startvm", "d96e4abe-4361-47f8-a682-a1766d0b0f2a", "--type", "headless"]Stderr: VBoxManage.exe: error: Failed to get device handle and/or partition ID for 00000000017c43c0 (hPartitionDevice=0000000000000aa9, Last=0xc0000002/1) (VERR_NEM_VM_CREATE_FAILED)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

2.原因

(1)当前windows开启了hype-v

(2)使用wsl时开启了虚拟机

3.解决步骤

(1)用管理员启动Powershell,务必用管理员启动

(2)执行下列指令,关闭hyper-v

bcdedit /set hypervisorlaunchtype off

(3)执行下列指令,关闭wsl

Disable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

在上述步骤完成后,此问题即可解决。可通过再次使用vagrant up测试

http://www.lryc.cn/news/579085.html

相关文章:

  • 从0开始学习R语言--Day36--空间杜宾模型
  • maven仓库
  • WSL2 + Docker Desktop 环境中查看本地镜像
  • 【Vue入门学习笔记】Vue核心语法
  • CentOS 卸载docker
  • 移动conda虚拟环境的安装目录
  • mongo常用命令
  • odoo17 警示: selection attribute will be ignored as the field is related
  • Node.js-http模块
  • Day04:玩转标准库中的数据处理与日志记录
  • Chart.js 安装使用教程
  • 基于SpringBoot和Leaflet的区域冲突可视化系统(2025企业级实战方案)
  • VC Spyglass:工具简介
  • React Native 开发环境搭建--window--android
  • 24年京东秋季笔试题
  • CSS外边距合并(塌陷)全解析:原理、场景与解决方案
  • flutter更改第三方库pub get的缓存目录;更改.gradle文件夹存放目录
  • 告别告警风暴:深入理解 Prometheus Alertmanager 的智能告警策略
  • 为什么星敏感器(Star Tracker)需要时间同步?—— 从原理到应用的全解析
  • 1-RuoYi框架配置与启动
  • 整流电路Multisim电路仿真实验汇总——硬件工程师笔记
  • qml实现 裁剪进度条
  • 使用案例 - 根据nuscenes-devkit工具读取nuscnes数据集
  • Active-Prompt:让AI更智能地学习推理的革命性技术
  • Ubuntu-18.04-bionic 的apt的/etc/apt/sources.list 更换国内镜像软件源 笔记250702
  • nacos 3 docker 快速部署
  • ES6从入门到精通:其他特性
  • Git 分支与远程仓库基础教学总结
  • 从模型部署到AI平台:云原生环境下的大模型平台化演进路径
  • 21、企业行政办公(OA)数字化转型:系统如何重塑企业高效运营新范式