VMware Cloud Community
evilensky1
Contributor
Contributor

Using PowerCLI to execute "vim-cmd vmsvc/reload <vmid>"

We are suffering majorly from the issue in this KB, and are not ready to upgrade to the fix in 6.7 u1 , in part because Veeam is not supporting it until they ship update 4.

Is it possible to execute the work around:

vim-cmd vmsvc/reload <vmid>

# Where, <vmid> is the managed object ID of the VM on the host, and can be obtained using the vim-cmd vmsvc/getallvms command.

Via PowerCLI?

Googling suggests this might work:

$VmView = $Vm | get-view

$VmView.Reload()

But others have suggested that the .reload() via powerCLI is different than a reload via vim-cmd

0 Kudos
1 Reply
LucD
Leadership
Leadership

Afaik, both do the same.

The Reload method states "Reload the entity state. Clients only need to call this method if they changed some external state that affects the service without using the Web service interface to perform the change. For example, hand-editing a virtual machine configuration file affects the configuration of the associated virtual machine but the service managing the virtual machine might not monitor the file for changes. In this case, after such an edit, a client would call "reload" on the associated virtual machine to ensure the service and its clients have current data for the virtual machine"

The vim-cmd is directly mapped to several API methods on the VirtualMachine object.
In fact there is very little information available on the vim-cmd command (Steve Jin did a good post on the command here).

When there issues with VMs on NFS storage some time ago, a lot of users mentioned that they used in fact the Reload method from PowerCLI to fix the issue.
The original solution was also to use the vim-cmd.

See for example here (I know it is a French article, but the code and Google translate should make it clear).


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos