This section includes the following information:
Before you begin using the command line utility, you need to ensure that the Migrate Server is properly configured. You can check the configuration in the PlateSpin.Migrate.Console.exe.config file, located in the same path as the command line utility. After the Migrate installation, the following config file should already be populated with values.
<?xml version="1.0" encoding="utf-8 ?>"
<configuration>
<appSettings>
<add key="MigrateServerURL" value="https://localhost/PlateSpinMigrate/"/>
<add key="ServerDomain" value=""/>
<add key="psuser" value="administrator"/>
<add key="pspassword" value="encoded_password"/>
<add key ="encoded" value="yes"/>
</appSettings>
</configuration>
The tool uses these values as it executes commands. You need to reconcile the values in the file with the settings for the Migrate Server with which you want to connect.
The value for the pspassword key is blank by default and you must specify an encoded password as the value. To encode the password, use the encode command. For more information about commands, see Section I.2.2, Becoming Familiar with the Commands.
If you choose to provide encoded passwords for source workload and target platform, set the value for the encoded key in the following line of the PlateSpin.Migrate.Console.exe.config file to yes, otherwise set value to no.
<add key ="encoded" value="no"/>
You can display the commands supported in the tool by running it with the Help option or with the ? option from the command prompt, like this:
C:\Program Files\PlateSpin Migrate Client\CommandLine>PlateSpin.Migrate.Console.exe Help
The tool displays a matrix that includes information similar to what is included in the following table:
Table I-1 Commands available from the Migrate CLI tool
Command |
Description |
---|---|
run |
Runs a configured .ini file as a scheduled job. When the you add the /wait=no parameter and the job starts to run, its Job ID is displayed in the interface. |
query |
Runs a query on the job (when you specify a Job ID) to display its current status. |
discover |
Runs an operation that inventories the details of a supported workload or target computer in preparation for a migration or “conversion” job. |
refresh |
Refreshes a discovered server. |
unDiscover |
Undiscovers a server. |
abort |
Aborts a scheduled job. |
licenseInfo |
Displays the license information of the migrate server. |
serversync |
Prepares the server for the Server Sync operation and then runs a serversync job using the configuration file. |
encode |
Encodes the text input or the data in the text file. |
massdiscover |
Performs mass discovery of source workloads and targets. The discovered workloads and targets are displayed both in the PlateSpin Migrate Client and the PlateSpin Migrate Web Interface To mass discover workloads and targets, you must first list the workloads and targets that you want to discover in a CSV file. To create this CSV file, refer to the sample CSV file located at \PlateSpin Migrate Client\CommandLine\Sample INI\MassDiscovery.csv. |
When you run any of these commands, you must include its required parameter(s) in the command line. You can also include some optional parameters, when needed. For example, savejob= parameter saves the job in default location.
To display a list of these parameters at the command prompt, run the command without any parameter. For example, if you run the discovercommand without parameters, like this:
C:\Program Files\PlateSpin Migrate Client\CommandLine>PlateSpin.Migrate.Console.exe discover
the command line interface displays these following:
[discover] discovers a server Required Parameters: /machineAddress= machine address to discover /userName= the username to use /password= the password to use /type= type like windows, linux,vmware_esx,vmware_vcenter, Optional Parameters: /network= network name to connect to /address= server address to connect to /psuser= Username used for accessing PlateSpin Migrate server as user different from the one logged on this computer /pspassword= Password used for accessing Platespin Migrate server for the user different from the one logged on this computer /wait= wait for completion of job [yes,no] /clusterName= clustername to be discovered /verbose= verbose mode for output [on,off] /output= the output file /format= the ouptput format to display in [text,html,xml] /sslcertificatewarnings= Whether to Ignore or Enforce SSL Certificate Warnings [Ignore| Enforce]
NOTE:You should become familiar with the different CLI commands and their respective required and optional parameters.
If you were to run the discover command (which is also a job), you would use a syntax similar to this example, at the command prompt:
C:\Program Files\PlateSpin Migrate Client\CommandLine>PlateSpin.Migrate.Console.exe discover /machineaddress=10.10.8.100 /username=administrator /password=password /type=windows /wait=no
Note that all required parameters and one optional parameter are included in this example.
When the discover command (job) starts, the CLI tool displays its job ID, similar to this example:
8be8d306-7665-4869-9795-a9dbb3ce1471
You can leverage this ID to learn the status of the job, just by using the query command, like this:
C:\Program Files\PlateSpin Migrate Client\CommandLine>PlateSpin.Migrate.Console.exe query /id=8be8d306-7665-4869-9795-a9dbb3ce1471
The query command yields a status report that includes all of the details of the job. This is the same kind of information you might see from the Migrate Client Jobs view.