virtualbox - oracle virtual box中虚拟机的命令行安装
问题描述
在主机(centos7)中寻找centos7虚拟机的命令行安装。
遵循了几个选项,但是一旦创建了 vm,它就无法获取 ip 并且无法从主机服务器访问来宾机器
遵循以下方法
1. VBoxManage createvm --name centos-server --ostype Linux --register
Virtual machine 'centos-server' is created and registered.
UUID:6eb514b4-a1f3-4454-9d76-2be9d0f76cb3 设置文件:'/root/VirtualBox VMs/centos-server/centos-server.vbox'
2. VBoxManage modifyvm centos-server --bridgeadapter1 vmnet1
3.
VBoxManage modifyvm centos-server --memory 2048
4
VBoxManage createhd --filename VirtualBox\ VMs/centos-server/centos-server.vdi --size 10000 --format VDI
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%... 100% 媒体创建。UUID:adae09bb-d01b-42ee-9383-69ef59b2cbf6 ===== /root/VirtualBox VMs/VirtualBox VMs/centos-server/centos-server.vdi
- VBoxManage storagectl centos-server --name "SATA Controller" --add sata --controller IntelAhci
6.
VBoxManage storageattach centos-server --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium VirtualBox\ VMs/centos-server/centos-server.vdi 如果不工作
VBoxManage storageattach centos-server --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "/root/VirtualBox VMs/VirtualBox VMs/centos-server/centos-server.vdi"
7.
VBoxManage storagectl centos-server --name "IDE Controller" --add ide --controller PIIX4
8.
VBoxManage storageattach centos-server --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium /opt/CentOS-7-x86_64-DVD-1908.iso
9.
VBoxManage startvm centos-server --type headless
得到如下错误
等待 VM "centos-server" 开机... VBoxManage: 错误: VT-x 不可用 (VERR_VMX_NO_VMX) VBoxManage: 错误: 详细信息: 代码 NS_ERROR_FAILURE (0x80004005), 组件 ConsoleWrap, 接口 IConsole
解决方案
推荐阅读
- doctrine-orm - Doctrine中OneToOne关系不能懒加载的原因是什么?
- php - 如何找到数组的最后一项?
- flutter - 为什么必须在 Flutter 中使用 await 来保存/获取本地数据?
- three.js - Aframe / Three.js 受污染的画布可能无法加载
- elasticsearch - 如何在弹性搜索中总结文档
- c - 多个弱符号的后果(C 链接器)
- flask - Flask Werkzeug 文件中的本地文件不起作用
- r - deploy shinyapp.io 显示在 github 上找不到包的错误
- r - 检查列值是否影响 R 中的行值
- c++11 - 使用 auto 实例化私有类