ESXi硬盘直通

   

目前exsi中有一个dsm918+系统,引导依靠U盘,有一块数据硬盘,需要直通到dsm系统。
ESXi版本:6.7

启用ssh

登录进入系统后,找到操作->服务->启用安全Shell(SSH)并启用 SSH

通过SSH连接ESXi服务器

连接目标为 ESXi 服务器的 IP,用户名密码与登录 Web UI 时相同

创建VMDK直通硬盘

[root@localhost:~] ls -lh /vmfs/devices/disks/
total 1585236680
-rw-------    1 root     root       59.6G May 14 07:04 t10.ATA_____64GB_SSD________________________________J07369J002758_______
-rw-------    1 root     root        4.0M May 14 07:04 t10.ATA_____64GB_SSD________________________________J07369J002758_______:1
-rw-------    1 root     root        4.0G May 14 07:04 t10.ATA_____64GB_SSD________________________________J07369J002758_______:2
-rw-------    1 root     root       52.2G May 14 07:04 t10.ATA_____64GB_SSD________________________________J07369J002758_______:3
-rw-------    1 root     root      250.0M May 14 07:04 t10.ATA_____64GB_SSD________________________________J07369J002758_______:5
-rw-------    1 root     root      250.0M May 14 07:04 t10.ATA_____64GB_SSD________________________________J07369J002758_______:6
-rw-------    1 root     root      110.0M May 14 07:04 t10.ATA_____64GB_SSD________________________________J07369J002758_______:7
-rw-------    1 root     root      286.0M May 14 07:04 t10.ATA_____64GB_SSD________________________________J07369J002758_______:8
-rw-------    1 root     root        2.5G May 14 07:04 t10.ATA_____64GB_SSD________________________________J07369J002758_______:9
-rw-------    1 root     root      465.8G May 14 07:04 t10.ATA_____HDS725050KLA360_______________________________KRVN67ZBG3WGXF
-rw-------    1 root     root        2.4G May 14 07:04 t10.ATA_____HDS725050KLA360_______________________________KRVN67ZBG3WGXF:1
-rw-------    1 root     root        2.0G May 14 07:04 t10.ATA_____HDS725050KLA360_______________________________KRVN67ZBG3WGXF:2
-rw-------    1 root     root      461.3G May 14 07:04 t10.ATA_____HDS725050KLA360_______________________________KRVN67ZBG3WGXF:3
-rw-------    1 root     root      461.2G May 14 07:04 t10.ATA_____HDS725050KLA360_______________________________KRVN67ZBG3WGXF:5
lrwxrwxrwx    1 root     root          72 May 14 07:04 vml.01000000002020202020204b52564e36375a42473357475846484453373235 -> t10.ATA_____HDS725050KLA360_______________________________KRVN67ZBG3WGXF
lrwxrwxrwx    1 root     root          74 May 14 07:04 vml.01000000002020202020204b52564e36375a42473357475846484453373235:1 -> t10.ATA_____HDS725050KLA360_______________________________KRVN67ZBG3WGXF:1
lrwxrwxrwx    1 root     root          74 May 14 07:04 vml.01000000002020202020204b52564e36375a42473357475846484453373235:2 -> t10.ATA_____HDS725050KLA360_______________________________KRVN67ZBG3WGXF:2
lrwxrwxrwx    1 root     root          74 May 14 07:04 vml.01000000002020202020204b52564e36375a42473357475846484453373235:3 -> t10.ATA_____HDS725050KLA360_______________________________KRVN67ZBG3WGXF:3
lrwxrwxrwx    1 root     root          74 May 14 07:04 vml.01000000002020202020204b52564e36375a42473357475846484453373235:5 -> t10.ATA_____HDS725050KLA360_______________________________KRVN67ZBG3WGXF:5
lrwxrwxrwx    1 root     root          72 May 14 07:04 vml.01000000004a30373336394a30303237353820202020202020363447422053 -> t10.ATA_____64GB_SSD________________________________J07369J002758_______
lrwxrwxrwx    1 root     root          74 May 14 07:04 vml.01000000004a30373336394a30303237353820202020202020363447422053:1 -> t10.ATA_____64GB_SSD________________________________J07369J002758_______:1
lrwxrwxrwx    1 root     root          74 May 14 07:04 vml.01000000004a30373336394a30303237353820202020202020363447422053:2 -> t10.ATA_____64GB_SSD________________________________J07369J002758_______:2
lrwxrwxrwx    1 root     root          74 May 14 07:04 vml.01000000004a30373336394a30303237353820202020202020363447422053:3 -> t10.ATA_____64GB_SSD________________________________J07369J002758_______:3
lrwxrwxrwx    1 root     root          74 May 14 07:04 vml.01000000004a30373336394a30303237353820202020202020363447422053:5 -> t10.ATA_____64GB_SSD________________________________J07369J002758_______:5
lrwxrwxrwx    1 root     root          74 May 14 07:04 vml.01000000004a30373336394a30303237353820202020202020363447422053:6 -> t10.ATA_____64GB_SSD________________________________J07369J002758_______:6
lrwxrwxrwx    1 root     root          74 May 14 07:04 vml.01000000004a30373336394a30303237353820202020202020363447422053:7 -> t10.ATA_____64GB_SSD________________________________J07369J002758_______:7
lrwxrwxrwx    1 root     root          74 May 14 07:04 vml.01000000004a30373336394a30303237353820202020202020363447422053:8 -> t10.ATA_____64GB_SSD________________________________J07369J002758_______:8
lrwxrwxrwx    1 root     root          74 May 14 07:04 vml.01000000004a30373336394a30303237353820202020202020363447422053:9 -> t10.ATA_____64GB_SSD________________________________J07369J002758_______:9
[root@localhost:~] disk="t10.ATA_____HDS725050KLA360_______________________________KRVN67ZBG3WGXF"
[root@localhost:~] datastore="datastore1"
[root@localhost:~] vmdkname="ZzzBuzzPassthruSSD"
[root@localhost:~] vmkfstools -z "/vmfs/devices/disks/$disk" "/vmfs/volumes/$datastore/$vmdkname.vmdk"

配置虚拟机使用直通硬盘

在创建/配置虚拟机时选择现有硬盘并定位到之前创建硬盘直通文件时所选择存储的位置

发表评论