Verifying that ESX/ESXi virtual machine storage is accessible
search cancel

Verifying that ESX/ESXi virtual machine storage is accessible

book

Article ID: 344288

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

This article guides you through determining if the storage system on which your virtual machine files reside is accessible. If the storage system becomes unavailable, unexpected behavior may occur, including the virtual machine failing to power on, the guest operating system failing, or applications in the guest operating system may not work.

Symptoms:
  • Cannot power on a virtual machine.
  • Guest operating system fails or stops responding.
  • Guest operating system application fails to work.
  • Guest operating system file copy or move operation fails.
  • Guest operating system disk related error.


Environment

VMware vCenter Server 5.1.x
VMware vSphere ESXi 6.0
VMware ESXi 4.1.x Installable
VMware vSphere ESXi 5.1
VMware ESXi 4.0.x Embedded
VMware ESX 4.1.x
VMware vCenter Server 5.5.x
VMware ESXi 4.1.x Embedded
VMware vCenter Server 4.0.x
VMware ESX 4.0.x
VMware vCenter Server 4.1.x
VMware vCenter Server 6.0.x
VMware ESXi 4.0.x Installable
VMware vCenter Server 5.0.x
VMware vSphere ESXi 5.5
VMware vSphere ESXi 5.0

Resolution

To determine if the storage system on which your virtual machine files reside is accessible:
  1. Determine the location of all your virtual machine files.
  2. Verify that you can access the location of the virtual machine files.
  3. Confirm that you are able to create a new file in that location.

Determining the location of all your virtual machine files

You can determine the location of all your virtual machine files graphically using the vSphere Client or vSphere Web Client, or from the command line.

Graphically

Using the vSphere Client:

To determine the location of all your virtual machine files graphically:
  1. Using the vSphere Client connect directly to your ESX/ESXi host or to your vCenter Server.
  2. Select the virtual machine you have to troubleshoot from the inventory.
  3. Right-click the virtual machine and choose Edit Settings. From the screen that is shown you can see where the hard disk data for your virtual machine is stored.

    Note
    : This data is stored in .vmdk files.

  4. This image shows how you can obtain the location of the .vmdk files:



    By selecting the hard disk under the Hardware tab, the location of the .vmdk file is shown in the top right, under Disk File. The location of the .vmdk file in the example is [storage3]vm1/vm1-000001.vmdk.

    By choosing each Hard Disk associated with the virtual machine under the Hardware tab, you can note the file locations.

  5. From this screen it is also possible to find the location of the configuration file and the working directory of the virtual machine. By selecting the Options tab, a screen similar to the one below is shown:



    On the right side the location of the Virtual Machine Configuration File (in this example, [storage3] vm1/vm1.vmx) is shown along with the Virtual Machine Working Location (in this example, [storage3] vm1). By noting these location, you have now determined the location of your virtual machine files.
Using the vSphere Web Client:
  1. Log in to the vSphere Web Client with your user.
  2. Click VM's and Templates.
  3. Expand the datacenter.
  4. Right-click the virtual machine and select Edit Settings...
  5. Expand the drive you have to determine the location of the .vmdk file.
  6. The location will be under the Disk File field.

From the Command Line

To determine the location of all your virtual machine files from the command line:
  1. Log in to the VMware ESX/ESXi host as the root user.
  2. Run vmware-cmd -l to list the location of the configuration files for the virtual machines registered on an ESX host.
  3. Run vim-cmd vmsvc/getallvms to list the location of the configuration files for the virtual machines registered on an ESXi host.
  4. Record the location of the .vmx file (configuration file) for the virtual machine that you are troubleshooting. For example:

    /vmfs/volumes/46b2f3eb-ced4c7d8-c1d2-111122223333/vm1/vm1.vmx

  5. If the virtual machine is not registered on the ESX host and you have to search its configuration file, run this command and press Enter:

    find / -name "*.vmx"


  6. The results of step 4 list all virtual machine configuration files. Search the results for the name of a virtual machine file you are interested in locating. The results also list the path to the directory where these files are located.
  7. By viewing the configuration file of a virtual machine, you can tell where all of its associated files, including .vmdk files, are located. If a file is not in the same directory as the configuration file the complete path is shown in the configuration file. For example, a second hard disk may have an entry such as the one shown below:

    scsi0:1.present = "true"
    scsi0:1.fileName = "/vmfs/volumes/46b2f3ea-980a1c90-3333-00112233bb44/diskStore/secondHardDisk.vmdk"

Verifying that you can access the location of the virtual machine files

Using the file locations you retrieved in part 1 of this article, navigate to the virtual machine file location and confirm if you can see the files located there.
  1. Log in to the VMware ESX/ESXi host as the root user.
  2. Use the ls command to navigate to the relevant locations. For example:

    ls /vmfs/volumes/46b2f3eb-ced4c7d8-c1d2-111122223333/vm1/

    If the files associated with your virtual machine (vmdk, vmx, nvram) are listed, you are able to access the storage hosting of your virtual machine. If not, see Identifying shared storage issues with ESX and ESXi (1003659).

    Notes:
    • If you have virtual machine resources located in more than one location, such as a second hard disk, repeat step 2 for each location.
    • If a storage system is unavailable, you experience different symptoms depending on which virtual machine resource is located on that storage system.

Confirm that you are able to create a new file in that location

If you can view existing files but you cannot create a new file, then you are either not logged in as a user with the correct permissions to the directory or the directory permissions have changed.
Be sure to delete the new file after you have created it.
Note: If the virtual machine's storage is inaccessible, check third party storage connectivity to your ESX hosts. For more information about fiber channel storage, see Troubleshooting fibre channel storage connectivity (1003680).


Additional Information