VMware {code} Community
umaparvathy
Enthusiast
Enthusiast
Jump to solution

converter SDK 404 error

while calling the sdk program , it throws 404 error. when i try to access the url https://<converterserver>:443/converter/sdk/ , it shows 404 not found in the browser as well. 

How to enable the sdk webservice URL in convertermachine

$ java -cp $LOCALCLASSPATH SubmitWinP2VJob/Program 10.x.x.x service_xxx xxxx submitjob.properties

Failed to Connect to Converter Server.

(404)Not Found

AxisFault

faultCode: {http://xml.apache.org/axis/}HTTP

faultSubcode:

faultString: (404)Not Found

faultActor:

faultNode:

faultDetail:

        {}:return code:  404

79 Replies
umaparvathy
Enthusiast
Enthusiast
Jump to solution

so far vm is not created with converter SDK.

i've used GUI based converted VM as a target to run the Getdefaults. i didn't get any useful values from the output.

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

Now i'm stuck with passing the storageParams in propreties file. Please someone guide me on the same.  how to get the disk ID  and sourceVolumeId for each disk ID. How to get those details from the SDK for conversion.

is it possible to get the disk id, volumestoclone source volumeId from converterComputerHardwareInfo => which has converterStorageInfo .

if a volume is present on more than one disk, how to mention that in properties file.

kindly share any sample properties file with storage params.

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

Yes, the storage params are tricky moreover with LVM, the IDs are dynamic and hard to predict for general description before conversion as you want.

I'll recommend not to bother storage params and make the conversion via SDK successful.

After than you'll need to make investigation of the result and changes the storage params appropriately.

There are no plans to extend SDK samples in near future.

HTH

umaparvathy
Enthusiast
Enthusiast
Jump to solution

thanks . i'm able to do successful conversion now. i've ignore the volume sourceId.  only used the below storage params in properties file.

storage.targetdisk.sourcediskid#0=disk-xx

storage.targetdisk.sourcediskid#1=fake-disk-from-vg(HpSanVg)

storage.targetdisk.sourcediskid#2=fake-disk-from-vg(opSanVg)

storage.targetdisk.sourcediskid#3=fake-disk-from-vg(RfVg)

storage.targetdisk.sourcediskid#4=fake-disk-from-vg(SVg)

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

Glad to hear this!

Keep in mind that these IDs probably are valid only for this machine/conversion.

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

Thanks . Now the converted linux VM is not having eth0 .  if i do ifup eth0 , it displays "pcnet32 device eth0 doesn't seems to be present . delaying initialization".

i've added network and helpervm too. Smiley Sad . please help me out to get the eth0

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

You've explicitly specified the controller type nicControllerType = "vmxnet3" but your Linux is old and probably doesn't support this controller.

Possible solutions:

- leave controller type empty and default one will be taken

- change to nicControllerType = "pcnet32"

HTH

patanassov
VMware Employee
VMware Employee
Jump to solution

The job spec reads:

networkParams = (converter.params.NetworkParams) {

   preserveNicCount = false,

   preserveNicMapping = false,

   nic = (converter.params.NetworkParams.NicParams) [

      (converter.params.NetworkParams.ManagedNicParams) {

         connected = true,

         networkName = "dvPG_NP01_VMNet_xxx",

         nicControllerType = "vmxnet3"

      }

   ]

},

It seems you have explicitly set the NIC controller to vmxnet3 in the .properties file. The source machine is very old and probably doesn't have a module for vmxnet3.

Edit the VM network and set its controller to pcnet32. If other such are to be converted, change it in the the properties file too.

HTH,

Plamen

umaparvathy
Enthusiast
Enthusiast
Jump to solution

Thanks . i've set the nicControllerType property as empty. it works. Smiley Happy

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

please help me to get the particular job info.

converterSDK sample has List operation which gets the list of tasks and jobs.

getJobHistory in converterConnection gets the all the jobs till the count is given . Instead is there any method to fetch a particular job details.

_converterService.converterReadNextConversionJobs(jobCollector, jobs) => this is declared in converterPortType.java

In converterPortType.java  there are few job lines . Will that be useful to fetch the particular job infromation. If so, how to specify the ManagedObjectReference of conversionJob?

public com.vmware.converter.ConverterServerConversionConversionJobInfo converterServerConversionManagerGetJobInfo(com.vmware.converter.ManagedObjectReference _this, com.vmware.converter.ManagedObjectReference conversionJob)

public com.vmware.converter.ConverterServerConversionConversionJobSpec converterServerConversionManagerGetJobSpec(com.vmware.converter.ManagedObjectReference _this, com.vmware.converter.ManagedObjectReference conversionJob)

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

Why not use jobInfo returned from submitJob function? You can poll job until is active and report progress or what you want, however do not poll it very often, one time per minute should be enough.

HTH

patanassov
VMware Employee
VMware Employee
Jump to solution

This functionality is not implemented in the samples. If you are willing to experiment and do it on your own - here is a hint:

Conversion manager has a getJobInfo method (converterServerConversionManagerGetJobInfo). It takes the job moref as argument; see e.g. updateJob for how to create such object.

If all that sounds too complicated - follow Rossen's advice to cache the job info on creation.

umaparvathy
Enthusiast
Enthusiast
Jump to solution

Thanks . since i need it as a Async solution . i've used the plamen approach.

Here are the changes i've done it in the file.  i've used job.id  in the properties file.

change in ConverterOperation.job ( added GetJob as a operationType )

   private enum OperationType

   {

      Convert,

      Reconfig,

      Synchronize,   // Schedule incremental task of a

                   // synchronizable Windows P2V job

      QuerySource,   // Prints source machine info

      GetDefaults,   // Calls ValidateTargetAndGetDefaults and prints default

                   // conversion parameters

      List, // List recent jobs and tasks

      GetJob; //Get the specific job details

     

   }

// the below part added in execute() switch operation

case GetJob:

            getJobDetails();

            break;

// added this after the list() function definition

   private void getJobDetails() throws InvalidState,

    NotFound,

    RuntimeFault,

    RemoteException

   {

   String dump;

   if (_jobId > 0) {

   ConverterServerConversionConversionJobInfo jobInfo =

   _converterServer.getJobInfo(_jobId);

   if (jobInfo == null) {

   throw new RemoteException("Failed to get job information.");

   }

  

   dump = Common.dump(jobInfo);

   System.out.println(dump);

   }

   }

changed in convertionConnection.java (added a getJobInfo function before the getTaskHistory() function)

   public final ConverterServerConversionConversionJobInfo

      getJobInfo(int jobId) throws RuntimeFault,

      RemoteException,

      NotFound,

      InvalidState

   {

   ManagedObjectReference job = new ManagedObjectReference();

      job.setType("ConverterServerConversionConversionJob");

      job.set_value("job-" + Integer.toString(jobId));

      ConverterServerConversionConversionJobInfo result =

      _converterService.converterServerConversionManagerGetJobInfo(

      _converterServerContent.getConversionManager(), job);

      return result;

     

   }

umaparvathy
Enthusiast
Enthusiast
Jump to solution

Hi ,

now i'm trying windows conversion on another convertor server.  the server is UP . the convertor machine is installed with client server mode. how to resolve this below issue.

Here is the error.

faultCode: ServerFaultCode

faultSubcode:

faultString: Unable to access the remote Converter agent service. It either does not exist or is not responding.

faultActor:

faultNode:

faultDetail:

        {urn:converter}ConverterNoRemoteAgentFault:<name>x.x.x.x</name>

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

Here is my properties file

operation.count=1

operation#0=QuerySource

source.type=Physical ; Valid values: Physical, Managed, Hosted, HyperV

source.physical.address=x.x.x.x; Source machine name or IP, e.g 10.0.0.1

source.physical.username=abc

source.physical.password=pwd

source.physical.clientPrivateKey= ; Path to client private key in OpenSSH format used for Linux P2V.

source.physical.ostype=windowsOs ; Valid values: windowsOs, linuxOs

source.physical.agentport=9089; Won't try to install agent if empty. Usual value: 9089

source.physical.thumbprint=

source.physical.reboot=True

; Target info

target.type=Managed ; Valid values: Managed, Hosted. Needed for Conversion operation only

; Managed target

target.managed.address=y.y.y.y; Target ESX or vCenter server name or IP, e.g 10.0.0.4

target.managed.thumbprint=a:b:c:d:12:34

target.managed.username=ted

target.managed.password=pwd2

; MoId of host as seen in MOB, e.g. 'host-2'. Leave empty for default

target.managed.host=

; MoId of resource pool as seen in MOB, e.g. 'resgroup-1'. Leave empty for default

target.managed.resourcepool=

; MoId of cluster compute resource as seen in MOB, e.g. 'domain-c4'. Leave empty for default

target.managed.cluster=domain-c45

; MoId of VM folder as seen in MOB, e.g. 'group-v3'. Leave empty for default

target.managed.vmfolder=group-v3324

vmtocreate.name=testp2v_FULL

vmtocreate.vcpu=8

vmtocreate.corespersocket=1

vmtocreate.memory=2048

vmtocreate.datastore=DS05

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

Every time you need to check your operation with Converter GUI to ensure that "command" is possible and then add that command to properties file and try to execute it via SDK.

In this situation (i.e. Converter is installed already and fail to access its agent@9089) seems that Windows firewall prevents access outside to port 9089.

HTH

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

Yes , manually via gui for the first time it installed agent on source server and pulled information . But  via sdk ( which is installed on Linux server)  when query source were triggered on windows converter machine , it threw the above error.

After agent installation , manually on the gui, it pulls the information. But from the converter sdk linux machine,  again same error.

When windows converter machine was able to get information from source server , there is no  firewall issue.

You mean to say the firewall issue is on the converter sdk Linux server or  source physical server. ?

is ssl thumbprint required to get information on the sources windows physical server.?

if I do query source or conversion for the first time on windows server , which property has to be mentioned to install converter agent on source server In the properties file?

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

If you do it from Windows then firewall is not a issue. What about source.physical.thumbprint= value? There is some code handling this thumbprint if I recall correctly but you should try with thumbprint.

HTH

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

For the thumbpr there are servers which is not having certificate or the certificates are expired . In that case what to do . I got a test server which is not having certificate thumbprint (get-childitem cert:\LocalMachine\My l select thumbprint) command output is empty .  Whereas one critical server which Has 3 certificates ,all are expired But this was not given for test conversion so I could not check via converter gui to see what value will it take .

Please suggest what to Do for the thumbprint if the certificate is expired or empty ?

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

If you try to connect at port 9089 then self signed certificate of the installed agent is present, there is no such thing as empty certificate.

There is no option to connect to Converter server or agent without certificates (and thumbprint for verification because they are not signed by public CA).

Using thumbprint of certificate avoids any issues with certificate like timeout, invalid host name, etc.

HTH

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

if i try to query source for the first time , what property has to be set  in the properties file to install agent ?

what will be the value of thumbprint  before installing the agent on the source machine ? .

How to get the ssl thumbprint of the source windows machine converter agent thumbprint once the agent is installed via querysource sdk.

Reply
0 Kudos