To determine if the storage system on which your virtual machine files reside is accessible:
- Determine the location of all your virtual machine files.
- Verify that you can access the location of the virtual machine files.
- 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:
- Using the vSphere Client connect directly to your ESX/ESXi host or to your vCenter Server.
- Select the virtual machine you have to troubleshoot from the inventory.
- 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.
- 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.
- 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:
- Log in to the vSphere Web Client with your user.
- Click VM's and Templates.
- Expand the datacenter.
- Right-click the virtual machine and select Edit Settings...
- Expand the drive you have to determine the location of the .vmdk file.
- 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:
- Log in to the VMware ESX/ESXi host as the root user.
- Run vmware-cmd -l to list the location of the configuration files for the virtual machines registered on an ESX host.
- Run vim-cmd vmsvc/getallvms to list the location of the configuration files for the virtual machines registered on an ESXi host.
- Record the location of the .vmx file (configuration file) for the virtual machine that you are troubleshooting. For example:
/vmfs/volumes/########-####-########3333/vm1/vm1.vmx
- 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"
- 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.
- 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/########-####-########bb44/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.
-
Log in to the VMware ESX/ESXi host as the root user.
-
Use the
ls command to navigate to the relevant locations. For example:
ls /vmfs/volumes/########-####-########3333/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.