VMware Cloud Community
eigkhad
Contributor
Contributor

Problem running a VMware vCenter Converter Standalone 6.0 SDK locally for a Convert operation.

Short description of the situation:

We are trying to run the VMware SDK for a convert operation on a local machine. We have installed the VMware vCenter Converter Standalone Client, the one with a GUI that you can manually convert with, but we would like to be able to do this with the SDK. The manual convert operations within the GUI all seem to be working fine, but whenever we attempt to do this within the SDK we keep getting errors that we have not been able to resolve internally.

Here is the basic information about the environment we have set up and the error:

Downloaded SDK:

* VMware-converter-sdk-6.0.0-2716716.zip

Error Info:
* "Failed login due to a bad user name or password"
* <InvalidLoginFault xmlns="urn:converter" xsi:type="vim25:InvalidLogin" xmlns:vim25="urn:vim25" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"></InvalidLoginFault>
* ConverterConnection.cs line 262

Environment:
* Windows XP SP3
* Firewall Disabled
* ___VMWare_Conv_SA___ user has been added to the administrator group.

Relevant SDK Properties:
operation.count=1
operation#0=Convert
source.type=Physical
source.physical.address=127.0.0.1
; Have tried machine name, local ip, and localhost as well
source.physical.username=administrator
; Have tried under the administrator account, under other accounts, using other admin privaleged users, all to no avail.
source.physical.password=adminpw
source.physical.ostype=windowsOs
source.physical.agentport=
source.physical.thumbprint=
source.physical.reboot=false

converter-server.xml changes:
<enableRemoteAccess>true</enableRemoteAccess>
<enableNonRootAccess>true</enableNonRootAccess>
<validatorEnabled>false</validatorEnabled>

We can provide more information about the client, server and agent setup if needed, although these were relatively unchanged. We also have attempted running the sdk on both http and http (http://localhost/converter/sdk, etc.).

Any help would be much appreciated ~

0 Kudos
4 Replies
POCEH
VMware Employee
VMware Employee

I think that SDK is not suitable for 'This local machine' conversions, however you can try to leave hostname empty and try again.

When you try to connect to localhost (127.0.0.1) you actually try to connect to the converter's agent similar to connecting to other physical machine, thus requiring thumbprint and respective open ports.

From the other hand - conversion of physical machine do not require installation of whole converter but just converter's agent (for Windows) which is covered by SDK.

Are you sure you want to install whole converter and convert 'This local machine'?

HTH

0 Kudos
eigkhad
Contributor
Contributor

Hi and thanks for the response,

> I think that SDK is not suitable for 'This local machine' conversions, however you can try to leave hostname empty and try again.

I just tried this with no luck.

And out of curiosity, is there a reason it shouldnt work targetting the local machine? It was my understanding that the convert process should be similar to the client GUIs convert operation which works fine targetting the localhost. In the end I'm not sure if they are planning on using this to target a local machine or somewhere else, as we are simply trying to set up a functioning process right now, and I thought localhost would be the simplest case to get working.

> From the other hand - conversion of physical machine do not require installation of whole converter but just converter's agent (for Windows) which is covered by SDK

I'm not entirely sure what you mean here. While sifting through the code it seems that if I enabled the agent installation by setting the port to 9089, then both portions of code would be executed.

Sorry, I'm still pretty new to this stuff and not entirely grasping all the concepts still.

Cheers for the input ~

0 Kudos
tkd0826
Contributor
Contributor

Hi,  I met a just same problem as you pointed out.

My environment as below:

Downloaded SDK:

* VMware-converter-sdk-6.0.0-2716716.zip

Environment:

* Windows XP SP3

* Firewall Disabled

Relevant SDK Properties:
operation.count=2
operation#0=QuerySource

operation#1=Convert
source.type=Physical
source.physical.address=
source.physical.username=
source.physical.password=
source.physical.ostype=windowsOs
source.physical.agentport=
source.physical.thumbprint=
source.physical.reboot=false

converter-server.xml changes:
<enableRemoteAccess>true</enableRemoteAccess>
<enableNonRootAccess>true</enableNonRootAccess>
<validatorEnabled>false</validatorEnabled>

Parameter to Sample Program:

localhost adminuser adminpasswd C:\VMconverterSDK\sdk\samples\DotNet\cs\SubmitWinP2VJob\submitwinp2vjob.properties

I tried to access converter server with https, but I coud not make it.

So I changed url https to http to login to converter server.

Now QuerySource operation is successfully completed, but Convert operation meet a exception as you said.

If you already hava a solution, let me know pls.

Server's log is Here

vmware-converter-server[05168] [Originator@6876 sub=Default] Entering void __thiscall Converter::Server::Conversion::ConversionManagerImpl::CreateJob(class Converter::Server::Conversion::ConversionJobSpec *,class Vmomi::Any *,class Vmacore::Ref<class Converter::Server::Conversion::ConversionJobInfo> &)

vmware-converter-server[05168] [Originator@6876 sub=Default] Entering bool __thiscall Converter::Server::Conversion::ConversionManagerImpl::IsMaintenanceMode(void)

vmware-converter-server[05168] [Originator@6876 sub=Default] Leaving "bool __thiscall Converter::Server::Conversion::ConversionManagerImpl::IsMaintenanceMode(void)"

vmware-converter-server[05168] [Originator@6876 sub=Default] Throwing "Vim::Fault::InvalidLogin::Exception" -- void __thiscall Converter::Server::Conversion::ConversionManagerImpl::CreateJob(class Converter::Server::Conversion::ConversionJobSpec *,class Vmomi::Any *,class Vmacore::Ref<class Converter::Server::Conversion::ConversionJobInfo> &) ("d:/build/ob/bora-2716716/bora/sysimage/ufad/server/conversionManagerImpl.cpp:221")

vmware-converter-server[05168] [Originator@6876 sub=Default] Leaving "void __thiscall Converter::Server::Conversion::ConversionManagerImpl::CreateJob(class Converter::Server::Conversion::ConversionJobSpec *,class Vmomi::Any *,class Vmacore::Ref<class Converter::Server::Conversion::ConversionJobInfo> &)" under an exception

Cheers.

0 Kudos
peevs
VMware Employee
VMware Employee

Here it's a code snippet (in Java) witch creates the source spec for this local machine conversion and it works:

            LOG.info("invoked setupSource() - prepare THIS LOCAL MACHINE as source spec");

            ConverterComputerSpecLiveComputerLocation liveLoc =

                  new ConverterComputerSpecLiveComputerLocation();

            // hostname set to empty string = This local machine source

            ConnectInfo connectInfo = this.converterServerMachine.getConnectInfo();

            liveLoc.setHostname("");

            liveLoc.setUsername(connectInfo.getCredentials().getUsername());

            liveLoc.setPassword(connectInfo.getCredentials().getPassword());

            liveLoc.setOsType(ComputerSpec.getLiveLocationOsType(this.converterServerMachine));

            this.sourceSpec = new ConverterComputerSpec();

            this.sourceSpec.setLocation(liveLoc);

Pay attention that the hostname is an empty string (not null). Also you should provide administrative credentials, and the source OS type (which is always "windowsOs" in the case "this local machine")

0 Kudos