Quantcast
Channel: VMware Communities : All Content - VMware vCenter Converter SDK
Viewing all 706 articles
Browse latest View live

Unable to SSH to the source machine

$
0
0

I'm receiving a "ssh connection was refused" error while trying to conduct a Linux P2V with the SDK.   I checked that that SSH is running on the source machine and that root is in the AllowUsers for SSHD.  I'm beginning to believe that this error may have to with something other than SSH?   Any ideas would be wonderful. 

 

Thanks!

 

C:\_cd\sdk\samples\DotNet\cs\SubmitWinP2VJob\bin\Debug>ConverterSamples.exe crai

g-vm.properties

Caught SoapException -

Actor :

Code : ServerFaultCode

Detail XML : <detail><InvalidArgumentFault xmlns="urn:converter" xsi:type="vim2

5:InvalidArgument" xmlns:vim25="urn:vim25" xmlns:xsi="http://www.w3.org/2001/XML

Schema-instance"><vim25:faultCause><vim25:fault xsi:type="ConverterSysinfoQueryC

onnRefusedFault"><description>[Converter Agent SysinfoQuery] ssh connection was

refused</description></vim25:fault><vim25:localizedMessage>Unable to SSH to the

source machine. Make sure that the SSH daemon is running on the source machine.<

/vim25:localizedMessage></vim25:faultCause></InvalidArgumentFault></detail>

ERROR: Failed to submit P2V Conversion Job.


Scripting VMware Converter

$
0
0

I apologize for the very basic question.

I need to convert some VMs during the night, to save resources.

Is there any way to create a script to launch Converter at a given time to convert a given VM?

Regards

marius

vCenter Converter API with Ruby

$
0
0

Hi,

 

In the SDK archive, I have seen some examples how to use the Converter API with Java and dotNet.

However, I'm not familiar with those languages and the examples are not use to me.

Still I want to automate some image converting processes (import/export images from vSphere) and for that I'm using Ruby scripts.

Is it possible to use the converter API with Ruby? If it is, some examples will be great as well.

 

Thanks

Anyone have experience with BESR image to vmware P2V

$
0
0

I have successfully built the C# sample, but now I need to make modifications to the code so that it will work with our current environment which uses Symantec BESR images (.sv2i).

 

So firstly I would like to know if this is something that someone has successfully accomplished, before I waste a ton of my own time to realize there is some roadblock.

In the long run I would like to have a server.properties file for each image, that way I can script the conversion of a number of servers.

 

If anyone else is in need of the same solution I would be willing to work together because I know I will need some help and IMO there is a lack of examples available.

Thanks in Advance!

Receiving Error When building

$
0
0

I haven't edited any of the SDK files, I just wanted to build them while I test things out in Java for the converter SDK.

 

When I build, I receive the following error:

 

 

C:\sdk\samples\Axis>build

Generating converter stubs from wsdl

- Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.

{urn:vim25}DynamicArray already exists

{urn:vim25}DynamicData already exists

{urn:vim25}DynamicProperty already exists

 

 

My assumption is that I'm missing the activation.jar and the javax.mail.jar files somewhere; but I've added them to every \lib location that I can think of.

 

Has anyone corrected this issue before?

 

After building, when I run:    java -cp %LOCALCLASSPATH% SubmitWinP2VJob/Program

 

I get the errors:

 

- Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.

 

ERROR: Failed to Connect to Converter Server.

 

 

Any help is appreciated,

 

Thanks,

Craig

Which version of Java could successfully run the converter SDK Java samples?

$
0
0

Hi All,

 

I have set up the VMware-converter-sdk-5.1.0-1087880  sample Java and run it based on java 1.6, and it keep throwing NoClassFound errors.

 

1. I have added javaMail.jar to fix the build.bat complains.

2. put rt.jar from JDK1.4.2 to fix the missing class error" sun.security.provider.Sun"

3. Now I hit the new error "com.sun.net.ssl.internal.ssl.Provider "

I am kind of give up for keep adding new jars, Anyone have an idea or hit the similar problem before?

If you have successfully run the Sample java, could you please let me know which version of Java you have used? Thanks very much for your help.

 

 

Java -verison: 1.6.0

Axis : 1.4

OS:   windows 2003

 

If the solution will be grab a new rt.jar, could I just copy over the rt.jar instead of upgrade the java ? My other applications somehow need the java to stay in 1.6.0.

 

Update: add C:\j2sdk1.4.2_08\jre\lib\rt.jar to local classpath, which has the sun class, but show me the new missing class: com.sun.net.ssl.internal.ssl.Provider  -_-

 

Anyone

 

Error message:

 

D:\VMware-converter-sdk-5.1.0-1087880\sdk\samples\Axis>java -cp %LOCALCLASSPATH%

SubmitWinP2VJob/Program submitwinp2vjob.properties

 

 

Exception in thread "main" java.lang.NoClassDefFoundError: sun.security.provider

.Sun

        at java.lang.J9VMInternals.verifyImpl(Native Method)

        at java.lang.J9VMInternals.verify(J9VMInternals.java:72)

        at java.lang.J9VMInternals.verify(J9VMInternals.java:70)

        at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

 

 

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct

orAccessorImpl.java:41)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC

onstructorAccessorImpl.java:39)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:515)

        at org.apache.commons.discovery.tools.ClassUtils.newInstance(ClassUtils.

java:160)

        at org.apache.axis.AxisProperties$1.run(AxisProperties.java:183)

        at java.security.AccessController.doPrivileged(AccessController.java:202

)

        at org.apache.axis.AxisProperties.newInstance(AxisProperties.java:166)

        at org.apache.axis.components.net.SocketFactoryFactory.getFactory(Socket

FactoryFactory.java:75)

        at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:1

87)

        at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.ja

va:404)

        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)

 

 

        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg

y.java:32)

        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)

        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)

        at org.apache.axis.client.Call.invoke(Call.java:2767)

        at org.apache.axis.client.Call.invoke(Call.java:2443)

        at org.apache.axis.client.Call.invoke(Call.java:2366)

        at org.apache.axis.client.Call.invoke(Call.java:1812)

        at com.vmware.converter.ConverterBindingStub.converterRetrieveServiceCon

tent(ConverterBindingStub.java:32608)

        at SubmitWinP2VJob.ConverterConnection.connect(ConverterConnection.java:

70)

        at SubmitWinP2VJob.Program.run(Program.java:73)

        at SubmitWinP2VJob.Program.main(Program.java:48)

Caused by: java.lang.ClassNotFoundException: sun.security.provider.Sun

        at java.lang.Throwable.<init>(Throwable.java:80)

        at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:7

6)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:643)

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:345)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:609)

        ... 29 more

ConverterSSLVerificationFault with converter 5.1 even if verifyPeer == false

$
0
0

We are receiving ConverterSSLVerificationFault  when we try to re-configure a VM on a ESX host. We always use verifyPeer==false to get rid of SSL related errors and that worked fine for us with Converter 4.3.

Is it possible to disable such verification for  Converter 5.1?

 

Request:

 

<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">    <S:Body>        <ns2:ConverterServerConversionManagerCreateJob xmlns="urn:vim25" xmlns:ns2="urn:converter">            <ns2:_this type="ConverterServerConversionConversionManager">ConversionManager</ns2:_this>            <ns2:spec>                <ns2:name>foo</ns2:name>                <ns2:source>                    <ns2:location xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:ConverterComputerSpecManagedVmLocation">                        <ns2:vimConnect>                            <ns2:hostname>172.28.17.239</ns2:hostname>                            <ns2:credentials xsi:type="ns2:ConverterVimConnectionSpecLoginVimCredentials">                            </ns2:credentials>                            <ns2:verifyPeer>false</ns2:verifyPeer>                        </ns2:vimConnect>                        <ns2:uuid>ef5f86c0-ad10-41a3-aa20-2c81cedbb242</ns2:uuid>                    </ns2:location>                </ns2:source>                <ns2:conversionParams>                    <ns2:doReconfig>true</ns2:doReconfig>                    <ns2:reconfigParams/>                    <ns2:doInstallTools>true</ns2:doInstallTools>                    <ns2:doCustomize>false</ns2:doCustomize>                    <ns2:removeRestoreCheckpoints>true</ns2:removeRestoreCheckpoints>                </ns2:conversionParams>            </ns2:spec>        </ns2:ConverterServerConversionManagerCreateJob>    </S:Body></S:Envelope>

 

Response:

 

<?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>A specified parameter was not correct.            </faultstring>            <detail>                <InvalidArgumentFault xmlns="urn:converter" xsi:type="vim25:InvalidArgument" xmlns:vim25="urn:vim25">                    <vim25:faultCause>                        <vim25:fault xsi:type="ConverterSSLVerificationFault">                            <selfSigned>false</selfSigned>                            <thumbprint>84:93:B6:B7:EF:D5:30:36:46:D3:70:DD:2A:DC:9C:B9:18:B3:EF:B5                            </thumbprint>                            <msg>Verification parameters:                                PeerThumbprint: 84:93:B6:B7:EF:D5:30:36:46:D3:70:DD:2A:DC:9C:B9:18:B3:EF:B5                                ExpectedThumbprint:                                ExpectedPeerName: 172.28.17.239                                The remote host certificate has these problems:                                * The host certificate chain is incomplete.                                * Host name does not match the subject name(s) in certificate.                                * unable to get local issuer certificate                            </msg>                        </vim25:fault>                        <vim25:localizedMessage>Unable to verify the authenticity of the                            SSL certificate. Peer thumbprint:                            84:93:B6:B7:EF:D5:30:36:46:D3:70:DD:2A:DC:9C:B9:18:B3:EF:B5.                        </vim25:localizedMessage>                    </vim25:faultCause>                </InvalidArgumentFault>            </detail>        </soapenv:Fault>    </soapenv:Body></soapenv:Envelope>

ConverterStorageParamsVolumeCloningParams syntax in dot net

$
0
0

Hi, i need to use the sdk to create a p2v job of a physical machine but only cloning the c: volume, so i used the dot net sample, wich is made for vs 2005, with visual c# 2005.

so i added this code:

ConverterStorageParams converterStorageParams = new ConverterStorageParams();
         converterStorageParams.cloningMode = "volumeBasedCloning";
         ConverterComputerSpec computerSpec = new ConverterComputerSpec();
         computerSpec.location = Common.BuildLiveSourceLocation(_sourceName, _sourceUsername, _sourcePassword,
                                                                  _sourceOsType, false, "");
         ConverterComputerInfo computerInfo = _converterServer._converterService.ConverterQuery(_converterServer._converterServerContent.queryManager, computerSpec);
         for (int diskcount = 0; diskcount < computerInfo.osInfo.logicalVolumeInfo.Length; diskcount++)
         {
             if (computerInfo.osInfo.logicalVolumeInfo[diskcount].mountPoint[0] == "C:")
             {
                 ConverterStorageParamsVolumeCloningParams volume;
                 volume = new ConverterStorageParamsVolumeCloningParams();
                 volume.resize = false;
                 volume.sourceVolumeId = computerInfo.osInfo.logicalVolumeInfo[diskcount].volumeId;
                 ConverterStorageParamsTargetDiskParams targetdisk ;
                 targetdisk = new ConverterStorageParamsTargetDiskParams();
                 targetdisk.volumesToClone = volume;
                 converterStorageParams.targetDiskParams[0] = targetdisk;
             }

         }
         cloningParams.storageParams = converterStorageParams;

 

when i use this syntax vc# tell me that i cannot implicitly convert ConverterStorageParamsVolumeCloningParams to ConverterStorageParamsVolumeCloningParams[]

so i searched the web and tried using the syntax used in this post:

https://communities.vmware.com/thread/282496?start=0&tstart=0

 

but vc# cast me that it's a bad array declaration and that i've to put the bracket on the object type.

Sadly when i put the bracket on the object type vc# tells me that the array type don't contain a resize or sourcevolumeID property.

 

i'm kind of running in circle, so can anyone tell me the good syntax for this code to work?


Target Disk Cloning API vs Client

$
0
0

Hello. I am working with the vCenter Converter Standalone Server API and have ran in to an odd issue when performing the cloning using the API that I can not replicate with the Client.

 

When cloning with the client I am breaking out the source physical machine's volumes to separate virtual disks: I.E. C: and D: where on one physical disk and are now being put on their own thin provisioned virtual disk.

This works no problem from the client and I get a working vm in the end.

 

When cloning with the API it appears I am performing the same exact task from what I have been able to compare. Based off SDK dotnet example I expanded the BuildCloningParams method under the Programs class with the following code using hardcoded values:

 

      List<ConverterStorageParamsVolumeCloningParams> targetvolumes1 = new List<ConverterStorageParamsVolumeCloningParams>();
      List<ConverterStorageParamsVolumeCloningParams> targetvolumes2 = new List<ConverterStorageParamsVolumeCloningParams>();
      List<ConverterStorageParamsTargetDiskParams> targetdisks = new List<ConverterStorageParamsTargetDiskParams>();

 

      ConverterStorageParamsVolumeCloningParams targetVolume1 = new ConverterStorageParamsVolumeCloningParams();
      ConverterStorageParamsTargetDiskParams targetDisk1 = new ConverterStorageParamsTargetDiskParams();

 

      ConverterStorageParamsVolumeCloningParams targetVolume2 = new ConverterStorageParamsVolumeCloningParams();
      ConverterStorageParamsTargetDiskParams targetDisk2 = new ConverterStorageParamsTargetDiskParams();

 

      targetVolume1.sourceVolumeId = "\\WindowsBitmapDriverVolumeId=[C8-BA-43-2A-00-80-00-00-00-00-00-00]";
      targetvolumes1.Add(targetVolume1);
      targetDisk1.volumesToClone = targetvolumes1.ToArray();
      targetDisk1.sourceDiskId = "disk-1002";

 

      targetVolume2.sourceVolumeId = "\\WindowsBitmapDriverVolumeId=[C8-BA-43-2A-00-80-00-00-0A-00-00-00]";
      targetvolumes2.Add(targetVolume2);
      targetDisk2.volumesToClone = targetvolumes2.ToArray();
      targetDisk2.sourceDiskId = "disk-1002";

 

      targetdisks.Add(targetDisk1);
      targetdisks.Add(targetDisk2);

 

      converterStorageParams.targetDiskParams = targetdisks.ToArray();
      converterStorageParams.vmxDatastoreName = "********-datastore01";

 

The job is successfully created and it goes through the same steps from the client Tasks view. I also check vCenter to be sure the right volumes are broken out to separate virtual disks on the target vm.

Once the progress hits 98% the Task view shows the following errors:

 

Error: An error occurred during reconfiguration.

Warning: Unable to update drive letters for the destination volume layout.

Warning: Unable to update BCD on the destination machine's system volume.

 

I have perused vmware's KB articles and the best match I have found is this:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1037507

 

Exporting the logs does show a match to what that article describes. However, when checking the source machine's boot config through bcedit I get the following:

 

Windows Boot Manager

--------------------

identifier              {bootmgr}

device                  partition=C:

description             Windows Boot Manager

locale                  en-US

inherit                 {globalsettings}

default                 {current}

displayorder            {current}

toolsdisplayorder       {memdiag}

timeout                 30

resume                  No

 

Windows Boot Loader

-------------------

identifier              {current}

device                  partition=C:

path                    \Windows\system32\winload.exe

description             Microsoft Windows Server 2008

locale                  en-US

inherit                 {bootloadersettings}

osdevice                partition=C:

systemroot              \Windows

resumeobject            {2a1e1d63-0b44-11dd-9c71-dce6a05ee2b0}

nx                      AlwaysOff

 

This looks correct. Also the cloning job issued by the client works just fine. It's just issuing what appears to be the same job from the API is causing a problem.

vCenter Converter 5.5 is AVAILABLE for download!

$
0
0

I'm honored to announce the general availability of "vCenter Converter 5.5" and it's corresponding SDK component!

 

It is compatible with the latest vSphere 5.5 platform. For additional details you can check the Converter 5.5 release notes:

VMware vCenter Converter 5.5 Standalone Release Notes

 

From here you can download the latest vCenter Converter 5.5 bits:

vCenter Converter 5.5

 

From here you can download the Converter 5.5 SDK bits:

vCenter Converter SDK for vSphere 5.5

 

-- Antoan Arnaudov

(Product Manager, VMware)

volumebased and/or diskbased cloning for bootable disk

$
0
0

Hello, i want to do a p2v job to only convert the C: drive of my source machine, wich is the one with the os.

i modified the dot net sample with this code:

  1. converterStorageParams.cloningMode = "volumeBasedCloning";
  2.          ConverterComputerSpec computerSpec = new ConverterComputerSpec();
  3.          computerSpec.location = Common.BuildLiveSourceLocation(_sourceName, _sourceUsername, _sourcePassword,
  4.                                                                   _sourceOsType, false, "");
  5.          ConverterComputerInfo computerInfo = _converterServer._converterService.ConverterQuery(_converterServer._converterServerContent.queryManager, computerSpec);
  6.          //
  7.          ConverterStorageParamsManagedTargetDiskParams targetdisk;
  8.           for (int diskcount = 0; diskcount < computerInfo.osInfo.logicalVolumeInfo.Length; diskcount++)
  9.          {
  10.              if (computerInfo.osInfo.logicalVolumeInfo[diskcount].mountPoint[0] == "C:")
  11.              {
  12.                  ConverterStorageParamsVolumeCloningParams volume;
  13.                  volume = new ConverterStorageParamsVolumeCloningParams();
  14.                  volume.resize = false;
  15.                  volume.sourceVolumeId = computerInfo.osInfo.logicalVolumeInfo[diskcount].volumeId;
  16.                  targetdisk = new ConverterStorageParamsManagedTargetDiskParams();
  17.                  targetdisk.volumesToClone = new ConverterStorageParamsVolumeCloningParams[]{volume};
  18.                  targetdisk.datastoreName = "SnapServer";
  19.                  converterStorageParams.targetDiskParams = new ConverterStorageParamsManagedTargetDiskParams[1];
  20.                  converterStorageParams.targetDiskParams[0] = targetdisk;
  21.              }
  22.          }
  23.         converterStorageParams.vmxDatastoreName = "SnapServer";

 

It is working but i end up with a VM that don't boot on the disk. i was thinking it was due to volumebasedcloning (wich seems to not be the case after checking the worker logs when adding a job through gui) so i changed my code to use diskbasedcloning:

 

  1. converterStorageParams.cloningMode = "diskBasedCloning";
  2.          ConverterComputerSpec computerSpec = new ConverterComputerSpec();
  3.          computerSpec.location = Common.BuildLiveSourceLocation(_sourceName, _sourceUsername, _sourcePassword,
  4.                                                                   _sourceOsType, false, "");
  5.          ConverterComputerInfo computerInfo = _converterServer._converterService.ConverterQuery(_converterServer._converterServerContent.queryManager, computerSpec);
  6.          //
  7.          ConverterStorageParamsManagedTargetDiskParams targetdisk;
  8.          string volumec="";
  9.           for (int diskcount = 0; diskcount < computerInfo.osInfo.logicalVolumeInfo.Length; diskcount++)
  10.          {
  11.              if (computerInfo.osInfo.logicalVolumeInfo[diskcount].mountPoint[0] == "C:")
  12.              {
  13.                  volumec = computerInfo.osInfo.logicalVolumeInfo[diskcount].volumeId;
  14.                  break;
  15.              }
  16.          }
  17.           for (int diskcount2 = 0; diskcount2 < computerInfo.hardwareInfo.storage.volume.Length; diskcount2++)
  18.          {
  19.              if (computerInfo.hardwareInfo.storage.volume[diskcount2].volumeId == volumec)
  20.              {
  21.                  targetdisk = new ConverterStorageParamsManagedTargetDiskParams();
  22.                  targetdisk.sourceDiskId = computerInfo.hardwareInfo.storage.volume[diskcount2].diskId[0];
  23.                  targetdisk.datastoreName = "SnapServer";
  24.                  converterStorageParams.targetDiskParams = new ConverterStorageParamsManagedTargetDiskParams[1];
  25.                  converterStorageParams.targetDiskParams[0] = targetdisk;
  26.                  break;
  27.              }
  28.          }
  29.         converterStorageParams.vmxDatastoreName = "SnapServer";

 

wich give me a " TaskImpl has failed with MethodFault::Exception: vmodl.fault.InvalidArgument" error.

 

i'm kind of running in circle, can anyone point me to the right direction to achieve my goal?

thanks.

Getting "Failed to poweron vm" on conversion?

$
0
0

Hi,

 

Trying to migrate an Ubuntu box to VMWare, I'm getting the error "General system error occurred: failed to poweron vm".

 

Creating and starting a VM manually works just fine - any ideas?

 

Thanks.

resize and newCapacityInBytes are being reset

$
0
0

I’m trying to automate a practical scenario with vConverter SDK. I have hosted vConverter Server at port 443 so that I can access the Converter Service via SOAP API. I have compiled the WSDL into C# stubs using wsdl.exe, and I’m trying to use the original .NET samples that come shipped with Converter SDK (in folder samples/DotNet). Everything is VMware v5.5.

 

Below, I have modified the BuildCloningParams method with manual Volume Cloning parameters for the Target Disk parameters. My objective is take the total space of the source volume and if it is beyond a certain size (60GB), then shrink it to its used space plus 2GB for buffer. This code below makes the changes, and I can see in the VS watch, that the conversion params in the Job Spec object have been updated to consider the highlighted. I have two 1TB disks and two small (5G) disks.     

 

private ConverterCloningParams BuildCloningParams()       {          ConverterCloningParams cloningParams = new ConverterCloningParams();          ConverterStorageParams converterStorageParams = new ConverterStorageParams();          converterStorageParams.cloningMode = "volumeBasedCloning";               List targetDisks = new List();          string diskId = null;          var computerInfo = _converterServer._converterService.ConverterQuery(_converterServer._converterServerContent.queryManager, _liveSourceSpec);          List targetVolumes = new List();          foreach (var volume in computerInfo.hardwareInfo.storage.volume)          {              if (diskId == null) diskId = volume.diskId[0];              ConverterStorageParamsVolumeCloningParams targetVolume = new ConverterStorageParamsVolumeCloningParams { sourceVolumeId = volume.volumeId };              if (volume.capacityInBytes > (60L * (long)Math.Pow(1024, 3)))              {                  targetVolume.newCapacityInBytes = volume.spaceUsedInBytes + (2L * (long)Math.Pow(1024,3));                  targetVolume.resize = true;              }              targetVolumes.Add(targetVolume);          }                   ConverterStorageParamsManagedTargetDiskParams targetDisk = new ConverterStorageParamsManagedTargetDiskParams { volumesToClone = targetVolumes.ToArray(), datastoreName = _datastore };          targetDisk.sourceDiskId = diskId;          converterStorageParams.skipUnwantedFiles = true;          targetDisk.diskType = "vmfsMonolithicFlat";          targetDisks.Add(targetDisk);          converterStorageParams.vmxDatastoreName = _datastore;          converterStorageParams.targetDiskParams = targetDisks.ToArray();          converterStorageParams.optimizedPartitionAlignment = true;          cloningParams.storageParams = converterStorageParams;          ConverterTargetVmSpec targetVMSpec = new ConverterTargetVmSpec();          targetVMSpec.name = _vcVMToCreate;          targetVMSpec.location = BuildTargetVMLocation();          targetVMSpec.productVersion = "P2V'ed v0.1";          cloningParams.target = targetVMSpec;                  ConverterBasicHardwareParams hardwareParams = new ConverterBasicHardwareParams();          if (_vmMem > 0)          {              hardwareParams.memoryMB = _vmMem;              hardwareParams.memoryMBSpecified = true;          }          if (_vmvCPUs > 0)          {              hardwareParams.numCPUs = _vmvCPUs;              hardwareParams.numCPUsSpecified = true;          }          cloningParams.basicHardwareParams = hardwareParams;          cloningParams.ovfParams = new ConverterOvfParams();          return cloningParams;       }

 

BUT the SubmitJob errors out with ‘insufficient space’ message.  This is because my source disk is 1TB and the target ESXi host is only 224GB. However, because I resized my two disks to 60GB odd, total should have been 120GB and this error shouldn’t have occurred. I dug into the logs created by Converter Service, and found out that the highlighted parameters are not being set.

 

conversionParams = (converter.params.ConversionParams) { -->       dynamicType = , -->       osInstanceBootLoaderEntry = (converter.info.BootConfigInfo.BootLoaderEntrySpec) null, -->       doClone = true, -->       cloningParams = (converter.params.CloningParams) { -->          dynamicType = , -->          target = (converter.params.TargetVmSpec) { -->             dynamicType = , -->             name = "VM1", -->             location = (converter.params.TargetVmSpec.ManagedVmLocation) { -->                dynamicType = , -->                vimConnect = (converter.VimConnectionSpec) { -->                   dynamicType = , -->                   hostname = "10.17.136.65", -->                   port = , -->                   credentials = (converter.VimConnectionSpec.LoginVimCredentials) { -->                      dynamicType = , -->                      username = "root", -->                      password = (not shown), -->                   }, -->                   verifyPeer = true, -->                   sslThumbprint = "", -->                }, -->                vmFolder = , -->                host = , -->                resourcePool = , -->                computeResource = , -->                vmFolderName = , -->                hostName = , -->                resourcePoolName = , -->                computeResourceName = , -->             }, -->             productVersion = "P2V'ed v0.1", -->             hardwareVersion = , -->          }, -->          storageParams = (converter.params.StorageParams) { -->             dynamicType = , -->             cloningMode = "volumeBasedCloning", -->             diskControllerType = , -->             targetDiskParams = (converter.params.StorageParams.TargetDiskParams) [ -->                (converter.params.StorageParams.ManagedTargetDiskParams) { -->                   dynamicType = , -->                   sourceDiskId = "disk-1002", -->                   volumesToClone = (converter.params.StorageParams.VolumeCloningParams) [ -->                      (converter.params.StorageParams.VolumeCloningParams) { -->                         dynamicType = , -->                         sourceVolumeId = "\WindowsBitmapDriverVolumeId=[DC-0C-9E-E5-00-00-10-00-00-00-00-00]", -->                         resize = , -->                         newCapacityInBytes = , -->                         newClusterSizeInBytes = , -->                      }, -->                      (converter.params.StorageParams.VolumeCloningParams) { -->                         dynamicType = , -->                         sourceVolumeId = "\WindowsBitmapDriverVolumeId=[DC-0C-9E-E5-00-00-40-1F-00-00-00-00]", -->                         resize = , -->                         newCapacityInBytes = , -->                         newClusterSizeInBytes = , -->                      }, -->                      (converter.params.StorageParams.VolumeCloningParams) { -->                         dynamicType = , -->                         sourceVolumeId = "\WindowsBitmapDriverVolumeId=[FE-35-CF-6D-00-00-10-00-00-00-00-00]", -->                         resize = , -->                         newCapacityInBytes = , -->                         newClusterSizeInBytes = , -->                      }, -->                      (converter.params.StorageParams.VolumeCloningParams) { -->                         dynamicType = , -->                         sourceVolumeId = "\WindowsBitmapDriverVolumeId=[FE-35-CF-6D-00-00-F0-BF-DE-00-00-00]", -->                         resize = , -->                         newCapacityInBytes = , -->                         newClusterSizeInBytes = , -->                      } -->                   ], -->                   diskType = "vmfsMonolithicFlat", -->                   lvg = , -->                   gpt = , -->                   datastoreName = "datastore1", -->                } -->             ]

 

Interestingly, if I do the same thing via Converter UI, the parameters are set correctly, and the job succeeds.

 

(converter.params.StorageParams) { -->    dynamicType = , -->    cloningMode = "volumeBasedCloning", -->    diskControllerType = "scsiLsiLogicSAS", -->    targetDiskParams = (converter.params.StorageParams.TargetDiskParams) [ -->       (converter.params.StorageParams.ManagedTargetDiskParams) { -->          dynamicType = , -->          sourceDiskId = "disk-1001", -->          volumesToClone = (converter.params.StorageParams.VolumeCloningParams) [ -->             (converter.params.StorageParams.VolumeCloningParams) { -->                dynamicType = , -->                sourceVolumeId = "Disk#0_Partition#1", -->                resize = false, -->                newCapacityInBytes = , -->                newClusterSizeInBytes = , -->             }, -->             (converter.params.StorageParams.VolumeCloningParams) { -->                dynamicType = , -->                sourceVolumeId = "\WindowsBitmapDriverVolumeId=[BA-A5-93-3F-00-00-80-02-00-00-00-00]", -->                resize = false, -->                newCapacityInBytes = , -->                newClusterSizeInBytes = , -->             }, -->             (converter.params.StorageParams.VolumeCloningParams) { -->                dynamicType = , -->                sourceVolumeId = "\WindowsBitmapDriverVolumeId=[BA-A5-93-3F-00-00-20-6D-05-00-00-00]", -->                resize = true, -->                newCapacityInBytes = 62070537830, -->                newClusterSizeInBytes = , -->             }, -->             (converter.params.StorageParams.VolumeCloningParams) { -->                dynamicType = , -->                sourceVolumeId = "Disk#0_Partition#4", -->                resize = false, -->                newCapacityInBytes = , -->                newClusterSizeInBytes = , -->             } -->          ], -->          diskType = "vmfsMonolithicFlat", -->          lvg = false, -->          gpt = false, -->          datastoreName = "datastore1", -->       } -->    ], -->

 

I’m attaching both the server (SDK) and client (UI) logs for you to compare. Plus I’m attaching my sample project (VS 2012) as well.

Scheduling a Converter 5.5 job

$
0
0

Hi guys,

 

I'm really struggling to find any information about how I can schedule a converter job to happen with V5 or V5.5 since VMware dropped the Vcenter plugin (daft decision in my book).

 

I've searched my ass off and still haven't found any solutions........... is there any script examples or anything like that I can use to schedule a server to do a P2V converter regularly ?

 


"could not determine if the source system was 32 or 64 bit;"

$
0
0

While trying to convert a CentOS Linux machine, I'm getting this error while querying the source spec.

[Converter Agent SysInfoQuery] could not determine if the source system was 32 or 64 bit; return code 1; result: Unable to open connection. Host doesn't exist.

 

It crashes here:

 

computerInfo = _converterServer._converterService.ConverterQuery(_converterServer._converterServerContent.queryManager,_liveSourceSpec);

 

Where the _liveSourceSpec is being built using the following. All parameters are correct and I have checked connectivity using SSH.

 

BuildLiveSourceLocation(String sourceName, String sourceUsername, String sourcePassword,String osType,String sslThumbprint)   
{

       ConverterComputerSpecLiveComputerLocation liveSourceLocation = newConverterComputerSpecLiveComputerLocation();

                liveSourceLocation.hostname = sourceName;

                liveSourceLocation.username = sourceUsername;
liveSourceLocation.osType = osType;

liveSourceLocation.verifyPeer =
true;

liveSourceLocation.verifyPeerSpecified = true;
liveSourceLocation.sslThumbprint = sslThumbprint;

       if (osType.ToLower().Equals("linuxos"))       
{

      liveSourceLocation.port = 22;

           liveSourceLocation.portSpecified = true;       
}

return liveSourceLocation;

   
}


Enhanced C# SDK samples

$
0
0

Hello all

 

I am uploading an enhanced version of C# samples for Converter SDK usage.

The existing samples demonstrate only agent installation and conversion of a live Windows machine. These enhanced samples include also:

  - Conversion of powered off VMs, including both managed (ESXi or vCenter Server) and hosted (Workstation, Player, Fusion) sources and destinations; hosted sources include also Hyper-V VMs, VMware backups, and third party images;

  - Conversion of powered on Linux machines;

  - Starting of synchronizable conversions of Windows live machines and starting synchronization tasks for those conversions;

  - Reconfigurations;

  - Getting source info only;

  - Getting default conversion parameters from destination;

  - Getting latest jobs and tasks.

The zip includes the C# source files, the project file, and the properties file.

Please note that the properties file format is different - there are much more properties, it supports comments and array values. Read the comments in it for more info.

The source files contain more comments, too.

 

Disclaimer:

This code is what is states to be - sample. It is intended only to help understanding how to use Converter SDK.

It has passed only very basic testing and is not production ready.

 

Hope this will help.

Regards,

Plamen

Converter API: Time out when calling ConverterServerConversionManagerCreateJob

$
0
0


I have a remote Converter Server and two remote vCenters. I have some code to submit jobs automatically with Converter API. Most of time, the jobs are successful. But when there are some running jobs, the next jobs may fail with time out exception.



Can some one give me some suggestions? How to avoid this tiime-out exception? Can I improve the Converter Server performance? Can I set a longer waiting time for ConverterAPI? Thanks a lot.



2014-03-26 01:48:14,859 ERROR BatchConverterServer - Caught Exception : 



 Name : WebException



 Message : The operation has timed out



 Trace :    at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)



   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)



   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)



   at ConverterApi.ConverterService.ConverterServerConversionManagerCreateJob(ManagedObjectReference _this, ConverterServerConversionConversionJobSpec spec, Object extraInfo)



   at Batchv2v.Server.BatchConverterServer.Batchv2v.Server.ConverterServer.submitJob(String jobName, SourceVM sourceVM, TargetVM targetVM) in C:\Users\Administrator\git\batchV2V\SubmitV2VJob\Server\BatchConverterServer.cs:line 153



System.Net.WebException: The operation has timed out



   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)



   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)



   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)



   at ConverterApi.ConverterService.ConverterServerConversionManagerCreateJob(ManagedObjectReference _this, ConverterServerConversionConversionJobSpec spec, Object extraInfo)



   at Batchv2v.Server.BatchConverterServer.Batchv2v.Server.ConverterServer.submitJob(String jobName, SourceVM sourceVM, TargetVM targetVM) in C:\Users\Administrator\git\batchV2V\SubmitV2VJob\Server\BatchConverterServer.cs:line 153



2014-03-26 01:48:14,890 ERROR SubmitTask - ERROR: Failed to


Configure network on the vm.which is converted using vcenter converter tool

$
0
0

     Hi All,

 

I am converting a physical machine to virtual. in the process I add couple of nic;s to the the vm that is being created. I wanted to know is there a way we can assign the static ip address on the nic;s using vsphere converter api or vsphere api.

 

i.e i want to confiure the eht0 and eth1 on the virtuak machine during the convertion process or after the conversion by reconfiguring vm.

 

Thanks,

Kiran

Monitor the progress of the submitted job -ConverterServerConversionManagerCreateJob

$
0
0

Hi All,

 


I am trying to  perform a p2v conversion using the converter 5.5 sdk . I was able to set all the properties and submit the job.

 


I have used ConverterServerConversionConversionJobInfo result = converterService.ConverterServerConversionManagerCreateJob(converterServerContent.conversionManager,jobSpec,null);  to submit the job.

 


I wanted to know is there a way we can monitor the progress of the task in percentage and the status of the task .

 


When i check the

 


ConverterServerConversionConversionJobInfo   class also has MOR to the job and scheduled task . but i am currently struck at how to use them to find the progress of the submitted job.

 


Thanks,

 


Kiran

Sample in sdk fails to connect to VCenter

$
0
0

Hi,

 

I tried to run the C# sample that comes with the Vmware vcenter converter SDK. But i ended up with the following error,

 

D:\GitHub\Upload\Upload>ConverterSamples.exe submitwinp2vjob.properties

Caught Exception :  Name : WebException Message : The request failed with HTTP s

tatus 400: Bad Request. Trace :    at System.Web.Services.Protocols.SoapHttpClie

ntProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream

responseStream, Boolean asyncCall)

   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN

ame, Object[] parameters)

   at ConverterApi.ConverterService.ConverterRetrieveServiceContent(ManagedObjec

tReference _this)

   at ConverterSamples.ConverterConnection.Connect(String serverUrl, String user

name, String password)

ERROR: Failed to Connect to Converter Server.

 

Server URL and username and password are passed correctly. Please help me on this.

 

Thanks a lot

Viewing all 706 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>