문제

Update: The preferred solution would be something that uses the VmWare toolkit for .NET and achieves the following

One of the tasks that we now need to perform (if possible) is to toggle the virtual hard disks from non-persistent to persistent mode and vice versa.

I have tried looking for the correct API calls but haven't found any yet. Does anyone know if this can be done via the API calls?

도움이 되었습니까?

해결책

Although I haven't done this exact operation, I have done similar operations through the ReconfigVm task: http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.VirtualMachine.html#reconfigure

You will need to set up a VirtualMachineConfigSpec with an upodated VirtualDevice whose VirtualDeviceBackingInfo has the desired persistence type in its diskMode attribute. The data objects are documented here:

http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.vm.ConfigSpec.html

http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.vm.device.VirtualDevice.html

http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.vm.device.VirtualDevice.BackingInfo.html

다른 팁

According to the VMware vSphere PowerCLI Cmdlets Reference, this should do the job:

Get-HardDisk -VM $myVM | Set-HardDisk -Persistence "Independent(Non)Persistent"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top