标签: ESXi

  • ESXi6 虚拟机自动分配IPV6地址

    先决条件:

    网络IO直通

    其他配置:

    无特殊

    Openwrt 设置Static Leases

    IPv4,MAC,DUID(可选),IPV6 suffix

    客户机:

    cat /etc/network/interfaces:

    # The primary network interface
    allow-hotplug ens192
    iface ens192 inet dhcp
    iface ens192 inet6 dhcp
            accept_ra 2
            request_prefix 1
  • ESXi6 虚拟机 IO 直通

    客户端OS: Debian12 AMD64

    网络适配器: VMXNET 3

    虚拟机分配内存: 8G

    内存资源分配: 全部锁定

    Note:

    E1000 不支持直通

    虚拟机内存太小(4G),不支持直通,出现错误:已连接网络的状况阻止directpath i/o

  • 刚知道,VMWARE 已经Game Over了

    昨日,打算修改一个ESXi虚拟机的配置,WEB CLIENT下没找到修改的地方,就想启动Windows 客户端来试试,结果发现,已经无法下载客户端了。

    Google搜寻一下,才知道,VMware已于去年(2024年)被Broadcom博通收购了,呜呼哀哉,世界变化真快,前几年,VMware还雄心勃勃,想在私有云领域大展宏图呢!

    被博通收购,在我的脑海中,直观上就是完蛋了,博通只是一家芯片公司,而且主要是外设芯片,不是整机系统,缺乏软件基因。

    在路由器领域,相比于高通,MTK,对OPENWRT的支持最糟糕,所以,采用博通芯片的,全部避开。

    ESXi和VMware虚拟软件,是购置HP 的Gen8 MicroServer 时,随机赠送的,后来,就懒得改用开源的Docker或K8了,查看一下,发觉快满十年了。

    作为一个纯芯片公司,只有快速,当下的交易,没有持续服务的理念。

    4万台服务器要瘫?Tesco为啥这时候硬刚博通,VMware到底是啥,为啥能让超市急红眼?纯真世界存在吗

  • ESXi6 vm disk clone & convert

    • Login into ESXi shell

    • vmkfstools -i input output -d format -a adaptertype

    eg:

    vmkfstools -i “/vmfs/volumes/Datastore/examplevm/examplevm.vmdk” “/vmfs/volumes/Datastore2/newexamplevm/newexamplevm.vmdk” -d thin -a buslogic

     

    Refer to

    Cloning and converting virtual machine disks with vmkfstools (1028042)

    Converting a virtual disk into a Raw Device Mapping (3443266)

     

  • VMware Storage Best Practices

    Patrick Carmichael   – Escalation Engineer, Global Support Services.
  • ESXi6 kernel log (dmesg)

    Understanding SCSI device/target NMP errors/conditions in ESX/ESXi 4.x and ESXi 5.x/6.0 (1030381)

    2016-10-27T12:50:47.496Z cpu7:32798)ScsiDeviceIO: 2651: Cmd(0x439d80358400) 0x1a, CmdSN 0x1d1f2 from world 0 to dev “mpx.vmhba33:C0:T0:L0” failed H:0x0 D:0x2 P:0x0 Valid sense data: 0x5 0x24 0x0.

    Host Status = 0x0 = OK
    Device Status = 0x2 = Check Condition
    Plugin Status = 0x0 = OK

    Sense Key = 0x5 = ILLEGAL REQUEST
    Additional Sense Code/ASC Qualifier = 0x24/0x0 =INVALID FIELD IN CDB
    For a complete list of possible Sense Keys, see SCSI Sense Keys
    For a complete list of Additional Sense Code/ASC Qualifier pairings, see ASC-NUM.TXT
  • How ESXi identify disk

    Identifying disks when working with VMware ESXi/ESX (1014953)

     

    These are the definitions for some of identifiers and their conventions:
    • naa.<NAA>:<Partition> or eui.<EUI>:<Partition>

      NAA stands for Network Addressing Authority identifier. EUI stands for Extended Unique Identifier. The number is guaranteed to be unique to that LUN. The NAA or EUI identifier is the preferred method of identifying LUNs and the number is generated by the storage device. Since the NAA or EUI is unique to the LUN, if the LUN is presented the same way across all ESXi hosts, the NAA or EUI identifier remains the same. For more information on these standards, see the SPC-3 documentation from the InterNational Committee for Information Technology Standards (T10).

      The <Partition> represents the partition number on the LUN or Disk. If the <Partition> is specified as 0, it identifies the entire disk instead of only one partition. This identifier is generally used for operations with utilities such as vmkfstools.

     

    mpx.vmhba<Adapter>:C<Channel>:T<Target>:L<LUN> or mpx.vmhba<Adapter>:C<Channel>:T<Target>:L<LUN>:<Partition>

    Some devices do not provide the NAA number described above. In these circumstances, an MPX Identifier is generated by ESXi to represent the LUN or disk. The identifier takes the form similar to that of the canonical name of previous versions of ESXi with the mpx. prefix. This identifier can be used in the exact same way as the NAA Identifier described above.

  • Local Storage as RDM

    https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1017530

    /vmfs/devices/disks           for local or SAN-based disks.

    /vmfs/devices/lvm               for ESXi logical volumes.

    /vmfs/devices/generic        for generic SCSI devices.

    To configure a local device as an RDM disk:
    1. Open an SSH session to the ESXi/ESX host.
    2. Run this command to list the disks that are attached to the ESXi host:# ls -l /vmfs/devices/disks
    3. From the list, identify the local device you want to configure as an RDM and copy the device name.Note: The device name is likely be prefixed with t10. and look similar to:

      t10.F405E46494C4540046F455B64787D285941707D203F45765
    4. To configure the device as an RDM and output the RDM pointer file to your chosen destination, run this command:# vmkfstools -z /vmfs/devices/disks/diskname /vmfs/volumes/datastorename/vmfolder/vmname.vmdkFor example:

      # vmkfstools -z /vmfs/devices/disks/t10.F405E46494C4540046F455B64787D285941707D203F45765 /vmfs/volumes/Datastore2/localrdm1/localrdm1.vmdk

      Note: The size of the newly created RDM pointer file appears to be the same size and the Raw Device it it mapped to, this is a dummy file and is not consuming any storage space.

    5. When you have created the RDM pointer file, attach the RDM to a virtual machine using the vSphere Client:
      1. Right click the virtual machine you want to add an RDM disk to.
      2. Click Edit Settings.
      3. Click Add.
      4. Select Hard Disk.
      5. Select Use an existing virtual disk.
      6. Browse to the directory you saved the RDM pointer to in step 5 and select the RDM pointer file and click Next.
      7. Select the virtual SCSI controller you want to attach the disk to and click Next.
      8. Click Finish.
    6. You should now see your new hard disk in the virtual machine inventory as Mapped Raw LUN.
  • Backup ESXi host with Live CD

    Using Live CD/USB to backup and restore the ESXi host disk/partition:

    #redobackup-livecd-1.0.4.iso

    clonezilla

     

    Note:

    #Redo,   partition level backup & restore,  support samba & ftp

    CloneZilla,   file level backup& restore (but VMFS5 ), support nfs.

     

     

     

  • Backup ESXi virtual machine

    Backup:
    Copy the whole directory of the virtual machine in VMFS to NFS

    Restore:
    Copy back from NFC to the same VMFS location

    Clone:
    Using vmkfstools to clone between different VMFS or Virtual Machine Name

    Refer to  1027876