Wednesday, July 10, 2013

How VM Access Data on a SAN storage

ESXi provides host-level storage virtualization, which abstracts the physical storage layer from VMs.
A VM uses a virtual disk to store its operating system, program files, and other data. To access virtual disks, a VM uses virtual SCSI controllers (BusLogic Parallel, LSI Logic Parallel, LSI Logic SAS, and VMware Paravirtual).To a VM each virtual disk appears as if it were a SCSI drive connected to a SCSI controller. Whether the actual physical disk device is being accessed through parallel SCSI, iSCSI, network, or Fibre Channel adapters on the host is transparent to the guest operating system and to applications running on the VM.
When guest operating systems issue SCSI commands to their virtual disks, the SCSI virtualization layer translates these commands to VMFS file operations.
1.    When the guest operating system in a VM reads or writes to SCSI disk, it issues SCSI commands to the virtual disk.
2.   Device drivers in the VM’s operating system communicate with the virtual SCSI controllers.
3.    The virtual SCSI Controller forwards the command to the VMkernel.
4.    The VMkernel performs the following tasks.
a.    Locates the file in the VMFS datastore, corresponding to VM disk.
b.    Maps the requests for the blocks on the virtual disk to blocks on the appropriate physical device.
c.     Sends the modified I/O request from the device driver in the VMkernel to the physical HBA (FC HBA, iSCSI initiator).
5.    The physical HBA (FC HBA) performs the following tasks.
a.    Packages the I/O request according to the rules of the FC protocol.
b.    Transmits the request to the SAN.
5.   If the iSCSI initiator is a hardware iSCSI adapter (independent or dependent), the adapter performs the following tasks.
a.    Encapsulates I/O requests into iSCSI Protocol Data Units (PDUs).
b.   Encapsulates iSCSI PDUs into TCP/IP packets.
c.    Sends IP packets over Ethernet to the iSCSI storage system.
5.   If the iSCSI initiator is a software iSCSI adapter, the following take place.
a.    The iSCSI initiator encapsulates I/O requests into iSCSI Protocol Data Units (PDUs).
b.   The initiator sends iSCSI PDUs through TCP/IP packets.
c.    The VMkernel TCP/IP stack relays TCP/IP packet to a physical NIC.
d.    The physical NIC sends IP packets over Ethernet to the iSCSI storage system.
6.    Depending on HBA port (FC, iSCSI), SAN switches receive the request and routes it to the storage device that the host wants to access.
Thanks to VMware, Information is from the white paper provided by VMware.
    

0 comments:

Post a Comment