VMware Cloud Community
StardustECR
Contributor
Contributor

How to update inventory after resizing disk with vmkfstools ?

Hi,

after successfully resized a disk with :

vmkfstools -X 25G -d eagerzeroedthick  /vmfs/volumes/FOOBAR/FOOBAR.vmdk

How can I update inventory programmaticaly, via a Linux command line or via any API/script ?

The size did not changed in vsphere 6.0.0 web client even after disconnecting and reconnecting, I need to unregister the VM manually from inventory and re-add it to see the disk changes via vSphere.

Regards, GQ

Reply
0 Kudos
3 Replies
a_p_
Leadership
Leadership

Manually editing requires reloading the VM, which can be done by either unregistering/registering the VM (as you did), or from the command line (see https://kb.vmware.com/s/article/1026043). vMotion - if available - might be another option.

André

Reply
0 Kudos
StardustECR
Contributor
Contributor

Thanks, but I want to be able to run it remotly, not from within esx server.
From vmware-vcli, I don't see 'vim-cmd'

Reply
0 Kudos
StardustECR
Contributor
Contributor

To update the VmWare inventory, you need to run :

    svmotion --datastore foobar --server vc1.example.com --username me  --interactive

Reply
0 Kudos