Hey,
I have a fairly simple set-up, one vCenter 5.0 controlling one vSphere ESXi 5.0. I am trying to rename a disk remotely and the most straight forward way seemed to be to use vmkfstools (per http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100249...
vmkfstools --url https://vcenter/sdk/webService?dcPath=MyDC --vihost esxi -E '[datastore1] test/test.vmdk' '[datastore1] test/test-1.vmdk'
However when I run this it fails as follows:
Attempting to move disk [datastore1] test/test.vmdk
Unable to move virtual disk :
Using the --verbose option I see:
RESPONSE: $VAR1 = '<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault><faultcode>ServerFaultCode</faultcode><faultstring></faultstring><detail><InvalidArgumentFault xmlns="urn:vim25" xsi:type="InvalidArgument"><invalidProperty>dc</invalidProperty></InvalidArgumentFault></detail></soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>';
If I use vmkfstools directly on the ESXi it works -- but refuses to cooperate through vCenter.
Anybody have ideas what might be causing this or have found a remote way to rename a disk through the vCenter?
Thanks!
Welcome to the Communities..
Have you tried this syntax as mentioned the KB
vmkfstools --server <vCenter IP/Hostname> -E '[Datastore Name] Directory Name/examplevm.vmdk' '[Datastore Name] Directory Name/examplevm-renamed.vmdk
Apologies, should have included that fact in the intial post. The vmkfstools command requires the --vihost option when --server references a vCenter. Here is the error message I get when trying to leave --vihost off:
The --vihost option must be specified when connecting to vCenter.
For a summary of command usage, type '/usr/bin/vmkfstools --help'.
For documentation, type 'perldoc /usr/bin/vmkfstools'.
Thanks for the suggestion!
