dnaeon / py-vpoller

Distributed vSphere API Proxy
Other
84 stars 31 forks source link

Discover of mounted filesystems without VM tools #207

Closed bundaburg closed 7 years ago

bundaburg commented 7 years ago

Hi Marin It seems that some file systems are not discovered, testing using the vpoller-client --method vm.disk.discover.

This is against servers that have the open-vm-tools rather than VM tools package installed.

dnaeon commented 7 years ago

Hi,

Please provide exact comman that was used, the result you got and what is expected?

bundaburg commented 7 years ago

[root@MON1 ~]# vpoller-client --method vm.disk.discover --vsphere-host x.x.com --name APP1 {"msg": "Successfully discovered objects", "result": [{"disk": [{"diskPath": "/"}, {"diskPath": "/opt"}, {"diskPath": "/home"}, {"diskPath": "/var"}, {"diskPath": "/tmp"}, {"diskPath": "/boot"}, {"diskPath": "/var/tmp"}], "name": "APP1"}], "success": 0}

df output from the host with missing: /dev/mapper/rhel-root 9.8G 2.6G 7.2G 27% / /dev/mapper/rhel-opt 4.9G 146M 4.8G 3% /opt /dev/mapper/rhel-home 4.9G 66M 4.9G 2% /home /dev/mapper/rhel-var 68G 1.4G 66G 3% /var /dev/mapper/rhel-tmp 4.9G 286M 4.6G 6% /tmp /dev/sda1 497M 154M 343M 31% /boot nfs1:/software 48G 14G 34G 29% /software nfs1:/export/app1 150G 29G 122G 20% /app1

The 2 NFS partitions do not get detected. Other systems that have VM tools do detect NFS, but the open-vm-tools they appear not to.

dnaeon commented 7 years ago

Thanks for the info. This could be a bug in the open-vm-tools implementation.

I'll see if I can get this one re-produced in the next days.

bundaburg commented 7 years ago

Hi, upon further testing, it would appear that by using the disk.discover method, the NFS volumes are not being discovered on both open-vm-tools or vmware tools.

dnaeon commented 7 years ago

Checking the vSphere documentation, this is actually how things are supposed to work.

Here's the description of the disk property.

Guest information about disks. You can obtain Linux guest disk information for the following file system types only: Ext2, Ext3, Ext4, ReiserFS, ZFS, NTFS, VFAT, UFS, PCFS, HFS, and MS-DOS.

http://pubs.vmware.com/vsphere-60/index.jsp#com.vmware.wssdk.apiref.doc/vim.vm.GuestInfo.html