Quantcast
Channel: VMware Communities: Message List - Converter Standalone
Viewing all articles
Browse latest Browse all 8478

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

$
0
0

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")


Viewing all articles
Browse latest Browse all 8478

Trending Articles