VMware Cloud Community
admin
Immortal
Immortal
Jump to solution

vSphere's call to reconfigVM_Task

I'm wondering how vSphere client calls the reconfigVM_Task method when user edits the settings of a VM - does it do a complete or partial update? For example let's say, user the changes only the memory from 4GB to 8GB. Does vSphere client call reconfigVM_Task with all but one property (VirtualMachineConfigSpec.memoryMB) as non-null? Or does it do a complete update of everything that's shown in 'virtual machine properties' dialog?

I'm trying to understand what's the best practice to modify a VM - typically the client has the entire VM state and user does modifications relative to state maintained [cached] on the client. I can see pros and cons for both approaches - client issuing a complete update specifying the entire VM configuration or issuing a partial update for just those changes that user explicitly did...

Appreciate your input.

0 Kudos
1 Solution

Accepted Solutions
cblomart
Enthusiast
Enthusiast
Jump to solution

I would guess that vSphere Client does a partial update. Especialy when indicating new or changed hardware.

you could verify that by using Onyx (http://labs.vmware.com/flings/onyx). It should allow you to translate server/client communication into powershell.

Didn't try it tought.

View solution in original post

0 Kudos
2 Replies
cblomart
Enthusiast
Enthusiast
Jump to solution

I would guess that vSphere Client does a partial update. Especialy when indicating new or changed hardware.

you could verify that by using Onyx (http://labs.vmware.com/flings/onyx). It should allow you to translate server/client communication into powershell.

Didn't try it tought.

0 Kudos
admin
Immortal
Immortal
Jump to solution

Thanks a lot! I just tried it and it seems like UI is doing a partial update. Following is the PS script as captured by Onyx.

# ------- ReconfigVM_Task -------

$spec = New-Object VMware.Vim.VirtualMachineConfigSpec

$spec.changeVersion = "2011-05-03T21:13:56.827432Z"

$spec.memoryMB = 10240

$_this = Get-View -Id 'VirtualMachine-vm-1307'

$_this.ReconfigVM_Task($spec)

0 Kudos