May 24, 2015

vSphere Storage Terminologies - Virtual Disk

vSphere Storage Terminologies - Virtual Disk

A virtual machine consists of several files that are stored on a storage device.
The key files are the configuration file (<vm_name>.vmx), virtual disk file (<vm_name>-flat.vmdk), virtual disk descriptor file (<vm_name>.vmdk), NVRAM setting file (<vm_name>.nvram), and log files (vmware.log). You define virtual machine settings using any of the following:
  • vSphere Web Client
  • local or remote command-line interfaces (e.g. PowerCLI, vCLI, ESXi Shell)
  • vSphere Web Services SDK –  facilitates development of client applications that leverage the vSphere API
A virtual machine uses a virtual disk to store its operating system, program files, and other data associated with its activities. A virtual disk is a large physical file, or a set of files, that can be copied, moved, archived, and backed up as easily as any other file. You can configure virtual machines with multiple virtual disks.

A virtual machine issues SCSI commands to communicate with its virtual disk(s) stored on a datastore. These SCSI commands are encapsulated into other forms/protocols depending on the type of physical storage the ESXi connects to.

The following storage protocols are supported by ESXi:
  • Fibre Channel (FC)
  • Internet SCSI (iSCSI)
  • Fibre Channel over Ethernet (FCoE)
  • NFS
  • Local Storage
  • Virtual Volume
Regardless of the underlying protocol, when a virtual machine communicates with its virtual disk stored on a datastore, it issues SCSI commands.   The SCSI commands are sent from the ESXi host to the actual physical storage via network or storage adapters depending on the protocol, transparent to the virtual machine (and the guest operating system and applications).

Note: the virtual disk always appears to the virtual machine as a mounted SCSI device.

To access virtual disks, a virtual machine uses virtual SCSI controllers.
The virtual controllers available to a VM are:
  • LSI Logic Parallel
  • BusLogic Parallel
  • VMware Paravirtual
  • LSI Logic SAS
For example, using the vSphere Web Client interface:

A VMware vSphere virtual disk is labeled the VMDK (Virtual Machine DisK) file. The VMDK file encapsulates the contents of an operating system filesystem, e.g. the C Drive of a Microsoft Windows OS or the root file system (/) on a Linux/UNIX file system. The VMDK file (virtual disk) is stored on a VMFS or NFS datastore or a virtual volume.


E.g.
C-Drive – <vm_name>.vmdk
G-Drive – <vm_name>_x.vmdk

Where x represents the number of virtual disks beyond the initial disk.

Along with the VMDK file, another file residing on the datastore is the vSphere configuration file,  referred to as the VMX file. The filename format is <vm_name>.vmx. It contains the configuration settings for the related virtual machine.

Here is a section of the VMX configuration file for a virtual machine named, vmAlphaW2K02, showing the configuration for a second virtual disk. The file name format is <vm_name>.vmx. In this example, the file is called (vmAlphaW2K02.vmx):

scsi0:1.deviceType = "scsi-hardDisk"
scsi0:1.fileName = "vmAlphaW2K02_1.vmdk"
sched.scsi0:1.vFlash.enabled = "false"
scsi0:1.present = "true"
scsi0:1.redo = ""

Note: The “_1” index above (e.g. vmAlphaW2K02_1.vmdk) is an indication that this is the 2nd virtual disk for the virtual machine. The 1st virtual disk added to the virtual machine does not have an index number in the file name, e.g. vmAlphaW2K02.vmdk.

References:



No comments:

Post a Comment