zoukankan      html  css  js  c++  java
  • 【常用操作】VMware Esxi配置磁盘直通裸映射虚拟机

    一、前言

    基于VMware Exsi环境,考虑到特殊业务需求,需要直接将磁盘数据提供给虚拟机使用。
    本文主要介绍,如何配置磁盘直通,将磁盘裸映射提供给虚拟机使用。

    二、配置过程

    1、通过VMware vSphere Client查看新增磁盘名称,对比Exsi后台/vmfs/devices/disks/确定新增磁盘对应ID为naa.61866da0692804002855fa603ff25fd9naa.61866da0692804002857277b3277bf87naa.61866da069280400285727ff3a59e706naa.61866da0692804002857290f4a8b4bfc

    [root@localhost:~] ls /vmfs/devices/disks/
    naa.5000c500a323807b                                        naa.50014ee0aeb167e9:8                                      vml.020000000050014ee0aeb167e9574443205744:1
    naa.5000c500a323807b:1                                      naa.50014ee0aeb167e9:9                                      vml.020000000050014ee0aeb167e9574443205744:2
    naa.5000c500a3264fe7                                        naa.61866da0692804002855fa603ff25fd9                        vml.020000000050014ee0aeb167e9574443205744:3
    naa.5000c500a3264fe7:1                                      naa.61866da0692804002857277b3277bf87                        vml.020000000050014ee0aeb167e9574443205744:5
    naa.5000c500a39a682b                                        naa.61866da069280400285727ff3a59e706                        vml.020000000050014ee0aeb167e9574443205744:6
    naa.5000c500a39a682b:1                                      naa.61866da0692804002857290f4a8b4bfc                        vml.020000000050014ee0aeb167e9574443205744:7
    naa.50014ee0aeb167e9                                        vml.02000000005000c500a323807b535436303030                  vml.020000000050014ee0aeb167e9574443205744:8
    naa.50014ee0aeb167e9:1                                      vml.02000000005000c500a323807b535436303030:1                vml.020000000050014ee0aeb167e9574443205744:9
    naa.50014ee0aeb167e9:2                                      vml.02000000005000c500a3264fe7535436303030                  vml.020000000061866da0692804002855fa603ff25fd9504552432048
    naa.50014ee0aeb167e9:3                                      vml.02000000005000c500a3264fe7535436303030:1                vml.020000000061866da0692804002857277b3277bf87504552432048
    naa.50014ee0aeb167e9:5                                      vml.02000000005000c500a39a682b535436303030                  vml.020000000061866da069280400285727ff3a59e706504552432048
    naa.50014ee0aeb167e9:6                                      vml.02000000005000c500a39a682b535436303030:1                vml.020000000061866da0692804002857290f4a8b4bfc504552432048
    naa.50014ee0aeb167e9:7                                      vml.020000000050014ee0aeb167e9574443205744
    2、通过vmkfstools -z将新增磁盘映射到数据存储指定虚拟磁盘文件中
    [root@localhost:~] vmkfstools -z /vmfs/devices/disks/naa.61866da0692804002855fa603ff25fd9 /vmfs/volumes/datastore/naa.61866da0692804002855fa603ff25fd9.vmdk 
    
    [root@localhost:~] vmkfstools -z /vmfs/devices/disks/naa.61866da0692804002857277b3277bf87 /vmfs/volumes/datastore/naa.61866da0692804002857277b3277bf87.vmdk
    
    [root@localhost:~] vmkfstools -z /vmfs/devices/disks/naa.61866da069280400285727ff3a59e706 /vmfs/volumes/datastore/naa.61866da069280400285727ff3a59e706.vmdk
    
    [root@localhost:~] vmkfstools -z /vmfs/devices/disks/naa.61866da0692804002857290f4a8b4bfc /vmfs/volumes/datastore/naa.61866da0692804002857290f4a8b4bfc.vmdk

    注:/vmfs/volumes/datastore/中datastore为数据存储路径

    [root@localhost:~] ls /vmfs/volumes/datastore/
    CentOS-6.5-x86_64-bin-DVD1.iso                  naa.61866da0692804002857277b3277bf87-rdmp.vmdk  naa.61866da069280400285727ff3a59e706.vmdk       ubuntu-16.04.6-server-arm64.iso
    naa.61866da0692804002855fa603ff25fd9-rdmp.vmdk  naa.61866da0692804002857277b3277bf87.vmdk       naa.61866da0692804002857290f4a8b4bfc-rdmp.vmdk  ubuntu-20.04.2.0-desktop-amd64.iso
    naa.61866da0692804002855fa603ff25fd9.vmdk       naa.61866da069280400285727ff3a59e706-rdmp.vmdk  naa.61866da0692804002857290f4a8b4bfc.vmdk
    3、编辑虚拟机,添加虚拟磁盘文件到虚拟机上,之后重启虚拟机即可看到映射磁盘

  • 相关阅读:
    IntelliJ Idea和IntelliJ webstrm 常用快捷键
    mybatis基础学习2---(resultType和resultMap的用法和区别)和setting的用法
    使用观察者模式观察线程的生命周期
    观察者设计模式介绍
    java的内存模型及缓存问题
    一个解释volatile关键字作用的最好的例子
    多线程的waitset详细介绍
    浅谈单例模式
    SimpleThreadPool给线程池增加自动扩充线程数量,以及闲时自动回收的功能
    SimpleThreadPool给线程池增加拒绝策略和停止方法
  • 原文地址:https://www.cnblogs.com/luxf0/p/14889050.html
Copyright © 2011-2022 走看看