You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.
vmdk_ops does not report attached volumes correctly: inspect volume and vmdk_ops list volumes results are different and getting error "vm doesn't belong to any tenant"
#738
[root@promc-2n-dhcp105-97:/vmfs/volumes/4fc608aa-828f03c0-d4a2-d4ae52794a7a] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py ls
Volume Datastore Created By VM Created Attached To VM Policy Capacity Used Filesystem Type Access Attach As
--------------- --------- ------------- ------------------------ -------------- ------ -------- -------- --------------- ---------- ----------------------
vmwDataVol datastore photon2 Wed Nov 16 18:57:57 2016 detached N/A 10.00GB 175.00MB ext4 read-write independent_persistent
Expected Result:
while listing down volume, vmdkops command should say vmwDataVol is attached to VM1
Actual Result:
[root@promc-2n-dhcp105-97:/vmfs/volumes/4fc608aa-828f03c0-d4a2-d4ae52794a7a] /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py ls
Volume Datastore Created By VM Created Attached To VM Policy Capacity Used Filesystem Type Access Attach As
--------------- --------- ------------- ------------------------ -------------- ------ -------- -------- --------------- ---------- ----------------------
vmwDataVol datastore photon2 Wed Nov 16 18:57:57 2016 **detached** N/A 10.00GB 175.00MB ext4 read-write independent_persistent
Triage:
---------------vmdk_ops.log------------------
11/16/16 18:57:56 1463911 [photon2-vmwDataVol] [INFO ] executeRequest 'get' completed with ret={u'Error': 'Volume vmwDataVol not found (file: /vmfs/volumes/datastore/dockvols/vmwDataVol.vmdk)'}
11/16/16 18:57:56 1463911 [photon2-vmwDataVol] [INFO ] *** createVMDK: /vmfs/volumes/datastore/dockvols/vmwDataVol.vmdk opts = {u'size': u'10gb', u'fstype': u'ext4'}
11/16/16 18:57:58 1463911 [photon2-vmwDataVol] [WARNING] VM photon2 does not belong to any tenant
11/16/16 18:57:58 1463911 [photon2-vmwDataVol] [INFO ] executeRequest 'create' completed with ret=None
11/16/16 18:57:58 1463911 [photon2-vmwDataVol] [INFO ] *** attachVMDK: /vmfs/volumes/datastore/dockvols/vmwDataVol.vmdk to photon2 VM uuid = 564de5f9-3b8e-bc8c-96a6-eb359f4e9714
11/16/16 18:57:58 1463911 [photon2-vmwDataVol] [INFO ] Attaching /vmfs/volumes/datastore/dockvols/vmwDataVol.vmdk as independent_persistent
11/16/16 18:57:59 1463911 [photon2-vmwDataVol] [INFO ] Disk /vmfs/volumes/datastore/dockvols/vmwDataVol.vmdk successfully attached. controller pci_slot_number=192, disk_slot=1
11/16/16 18:57:59 1463911 [photon2-vmwDataVol] [INFO ] executeRequest 'attach' completed with ret={'ControllerPciSlotNumber': '192', 'Unit': '1'}
11/16/16 18:58:15 1463911 [photon2-vmwDataVol] [INFO ] *** detachVMDK: /vmfs/volumes/datastore/dockvols/vmwDataVol.vmdk from photon2 VM uuid = 564de5f9-3b8e-bc8c-96a6-eb359f4e9714
11/16/16 18:58:16 1463911 [photon2-vmwDataVol] [INFO ] Disk detached /vmfs/volumes/datastore/dockvols/vmwDataVol.vmdk
11/16/16 18:58:16 1463911 [photon2-vmwDataVol] [INFO ] executeRequest 'detach' completed with ret=None
11/16/16 18:58:39 1463911 [photon2-vmwDataVol] [INFO ] executeRequest 'get' completed with ret={'status': u'detached', 'created by VM': u'photon2', 'capacity': {'allocated': '145MB', 'size': '10GB'}, 'c
11/16/16 18:58:39 1463911 [photon2-vmwDataVol] [INFO ] *** attachVMDK: /vmfs/volumes/datastore/dockvols/vmwDataVol.vmdk to photon2 VM uuid = 564de5f9-3b8e-bc8c-96a6-eb359f4e9714
11/16/16 18:58:39 1463911 [photon2-vmwDataVol] [INFO ] Attaching /vmfs/volumes/datastore/dockvols/vmwDataVol.vmdk as independent_persistent
11/16/16 18:58:40 1463911 [photon2-vmwDataVol] [INFO ] Disk /vmfs/volumes/datastore/dockvols/vmwDataVol.vmdk successfully attached. controller pci_slot_number=192, disk_slot=1
11/16/16 18:58:40 1463911 [photon2-vmwDataVol] [INFO ] executeRequest 'attach' completed with ret={'ControllerPciSlotNumber': '192', 'Unit': '1'}
11/16/16 18:58:48 1463911 [photon1-socket7] [INFO ] executeRequest 'list' completed with ret=[{u'Attributes': {}, u'Name': 'refCountTestVol'}, {u'Attributes': {}, u'Name': 'datavol1'}, {u'Attributes': {
11/16/16 18:58:56 1463911 [photon1-vmwDataVol] [INFO ] executeRequest 'get' completed with ret={'status': u'attached', 'attached to VM': 'photon2', 'created by VM': u'photon2', 'capacity': {'allocated':
~
The text was updated successfully, but these errors were encountered:
Needs to get the VM name from the attached VM UUID in the KV. I'll fix this. Admin CLI should call vol_info in vmdk_ops.py and get use that data vs. reading KV and interpreting that.
Environment Details:
#VMs: 2 photon vms (VM1, VM2)
ESX: VMware ESXi 6.0.0 build-3620759
Datastore: vmfs
Steps to Reproduce:
Expected Result:
while listing down volume, vmdkops command should say vmwDataVol is attached to VM1
Actual Result:
Triage:
---------------vmdk_ops.log------------------
The text was updated successfully, but these errors were encountered: