VMware Cloud Community
StardustECR
Contributor
Contributor

Can't run vmkfstools remotly, vSphere 6.0.0

Hi,

I had downloaded VMware-vSphere-CLI-6.0.0-2503617.x86_64.tar.gz on a Debian9, modified the install script to run on Debian 9 (removed rpm specific commands).

If I run the tool on the esx server, it works well :

vmkfstools -X 15G -d eagerzeroedthick  /vmfs/volumes/LUN_100/VMNAME/VMNAME.vmdk

But when I run from my desktop, I have :

vmkfstools --vihost esx42.example.com --server vc1.example.com --username me -X 20G -d eagerzeroedthick  /vmfs/volumes/LUN_100/VMNAME/VMNAME.vmdk

Attempting to extend disk [LUN_100] VMNAME/VMNAME.vmdk

Unable to extend virtual disk :

Any clue ?

I would like to be able to run this command remotly and not via ssh.

Tags (1)
0 Kudos
2 Replies
StardustECR
Contributor
Contributor

For information, the command works because I can run successfully :

-------8<-----------------------
# vmkfstools --vihost esx24cli3.example.com --server virtualcenter2.example.com --username me -P /vmfs/volumes/LUN_100 

Enter password: 

VMFS-5.61 file system spanning 1 partitions. 

Capacity : 10994847842304, 4721890820096 avail 

File system label : LUN_100 

UUID : FFFFFFFF-AAAAAAAA-EEEE-000000000000 

path : /vmfs/volumes/FFFFFFFF-AAAAAAAA-EEEE-000000000000 

Partitions spanned: 

naa.70001ac000000000000000070001abcd:1 

Mounted : Yes 

VAAI Supported: Yes

-------8<-----------------------

In the /usr/local/bin/vmkfstools code, I can see

-------8<-----------------------

sub inflate_disk {

  my ($vdm, $disk) = @_;

  #bug 376684

  eval {

  my $task_ref = $vdm->InflateVirtualDisk_Task(name => $disk, datacenter => undef);

  my $task_view = Vim::get_view(mo_ref => $task_ref);

  print "\nProcess start\n";

track_progress($task_view);

  print "\nEnd process\n";

  };

  if ($@) {

VIExt::fail("Unable to inflate virtual disk : " . ($@->fault_string));

  }

}

-------8<-----------------------

0 Kudos
StardustECR
Contributor
Contributor

The script vmkfstools have bug, the --datastore was not well implemented.

(as seen in this post https://communities.vmware.com/thread/409275)

This works : https://pastebin.com/raw/cE8vFRDe

0 Kudos