sratcliff
Contributor
Contributor

Automating Converter Standalone using Converter-cli.exe

Hi,

I have worked out that this must be possible because of the inclusion of converter-cli.exe with Converter 5.0.1 Build 875114, plus I've got very close but not quite close enough!  I have vCenter 5.0 and ESXi 5.0.0 hosts.

I am using the following XML and it's submitting the job to Converter with what looks like to be the correct details but fails straight away with the error:

FAILED: The source configuration file is invalid, corrupted or not recognized.

I've checked logs in the following locations but nothing gives me any clues as to what isn't quite right:

C:\ProgramData\VMware\VMware vCenter Converter Standalone\logs

C:\Users\All Users\VMware\VMware vCenter Converter Standalone\logs

C:\Users\XXAdmin\AppData\Local\VMware\VMware vCenter Converter Standalone Client\Logs

Anywhere else I can look?

My XML file (p2v.xml):

<p2v version="2.2" xmlns="http://www.vmware.com/v2/sysimage/p2v" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.vmware.com/v2/sysimage/p2v p2vJob.xsd" xsi:type="P2VJob">
  <source>
    <hostedSpec networkPassword="domainpassword" networkUsername="domain\username" path="PHYSICALSERVER"/>
  </source>
  <dest>
    <managedSpec datastore="Datastore XXXX" folder="Temp" host="HOST1" resourcePool="" vmName="NEWVM">
      <creds host="VCENTER" port="0" type="sessionId" username="domain\username" password="domainpassword" />
    </managedSpec>
  </dest>
  <importParams diskType="VMFS" preserveHWInfo="true" removeSystemRestore="false" targetProductVersion="PRODUCT_MANAGED">
    <nicMappings/>
    <diskLocations/>
  </importParams>
  <postProcessingParams/>
</p2v>

I'm running the command: C:\Program Files (x86)\VMware\VMware vCenter Converter Standalone>converter-cli -s C:\Temp\p2v.xml

I feel sure that this is just a minor issue with the xml input configuration file and if I knew the correct syntax or had an example file I could get it working. I can't find one anywhere. Should the datastore be the name vSphere/ESXi knows it as rather than the name I see in the vSphere Client?

Please help!

Thanks

0 Kudos
12 Replies
POCEH
VMware Employee
VMware Employee

Converter CLI is no more supported. You may use Converter SDK (http://communities.vmware.com/community/vmtn/developer/forums/convertersdk) instead.

HTH

0 Kudos
sratcliff
Contributor
Contributor

Surely I would need to know code/programming to use that? Which I don't....

This seems to work... when you say no more supported is it removed from Converter 5.1 and 5.5 then?

0 Kudos
POCEH
VMware Employee
VMware Employee

There are samples in .NET and Java in Converter SDK that don't need to know how to program, and you can check few discussion in convertersdk forum too. HTH

0 Kudos
sratcliff
Contributor
Contributor

That's not going to be easy then is it, without any experience of .NET / Java. I wouldn't even know where to start and I do have this way working now, I just want to know more about the syntax so I can fine tune it.

When you say no more supported is it removed from Converter 5.1 and 5.5 then?

0 Kudos
sratcliff
Contributor
Contributor

Can I use powershell to get it to run convert jobs/tasks?

0 Kudos
POCEH
VMware Employee
VMware Employee

Unfortunatly no. There are no PowerShell extensions for the converter.

0 Kudos
sratcliff
Contributor
Contributor

When you say no more supported is it removed from Converter 5.1 and 5.5 then?

0 Kudos
POCEH
VMware Employee
VMware Employee

There is other task that the tool is required - VCB restore.

However the tool is not supported so use Converter SDK.

0 Kudos
sratcliff
Contributor
Contributor

Can the Converter SDK be used/called from the command line?

0 Kudos
patanassov
VMware Employee
VMware Employee

If you write a command line tool that uses Converter SDK, you could. There is no such binary coming with the installation.

There is sample code in Java and C# which can be used as a basis for such a tool.

Regards

0 Kudos
sratcliff
Contributor
Contributor

There is. It's in the C:\Program Files (x86)\VMware\VMware vCenter Converter Standalone folder. I'm using it and it works, it's just I want to customise it a little more and don't know the syntax for the xml file.

0 Kudos
BenLiebowitz
Expert
Expert

Si,

Did you ever get this working?  Smiley Happy

Ben Liebowitz, VCP vExpert 2015, 2016, & 2017 If you found my post helpful, please mark it as helpful or answered to award points.
0 Kudos