首页 > 解决方案 > 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

  1. 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 Con​​troller" --add ide --controller PIIX4

8.

VBoxManage storageattach centos-server --storagectl "IDE Con​​troller" --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

标签: virtualbox

解决方案


推荐阅读