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

mac电脑安装虚拟机教程

1、准备一台虚拟机,安装CentOS7

 常用的虚拟化软件有两种:

  • VirtualBox
  • VMware

这里我们使用VirtualBox来安装虚拟机,下载地址:Downloads – Oracle VM VirtualBox

001 点击安装

002 报错:he installer has detected an unsupported architecture. VirtualBox only runs on the amd64 architecture.

 003 解决报错方法:

a. 点击这个文件:

b. 在设置--安全与隐私--通用---仍要打开 

 c.成功打开

004 这时候,回来点击step1,发现还是报错,之前的操作都白费了

005 找了相关文档,发现还不支持m1,m2,arm架构

a.文档查找:

Best Virtual Machine For Mac of 2023 (inc. M1, M2 & M3 Macs)  


b.去官网下载test版本

链接:Testbuilds – Oracle VM VirtualBox

安装成功截图:

2、下载vagrant

2.1 下载

Install | Vagrant | HashiCorp Developer

2.2 安装vagrant

a. 点击下一步,下一步,知道安装成功 

b.测试是否安装成功

vagrant安装成功以后,并没有gui客户端,需要通过打开终端, 测试是否安装成功,运行命令:

vagrant

 3、使用vagrant给virtualbox创建linux虚拟机

3.1 只需要一个命令,即可初始化centOS7系统

Vagrant int cenos/7

3.2 运行vagrant up,即可启动虚拟机

vagrant up

系统root用户的密码是:vagrant

3.3 vagrant官方镜像仓库(了解)

vagrant镜像仓库地址:Discover Vagrant Boxes - Vagrant Cloud

vagrant中有很多做好的镜像仓库,然后使用cmd命令行使用命令进行下载。

 3.4 下载cenos/7镜像

a. 运行 vagrant init centos/7

vagrant init centos/7

b.运行 vagrant up 启动虚拟机

vagrant up

c.运行 vagrant ssh即可登录上虚拟机VM

vagrant ssh

报错及解决

问题:macOS M1芯片,运行vagrant up后,报错如下:

The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'aborted' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.

The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.

解决:

暂时没找到解决方案

4、使用vmware

新建

点击继续 

拖动文件,点击继续

 

 

 点击处理器和内存

 

设置40g

 设置网络

启动

 启动中截图:

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

相关文章:

  • 手动配置 kafka 用户密码,认证方式等的方式
  • 机器学习 深度学习 神经网络
  • VCG 获取某个顶点的邻接顶点
  • 四川云汇优想教育咨询有限公司电商服务靠谱吗
  • Spring MVC框架支持RESTful,设计URL时可以使用{自定义名称}的占位符@Get(“/{id:[0-9]+}/delete“)
  • 【GoLang】哪些大公司正在使用Go语言
  • 美团外卖商超商品销量数据
  • 【C++高阶(八)】单例模式特殊类的设计
  • Linux之进程(五)(进程控制)
  • 63. 不同路径 II 23.12.21(二)
  • 【线性代数】两个向量组等价,其中一个向量组线性无关,另一个向量组也是线性无关吗?
  • c语言:指针作为参数传递
  • YOLOv5性能评估指标->mAP、Precision、Recall、FPS、Confienc (讲解论文关注的主要指标)
  • 陶建辉在 CIAS 2023 谈“新能源汽车的数字化”
  • PSP - 结构生物学中的机器学习 (NIPS MLSB Workshop 2023.12)
  • 某领先的集成电路研发中心:建立跨网交换平台 杜绝数据泄露风险
  • map|动态规划|单调栈|LeetCode975:奇偶跳
  • 从安全性角度,看“可信数字底座”有何价值
  • 软件设计模式:UML类图
  • 力扣题目学习笔记(OC + Swift)15. 三数之和
  • 想将电脑屏幕共享到iPhone上,但电脑是Linux系统,可行吗?
  • 大华 DSS 城市安防数字监控系统 SQL 注入漏洞
  • vue中的侦听器和组件之间的通信
  • maven-shade-plugin有什么用
  • 本地部署 OpenVoice
  • 【模式识别】解锁降维奥秘:深度剖析PCA人脸识别技术
  • 大模型赋能“AI+电商”,景联文科技提供高质量电商场景数据
  • 深度比较(lodash 的 isEqual 方法)
  • Ansible常用模块详解(附各模块应用实例和Ansible环境安装部署)
  • QT中网络编程之发送Http协议的Get和Post请求