The reason it's not working is you're providing the incorrect name of the device ... it actually took me second try before realizing what it was looking for
<Hard-Disk> <Name>Disk3</Name> </Hard-Disk>
should be:
<Hard-Disk> <Name>Hard disk 3</Name> </Hard-Disk>
Note: The input is case sensitive and notice the d on disk is lower case. To find out the device name, specifically for your vDisk, you can take a look at the settings for your virtual machine and you'll see the various devices. VMware should have better error/warning handling versus just "dying" out with some message relating to the API that a user may not be aware of
Here is a sample output for a successful virtual disk removal:
[vi-admin@scofield vm]$ ./vmreconfig.pl --server himalaya.primp-industries.com --username root --filename ../sampledata/my_vmreconfig.xml ../schema/vmreconfig.xsd Enter password: Removing hard disk with the backing filename '[himalaya-local-SATA.RE4-GP:Storage] vMA-resize/vMA-resize_1.vmdk' . . . Virtual machine 'vMA-resize' is reconfigured successfully.
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
![]()
If you find this information useful, please award points for "correct" or "helpful".