zoukankan      html  css  js  c++  java
  • centos6.7 安装 virtualBox 再安装 centos 7

    Tag: 黄色为自己实际情况需要设置的部分,绿色部分为虚拟机名称(自定义)

    1.创建虚拟机
    VBoxManage createvm --name centos7 --ostype Linux26_64 --register --basefolder /home/virtualbox/

    VBoxManage list ostypes(查看支持的操作系统类型)

    2.创建磁盘
    VBoxManage createvdi --filename /home/virtualbox/centos7.vdi --size 40000

    3.创建硬盘控制器
    VBoxManage storagectl centos7 --name storage_controller_1 --add ide

    4.挂载虚拟机硬盘
    VBoxManage storageattach centos7 --storagectl storage_controller_1 --type hdd --port 0 --device 0 --medium /home/virtualbox/centos7.vdi

    5.挂载虚拟机光驱(操作系统镜像)
    VBoxManage storageattach centos7 --storagectl storage_controller_1 --type dvddrive --port 1 --device 0 --medium /home/download/VirtualBox/CentOS-7-x86_64-Minimal-1804.iso

    6.设置启动顺序,光驱第一,硬盘第二
    VBoxManage modifyvm centos7 --boot1 dvd
    VBoxManage modifyvm centos7 --boot2 disk

    7.创建桥接的网络
    VBoxManage modifyvm centos7 --nic1 bridged --cableconnected1 on --nictype1 82540EM --bridgeadapter1 p2p1 --intnet1 brigh1 --macaddress1 auto

    8.开启vrde 模块(关闭),需要安装VirtualBox 扩展模块,以支持RDP协议,镜像桌面连接
    VBoxManage modifyvm centos7 --vrde on
    VBoxManage modifyvm centos7 --vrde off(暂时不用)

    9.设置虚拟机内存和CPU
    VBoxManage modifyvm centos7 --memory 8192
    VBoxManage modifyvm centos7 --cpus 2

    10.启动虚拟机
    VBoxManage -startvm centos7 -type headless (后台启动)

    ps: 更新宿主机操作系统内核 yum -y install kernel

  • 相关阅读:
    Android开发 default activity not found
    git仓库的初始化
    微服务学习----分布式锁
    Spring boot 学习 ---- Spring Security
    虚拟容器化学习----Docker学习
    Java学习----JVM学习
    spring boot学习 ---- spring boot 之注解(持续更新)
    其他技术----protobuf
    Spring Boot 学习 ---- 监听器
    Spring Boot学习----拦截器
  • 原文地址:https://www.cnblogs.com/yako/p/9264912.html
Copyright © 2011-2022 走看看