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

yes, i'm aware that there is no converter for linux.

i'm executing the java command from linux box to converter server(windows).  So i was confused where to log for the worker log. 

In the worker log , the error is

"Resetting the stub adapter for server <xxxx> service state request failed. class vmacore::SystemExecption(A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because the connected host has failed to respond.

Failed to connect socket.

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

That's not working - in logs there are many expected errors, selection of random one explains nothing.

My recommendation is to do required sample conversion from Converter GUI, then get the log (to verify parameters passed from/to) and extend (and fix if required) SDK to work in your case.

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

i've done a conversion via GUI . It was successful . Found that missing the  converter helper NIC configuration and storage details was not provided.  Attached the test_prop( vmware converter sdk properties file) and   prop_from_log(manual conversion via GUI).

1. how to provide the nic values in the sdk properties file

2. how to set the storage value automatically . Query source gave almost 65 disk and 25 logical volumes. i'm developing automated script for conversion so there is no way to manually edit the storage details in the properties file . is there any automated way to convert the values to the properties file ?

In the properties file  there is no information to provide the nic values. the nic information from the GUI log file.

         networkParams = (converter.params.NetworkParams) {

-->             preserveNicCount = false,

-->             preserveNicMapping = false,

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

-->                (converter.params.NetworkParams.ManagedNicParams) {

-->                   connected = true,

-->                   networkName = "dvPG_NP01_VMNet_1128",

-->                   nicControllerType = "vmxnet3"

-->                }

-->             ]

-->          },

-->          basicHardwareParams = (converter.params.BasicHardwareParams) {

-->             numCPUs = 12,

-->             numCoresPerSocket = 12,

-->             memoryMB = 64320

-->          },

-->          incrementalP2VCloningParams = (converter.params.IncrementalP2VCloningParams) null,

-->          nextBitmapId = <unset>,

-->          snapshotSource = <unset>,

-->          preserveDeviceBacking = <unset>,

-->          preserveIdentity = <unset>,

-->          doSynchronize = <unset>,

-->          doFinalize = <unset>,

-->          useProxyMode = false,

-->       },

-->       doReconfig = true,

-->       reconfigParams = (converter.params.ReconfigParams) null,

-->       doInstallTools = <unset>,

-->       doCustomize = <unset>,

-->       customizationParams = (converter.params.CustomizationParams) null,

-->       doUninstallAgent = <unset>,

-->       powerOnTargetVM = false,

-->       removeRestoreCheckpoints = <unset>,

-->       helperVmNetworkParams = (converter.params.HelperVmNetworkParams) {

-->          useIpv4 = true,

-->          useDhcp = false,

-->          useIpv6 = true,

-->          ipv6ConfigType = "automatic",

-->          staticNetworkParams = (converter.params.HelperVmNetworkParams.StaticNetworkParams) {

-->             hostname = "y.y.y.y",

-->             subnetMask = "t.t.t.t",

-->             gateway = "r.r.r.r",

-->          },

-->          staticIpv6NetworkParams = (converter.params.HelperVmNetworkParams.StaticIpv6NetworkParams) null,

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

i've to develop the end to end automation of the conversion . please help me , is there a way to provide all the values to the properties file from the query source operation to the convert operation.

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

Most of all values could be empty in Converter, then they have default value during execution.

If there is DHCP server in destination network, then no IP should be assigned to helper VM, and conversion will find and use the IP assigned to helper VM.

In simpler case, i.e. without static IP for helper VM, you'll need to fill only network-name in converter.params.NetworkParams.NicParams as converter.params.NetworkParams.ManagedNicParams. Otherwise you'll need to fill converter.params.HelperVmNetworkParams too. If you need to specify datastore, then you'll need to change few datastoreName params in converter.params.StorageParams and bellow.

About network - look at function buildConversionParams, there is special conversionParams.setHelperVmNetworkParams witch you'll need to implement.

About storage - look at undocumented parameters "storage.targetdisk.xxx" and especially "storage.targetdisk.datastore" or extend function buildStorageParams.

All these function are in ConverterOperation.java

HTH

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

i'm looking for the property file value for adding the nic card and setting the ip . But in the converter operation.java is not handling that property . IT handles only the default property which was mentioned in the submitwinp2v.job .  if i have to use the network configuration , do i have to modify the converteroperation.java to assign the network properties ?

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

Yes, of course you can (and you must) modify ConverterOperation.java (and may be not only this file).

As well as properties file, just ensure the unique name(s) to avoid confusions.

After any change, don't forgot to compile java.

Regards

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

i've added Managed nic params in the properties files as well as java code as follows. But i'm not sure about the hosted nic properties. converterNetworkParamsHostedNicParams.java file has two properties one is connected and the other one is com.vmware.converter.ConverterNetworkInfoHostedNicInfoConnectionType connectionType .  when i look at converterNetworkInfoHostedNicInfoConnectionType.java  , it has bridged, nat , and hostonly static variables.  how to define the hostednic params in properties file and use it in ConverterOperation.java .

Do i have look ConverterNetworkInfoHostedNicInfo to find the inputs(it has nicid, label, connected,connectionType as inputs)  ?. i've assumed that it's only two inputs and added that in the below.

Please help me out for the inputs as well as how to declare the ConnectionType if it's a input. it throws the error as below during compilation.

properties file

;network

network.preserveNicCount=false

network.preserveNicMapping=false

network.nic.count=1

;Managed target

network.Managed.nic.connected#0=true

network.Managed.nic.networkName#0=dvPG_NP01_VMNet_1128

network.Managed.nic.controllerType#0=vmxnet3

; hosted target

network.hosted.nic.connected#0=true

network.hosted.nic.connectionType#0=nat

java code : the snippet added in the getInputFromFile in converterOperation.java

    case "network.preserveNicCount":

        _preserveNicCount = Boolean.parseBoolean(props[1])

        break;

         case "network.preserveNicMapping":

        _preserveNicMapping = Boolean.parseBoolean(props[1])

        break;

         case "network.nic.count":

        if (!Common.isNullOrEmpty(props[1])) {

                 int count = Integer.parseInt(props[1]);

                 switch (_targetType) {

                 case Hosted:

                    _nicParams =

                       new ConverterNetworkParamsHostedNicParams[count];

                    for (int i = 0; i < count; ++i) {

                    _nicParams[i] =

                          new ConverterNetworkParamsHostedNicParams();

                    }

                    break;

                 case Managed:

                _nicParams =

                       new ConverterNetworkParamsManagedNicParams[count];

                    for (int i = 0; i < count; ++i) {

                    _nicParams[i] =

                          new ConverterNetworkParamsManagedNicParams();

                    }

                    break;

                 default:

                    throw new ParseException("Invalid network nic type", 0);

                 }

        }

        break;

         case "network.managed.nic.connected":

        if (!Common.isNullOrEmpty(props[2])) {

                 int id = Integer.parseInt(props[1]);

                 if (_nicParams != null && id < _nicParams.length) {

                    _nicParams[id].setConnected(props[2]);

                 }

              }

              break;

         case "network.Managed.nic.networkName":

        if (!Common.isNullOrEmpty(props[2])) {

                 int id = Integer.parseInt(props[1]);

                 if (_nicParams != null && id < _nicParams.length) {

                    _nicParams[id].setNetworkName(props[2]);

                 }

              }

              break;

         case "network.Managed.nic.controllerType":

        if (!Common.isNullOrEmpty(props[2])) {

                 int id = Integer.parseInt(props[1]);

                 if (_nicParams != null && id < _nicParams.length) {

                    _nicParams[id].setNicControllerType(props[2]);

                 }

              }

              break;

case "network.hosted.nic.connected":

        if (!Common.isNullOrEmpty(props[2])) {

                 int id = Integer.parseInt(props[1]);

                 if (_nicParams != null && id < _nicParams.length) {

                    _nicParams[id].setConnected(Boolean.parseBoolean(props[2]));

                 }

              }

              break;

         case "network.hosted.nic.connectionType":

        if (!Common.isNullOrEmpty(props[2])) {

                 int id = Integer.parseInt(props[1]);

                 if (_nicParams != null && id < _nicParams.length) {

                    _nicParams[id].setConnectionType(new ConverterNetworkInfoHostedNicInfoConnectionType(props[2]));

                 }

              }

              break;

it gives the compilations error as

SubmitWinP2VJob/ConverterOperation.java:611: error: ConverterNetworkInfoHostedNicInfoConnectionType(String) has protected access in ConverterNetworkInfoHostedNicInfoConnectionType

                    _nicParams[id].setConnectionType(new ConverterNetworkInfoHostedNicInfoConnectionType(props[2]));

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

Here is the extended Helpervm and network params but during compilation it throws error. why it says cannot find method setConnected()

bash-4.2$ javac -classpath "$LOCALCLASSPATH" SubmitWinP2VJob/*.java

SubmitWinP2VJob/ConverterOperation.java:587: error: cannot find symbol

                    _nicParams[id].setNetworkName(props[2]);

                                  ^

  symbol:   method setNetworkName(String)

  location: class ConverterNetworkParamsNicParams

SubmitWinP2VJob/ConverterOperation.java:595: error: cannot find symbol

                    _nicParams[id].setNicControllerType(props[2]);

                                  ^

  symbol:   method setNicControllerType(String)

  location: class ConverterNetworkParamsNicParams

SubmitWinP2VJob/ConverterOperation.java:611: error: ConverterNetworkInfoHostedNicInfoConnectionType(String) has protected access in ConverterNetworkInfoHostedNicInfoConnectionType

                    _nicParams[id].setConnectionType(new ConverterNetworkInfoHostedNicInfoConnectionType(props[2]));

                                                     ^

SubmitWinP2VJob/ConverterOperation.java:611: error: cannot find symbol

                    _nicParams[id].setConnectionType(new ConverterNetworkInfoHostedNicInfoConnectionType(props[2]));

                                  ^

  symbol:   method setConnectionType(ConverterNetworkInfoHostedNicInfoConnectionType)

  location: class ConverterNetworkParamsNicParams

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

You don't need to manage hosted networking, only managed one.

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

You need to cast base class to specific (and real) class where the appropriate properties exists.

HTH

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

don't have to add hostednic ?

Thanks. i've modified the converterOperation.java and compiled successfully . Query source works fine. but convert operation failed as "A specified parameter was not correct:".

null

AxisFault

faultCode: ServerFaultCode

faultSubcode:

faultString: A specified parameter was not correct:

faultActor:

faultNode:

faultDetail:

        {urn:converter}InvalidArgumentFault:<vim25:faultCause><vim25:fault xsi:type="vim25:InvalidArgument"><vim25:invalidProperty>TargetDiskParams.VolumeCloningParams.SourceVolumeId</vim25:invalidProperty></vim25:fault><vim25:localizedMessage>A specified parameter was not correct: TargetDiskParams.VolumeCloningParams.SourceVolumeId</vim25:localizedMessage></vim25:faultCause>

A specified parameter was not correct:

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

Normally you don't need to change volumes and storage params, try without them.

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

These parameters are not used during "query" operation...

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

you mean to say we don't have to key in the storage params in properties file. if it's empty, will it convert all ?

i've tried without storage params. it triggers the job in converter but in the console it throws "read time out". what could be the issue.

and also the job is failed with error "root not found"

Executing operation 'Convert' from properties file 'new_trf.properties'

Failed to execute operation 'Convert' from file 'new_trf.properties'

; nested exception is:

        java.net.SocketTimeoutException: Read timed out

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

faultSubcode:

faultString: java.net.SocketTimeoutException: Read timed out

faultActor:

faultNode:

faultDetail:

        {http://xml.apache.org/axis/}stackTrace:java.net.SocketTimeoutException: Read timed out

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

Compare again log from successful conversion and your conversion and figure out what is missing or wrong.

P.S.

I have no idea what you are doing and within what kind of environment, for example I've never seen error: "Vmacore::Http::UnimplementedRequestHandler: HTTP method POST not supported for URI /ofxweb/ControllerNotification.asmx" (my limited prediction abilities are exhausted already).

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

well, I'm doing a physical RHEL 5 linux server to VM .  The converter server is windows.  The java program is called from my development linux server. the java program inputs are converter server ip, credentails and properties file.

the source server has some san and local disk as well.  query source gave the result for the disk as fake-disk-from-vg.  here is a sample voulme info of a disk.  how do i get the diskID and sourceDiskId of a tragetdisk.voulmestoclone.  here is a part of the storage params of the properties file. Stuck at mainly providing the storage params. here given only 2 disk information. similarly remaining values where given for the other disk as well.

attached converter machine GUI physical server disk snapshot.

properties file

storage.cloningmode=volumeBasedCloning ;

storage.diskcontrollertype= scsiLsiLogic

storage.optimizealignment=true;

storage.targetdisk.count=2

storage.targetdisk.sourcediskid#0=disk-66

storage.targetdisk.disktype#0=vmfsMonolithicFlatThinProvisioned

storage.targetdisk.lvg#0=false

storage.targetdisk.gpt#0=false

storage.targetdisk.datastore#0=CLU21_HNVGS03

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

storage.targetdisk.disktype#1=vmfsMonolithicFlatThinProvisioned

storage.targetdisk.lvg#1=true

storage.targetdisk.gpt#1=false

storage.targetdisk.datastore#1=CLU21_HNVGS03

; Must precede the individual volumestoclone fields. Assumed 0 if unset.

; Individual volume fields with numbers equal or larger than this count will be ignored.

storage.targetdisk.volumestoclone.count#0=2

storage.targetdisk.volumestoclone.count#1=3

; The first index is the disk index, the second is the volume index

; Use the source id got by QuerySource

storage.targetdisk.volumestoclone.sourcevolumeid#0#0=/dev/cciss/c0d0p1

storage.targetdisk.volumestoclone.resize#0#0=false

storage.targetdisk.volumestoclone.newcapacityinbytes#0#0=

storage.targetdisk.volumestoclone.newclustersizeinbytes#0#0=1024

storage.targetdisk.volumestoclone.sourcevolumeid#0#1=swap-volume(/dev/cciss/c0d0p3)

storage.targetdisk.volumestoclone.resize#0#1=false

storage.targetdisk.volumestoclone.newcapacityinbytes#0#1=

storage.targetdisk.volumestoclone.newclustersizeinbytes#0#1=1024

storage.targetdisk.volumestoclone.sourcevolumeid#1#0=/dev/HdpSanVg/hodpfdp

storage.targetdisk.volumestoclone.resize#1#0=false

storage.targetdisk.volumestoclone.newcapacityinbytes#1#0=

storage.targetdisk.volumestoclone.newclustersizeinbytes#1#0=4096

storage.targetdisk.volumestoclone.sourcevolumeid#1#1=/dev/HdpSanVg/hodhis

storage.targetdisk.volumestoclone.resize#1#1=false

storage.targetdisk.volumestoclone.newcapacityinbytes#1#1=

storage.targetdisk.volumestoclone.newclustersizeinbytes#1#1=4096

query source.

Volume:

                                #1:

                                        DiskId:

                                                #0: fake-disk-from-vg(SVg)

                                        PartitionNumber: <unspecified>

                                        SpaceUsedInBytes: 4619264

                                        Label:

                                        LvName: applis

                                        ExtfsFeatures:

                                                Extent: false

                                                FlexBg: false

                                                UninitBg: false

                                                InodesCount: 8192

                                        XfsFeatures: <unspecified>

                                        PartitionGuid: <unspecified>

                                        PartitionUuid: <unspecified>

                                        CapacityInBytes: 33554432

                                        VolumeId: /dev/SVg/alis

                                        PartitionType: <unspecified>

                                        Primary: <unspecified>

                                        ClusterSizeInBytes: 1024

                                        Active: false

                                        FirstClusterOffsetInBytes: <unspecified>

                                        FileSystem: ext3

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

I see 3 disks in UI and 2 disks in your definition - something is missing.

What about to use operation "GetDefaults" and modify destination based on the result?

Reply
0 Kudos
umaparvathy
Enthusiast
Enthusiast
Jump to solution

it has all disk information in the properties file. i pasted only 2 disk information here.

To run getDefaults do i have to provide destination server also.

Reply
0 Kudos
POCEH
VMware Employee
VMware Employee
Jump to solution

Yes. If you check code, the function invoked is _converterServer.validateTargetAndGetDefaults(sourceSpec, targetSpec);

Reply
0 Kudos