Virtual Machine is not accessible / Datastore shows as inaccessible
search cancel

Virtual Machine is not accessible / Datastore shows as inaccessible

book

Article ID: 412949

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vSphere ESXi 8.0 VMware vSphere ESX 7.x VMware vSphere ESX 8.x

Issue/Introduction

All of the following Symptoms apply:
 
1.) In the vSphere Client one or more VMs are showing "inaccessible".
When selecting one of the affected VM(s)
and clicking on the "Datastores" tab, you notice that the Datastore the VM is located on is also showing as "inaccessible
 
Example:
 

 

 

2.) You identify the one or more of the LUN(s) backing the affected Datastore do not list a VMFS Partition

2.1) Identify the LUN(s) backing the affected Datastore by running on any of the Hosts originally connected to the Datastore

esxcli storage vmfs extent list | grep -i AffectedDatastoreName

 
 
As per example below, the Datastore is backed by two LUNs:
 
esxcli storage vmfs extent list | grep -i MyVMFSDatastore
MyVMFSDatastore       ######-#########-#####-#########       naa.1#########  

MyVMFSDatastore       ######-#########-#####-#########       naa.2######### 

 

2.2) For each LUN listed under 2.1), check for existence of VMFS Partition

partedUtil getptbl /vmfs/devices/disks/LUNID
 
 
As per example below, only one of the LUNs shows a VMFS Partition (= naa.2######### ):
 
[root@localhost:~] partedUtil getptbl /vmfs/devices/disks/naa.1#########
gpt
###### #### #### ######
 
[root@localhost:~] partedUtil getptbl /vmfs/devices/disks/naa.2#########
gpt
###### #### #### ######
# #### ####### ##################### vmfs #
 

 

 
 
3.) VOMA Tool is unable to see beginning and ending sector of the LUN(s) not showing a VMFS Partition via 2.2)
 
Run VOMA Tool for each LUN listed under 2.1):
 

voma -m ptbl -f check -d /vmfs/devices/disks/LUNID

 
 
As per example below only one of the LUNs is showing Start and Ending Sectors ( naa.2######### ):
 
[root@localhost:~] voma -m ptbl -f check -d /vmfs/devices/disks/naa.1#########
Scsi 2 reservation successful
Running Partition table checker version 0.1 in check mode
Phase 1: Checking device for protective MBR
Phase 2: Checking device for a valid primary GPT
         Detected valid GPT signatures
         Number    Start          End                Type
Phase 3: Checking device for a valid backup GPT
         Detected valid GPT signatures
         Number    Start          End                Type
Phase 4: Checking device for valid MBR table
         ON-DISK ERROR: A valid GPT or MBR table could not be found on the disk
Phase 5: Searching for valid file system headers
         ERROR: Invalid spanned device table. If the device specified is a head extent, LVM metadata is corrupted
         ERROR: Failed to Initialize LVM Metadata
         No valid file system detected
         VOMA failed to check device : General Error
 
Total Errors Found:           1
Kindly Consult VMware Support for further assistance

 

[root@localhost:~] voma -m ptbl -f check -d /vmfs/devices/disks/naa.2#########

Scsi 2 reservation successful

Running Partition table checker version 0.1 in check mode

Phase 1: Checking device for protective MBR

Phase 2: Checking device for a valid primary GPT

    Detected valid GPT signatures

    Number    Start          End                Type

    1         2048           838858752          vmfs

Phase 3: Checking device for a valid backup GPT

    Detected valid GPT signatures

    Number    Start          End                Type

    1         2048           838858752          vmfs

 

Found a valid partition table on the device

Total Errors Found:           0

 

Environment

vSphere ESXi 7.x
vSphere ESXi 8.x

Cause

The VM(s) are showing as inaccessible because their backing Datastore is inaccessible.

The Datastore is inaccessible because one or more of its backing LUNs has no VMFS Partition.

With the VMFS Partition missing and VOMA Tool unable to identify Beginning and Ending Sectors, the Datastore cannot be recovered. 

 

Resolution

1.) Restore the affected VM(s) from Backup.

2.) Delete the inaccessible Datastore by following the steps outlined in Remove VMFS Datastores

Additional Information