vmware / vmware/pyvmomi

QueryUnresolvedVmfsVolume() and "can mount" info?

Open
#396 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
2.3k
Forks
763
PR merge metrics
No merged PRs in 30d

Description

Hello,

I'd like to do the equivalent of the command : esxcli -h host storage vmfs snapshot list which gives this kind of output:

56e012a9-4652a774-927e-f04da27030a0
Volume Name: p01
VMFS UUID: 56e012a9-4652a774-927e-f04da27030a0
Can mount: true
Reason for un-mountability:
Can resignature: false
Reason for non-resignaturability: the volume is being actively used
Unresolved Extent Count: 1

I'm interested in the "Can mount" field. With pyVmomi, I use host.configManager.storageSystem.QueryUnresolvedVmfsVolume() which gives:

(vim.host.UnresolvedVmfsVolume) [
(vim.host.UnresolvedVmfsVolume) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
extent = (vim.host.UnresolvedVmfsExtent) [
(vim.host.UnresolvedVmfsExtent) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
device = (vim.host.ScsiDisk.Partition) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
diskName = 'naa.60050768028087c470000000000000c0',
partition = 1
},
devicePath = '/vmfs/devices/disks/naa.60050768028087c470000000000000c0:1',
vmfsUuid = '56e012a9-4652a774-927e-f04da27030a0',
isHeadExtent = true,
ordinal = 0,
startBlock = 0,
endBlock = 1048319,
reason = 'uuidConflict'
}
],
vmfsLabel = 'p01',
vmfsUuid = '56e012a9-4652a774-927e-f04da27030a0',
totalBlocks = 1048320,
resolveStatus = (vim.host.UnresolvedVmfsVolume.ResolveStatus) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
resolvable = false,
incompleteExtents = false,
multipleCopies = false
}
},
...

But I don't see the equivalent of the "can mount" field of the first command, how can I find it ?

Thanks,

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the host.configManager.storageSystem.QueryUnresolvedVmfsVolume() entry point and its UnresolvedVmfsVolume.resolveStatus fields. Compare that result with the esxcli storage vmfs snapshot list output and consult the VMware vSphere API documentation for a documented mapping to “Can mount.” Done means identifying the equivalent field or clearly documenting that it is unavailable through this API.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.