NB: When you set the vsphere.server you will likely need to include the default port, 443, in the url. Ex. 192.168.1:443
If you have not logged on to the Tidal API yet, run
tidal login to do so.
Once you are logged on to the Tidal API, execute the
tidal login vsphere command
A set of prompts will appear to help you connect to your vSphere account:
- vSphere Server - Either an IP address or a FQDN that resolves to the correct IP for the ESXi or vCenter instance
- vSphere Username - A username that has read access to the vCenter or ESXi instance.
- vSphere Password - Corresponding password for the user.
- vSphere API Endpoint - The default is
/sdk, It can be left as is, unless you know your setup does not use the default.
- Use SSL/TLS? - The default is to use SSL (y), which can be left unless you know you can’t use it.
- Skip HTTPS certificate checks? - The default is to not skip (n), which can be left unless you know they need to be skipped.
After answering the above prompts, you will see the message:
Login to vSphere successful. Saving config file...Done!
Syncronizing your vSphere inventory with Tidal Migrations is simple with:
tidal sync vsphere
Loading data.. Transforming data.. Validating JSON... Valid. Logging in to server at https://demo.tidalmg.com as email@example.com Logged in. Updating via API.. Update successful
You can easily split this into two commands to allow you to inject other metadata about your inventory, if needed. To do this simply use the get command to get your inventory. Modify it as you need and then you can use the sync command to upload your data.
tidal get vsphere, will fetch your vSphere inventory and output JSON (check it out!).
Modify the data as you like from Standard Input and then send it to Standard Output.
tidal sync servers, will take that JSON from STDIN and send it to Tidal Migrations.
tidal get vsphere | ./modify_script.rb | tidal sync servers
You can easily set this to run periodically. The integration updates records if they already exist, or creates new records if they don’t. Look at setting this command up as a cron job that runs once per day.
Additional Configuration Options
The integration can be configured with several other methods besides
You can use these alternate approaches if they better suite your use case.
The other configuration options available are to set values in the configuration file (either interactively or manually) or set environment variables.
The credentials and configuration settings take precedence in the following order:
- Environment Variables
- Configuration file
- Prompt in the terminal - If neither are present, you will be prompted to enter the required details and they are stored in the default configuration file.
1) Configuration File
You can set your vSphere credentials with the following commands:
tidal config set vsphere.username [your username]
tidal config set vsphere.password [your password]
tidal config set vsphere.server 192.168.1.12
The set values are stored in the default configuration file.
You can create a file, for example
config.yml, with content similar to this:
vsphere: username: my_user_name_here password: my_secure_vsphere_password server: 126.96.36.199 tidal: email: my_user_name_here password: my_secure_password_here url: https://my_instance_name_here.tidalmg.com
That can be used with a command:
tidal sync vsphere --config config.yml
2) Environment Variables
Another alternative is to set the following environment variables with the needed values and Tidal Tools will use them: