VMware {code} Community
MidrStibo
Contributor
Contributor

GuestDiskInfo is empty for xfs formatted filesystems (tested on RHEL7)

hi everyone,

I made a nice script that reports OS disk usage for certain vm's which is working just fine, except for machines that have xfs filesystem, as I found out for our RHEL7 systems where xfs is the default filesystem. I added a new partition and formatted that as ext3 on one of them and for this one it reports disk usage fine - so apparently the API cannot handle xfs.

code snippet:

my $vm = Vim::find_entity_view(

    view_type => "VirtualMachine",

    filter => { 'name' => $vm_name },

    );

my @disks = $vm->guest->disk;

while (exists $disks[0]->[$i]) {
   my $capacity = $disks[0]->[$i]->capacity;
   my $freeSpace = $disks[0]->[$i]->freeSpace;
   $total_used+= $capacity - $freeSpace;
   $i++;
    }

for any xfs filesystem there is simply no entry in the returned list of disks in guest->disk.

anyone a suggestion if there is a workaround to this or if xfs will be supported in a future API version?

regards

Mirco

0 Kudos
3 Replies
samek2000
Contributor
Contributor


Hello,


any progress on this? I am experiencing the same problem, XFS partitions are not seen via vSphere Perl SDK.

Guest operating system is Centos 7.0.1406 and VMware Tools daemon, version 9.4.10.38250 (build-2092844)

br, Samek

0 Kudos
Gastone
Contributor
Contributor

I believe the issue is with Open-vm-tools. XFS should be supported in release 9.10.0

https://github.com/vmware/open-vm-tools/commit/b23378e336a7b0ecc7a4584c9a5f185b40e1ef5a#diff-7fdd269...

0 Kudos
samek2000
Contributor
Contributor

Thank you for your answer. I suspected VMware tools.
0 Kudos