VMware {code} Community
Ashwin89
Contributor
Contributor

Rename the virtual disk

Is there any API to rename the virtual disk?

-AsHwIN

Reply
0 Kudos
1 Reply
lamw
Community Manager
Community Manager

There's not an API function call specifically to rename a VMDK, but there is a fileManager method which can be used to rename files moveDatastoreFile_Task and this is implemented already with vCLI's vifs, it works just like UNIX/Linux "mv" command, but just make sure the VMDK is not locked for access

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos