Uncategorized

System Center Orchestrator Example

Greetings,

My colleague, Matt Geddes, has create a new 3 part blog on adding a script to System Center Orchestrator.  As usual, Matt sets up the problem in part 1. In part 2, he shows how to add a script to System Center.  And finally in part 3, you get your hands dirty with the actual PowerShell SyncVm script.  Matt has nicely provided a way to test in a stand-alone environment before it is added to System Center.

A new directory, SystemCenterOrchestrator in Tintri’s PowerShell GitHub repo has been added which contains the Sync VM example discussed in the above mentioned blog.

If you desire more SyncVM information, please check out these posts.

Now go plug into System Center,

– Rick –

Advertisements

V310.61 API Documentation Available

Greetings,

New Tintri API documentation is now available for version v310.61. Version v310.61 maps to VMstore‘s TXOS 4.3 and TGC 3.5 which contains additional APIs to support Synchronous Replication and disk encryption.

There is a new GitHub repository, tintri-rest-api, which contains the documentation and code examples. The repository tintri-api-examples is now deprecated.

Documentation for older API versions are still available on Tintri’s support site.

Until next time,

– Rick –

Tintri vSphere Web Client Plugin 2.0.2.1

Greetings,

Just a quick note about the Tintri vSphere Web Client Plugin 2.0.2.1 which has been released as GA. It’s now available for download on Support Portal. This is a maintenance release that includes support for the following key features:

  • SyncRepl functionality: support is available for VMstores with synchronous replication.
  • vSphere Plugin version:  displays the plugin version number.
  • Snapshot display: snapshots older than seven days are displayed.
  • IP/FQDN settings: change vCenter server IP/FQDN from the vCenter settings.
  • VM protection:  provides a Snapshot and replicate every minute option.
  • vCenter support:  supports vCenter 6.5.

Here is a list of bugs that have been fixed:

Bug # Description
52631 Customer may be unable to use SyncVM refresh
50475 Customer may be unable to use the ESXi Best Practice if the host is in a non-responding state
45710 Web Client Plugin may not load after upgrading vCenter to vCenter 6.0u2
45617 Snapshot clone behavior in the Web Client Plugin may be different from the VMstore UI when multiple datastores are involved
45049 VMstore may flood vCenter with alarm definitions
43929 Tintri IOPS, Tintri Throughput and Tintri Latency graphs may not display in the datastore Summary tab
43703 The delete snapshot permission may not be available for specific user roles within the Web Client
42901 The Web Client Plugin may hang when customers attempt to refresh a VM disk

After going to the support download page, search for “Tintri vSphere” for the new download.

Cheers,

– Rick –

Obtain a VM CSV Report

Greetings,

A new Python API example, get_vm_report.py, has been uploaded to our Tintri GitHub site.  This new script outputs a CSV report file on all the VMs known to the Tintri server.  (A Tintri server is currently a VMstore or TGC.)  The script also takes a CSV input file that controls which columns are returned.

The tintri-api-examples/reports directory includes vm_report_fields.csv, vm_latency_report_fields.csv, and of course get_vm_report.py.  Let’s discuss the CSV files first.

The file vm_report_fields.csv is a template that contains all the fields or columns that can be included in the VM report.  Each line contains the field name and a short description. To customize your report, copy vm_report_fields.csv to a new file and uncomment the field lines in the new file to be included in the report.  An example of this is vm_latency_report_fields.csv.  Upon examination, you’ll see that the following field lines are uncommented: VmName, TotalLatency, NewtorkLatency, StorageLatency, and DiskLatency.

The Python script reads the input CSV for the fields, and places the fields in the DTO. The API is invoked and a URL is returned.  Using the URL, the report is downloaded.  The tintri_1_1.py library was modified to include a file download function.

Until next time,

– Rick –

 

 

Videos, Videos, and more Videos

Now that our big Tintri Launch is done, I would like to point to some videos that you might find interesting and educational.  These videos review the Tintri launch as well as provide reference materials for earlier products. I would recommend watching these videos in full screen mode.

First off, the Storage Field Day at Tintri is now online which includes 6 videos. This set of videos present a comprehensive view of our new Tintri products.

  1. Tintri Product Overview and Vision with Kieran Harty
  2. Tintri VM-Aware Storage and Quality of Service Demo with Justin Lauer
  3. Tintri VM Scale Out Demo with Mark Gitter
  4. Tintri Analytics Demo with Brandon Salmon
  5. Tintri SyncVM demo with Christopher Slater
  6. Tintri Wrap-up Discussion

If Brandon Salmon’s demo on Tintri Analytics left you wanting more, then check-out Andrew Large‘s Tintri Analytics Video Series. The series contains an introduction, creating application definitions, predicting resource utilization, and planing future VM deployments.

If you want a starter video on VM-scale out, try Sunil Muralidhar‘s, video on Tintri VM Scale-Out: Optimal VM distribution.This video is definitely an introduction.

Next up, Sunil Muralidhar, demonstrates the features of TGC Service Groups.  TGC Service Groups allow a collection of VMs across multiple VMstores to have the same protection and QoS policies.  There is a Python API TGC Service Group QoS example as well as a PowerShell example on GitHub.

In a set of 6 videos, Rob Girard covers cloning and Sync VM manually and with automation.

  1. Manually cloning VMs
  2. Automating cloning VMs with scripts
  3. Reconfiguring VMs for testing
  4. Manually refreshing VMs with production data
  5. Automatically refreshing VMs with production data
  6. Automatically refreshing VMs from a single snapshot

Finally, Christopher Slater is up again in a another set of 6 videos that discusses databases and Tintri.

  1. Performance visualization and isolation
  2. Snapshots in seconds
  3. Clone a database in a few clicks
  4. Restore a database with SyncVM
  5. VM level replication made easy
  6. Set QoS policy for an individual VM

If you want more, you can go to Tintri’s video resource page, and Tintri’s YouTube Channel. I realize that this is a lot to go through, but you can keep this blog handy and view the videos at your leisure;

Happy viewing,

– Rick –

Tintri’s Triple Play

Welcome to Tintri’s May 2016 launch.

I’m just going to quickly cover three launch subjects:

  • Increased all-flash VMstores
  • VM scale out
  • Predictive Analysis

Now the T5000 all-flash arrays have increased storage capacity, approximately a 4 times increase over the old T5000 storage capacity.

T5000 New All-flash Maximum Capacity
Model Max Raw Capacity Max Effective Capacity
T5040 23 TB 77 TB
T5060 46 TB 154 TB
T5080 92 TB 308 TB

Effective capacity is a result of dedupe, compression, and zero block optimization. See the T5000 All-Flash data sheet for more information.

Along with increased storage capacity, VMstores can be federated together into a pool of storage for VM scale-out. Both hybrid and all-flash can be in the same storage pool for resource allocation and resource management. Via the Tintri Global Center (TGC), deep workload analysis identifies VMs that are growing rapidly or heavily using IOPS and makes VM storage migration recommendations.  See Introducing Tintri VM Scale-out for more details.

Even with VM scale-out, you’ll want capacity and performance predictions for planning and forecasting.  With Tintri Analytics, you’ll be able crunch numbers for up to 160,000 virtual machines, get application insights, and throw away your crystal ball.  For more details, see the Tintri Analytics data sheet.

And if you’re hungry for more, you can register for a webinar on May 19 from Kieran Harty, one of Tintri’s co-founders.  Sign up here.

Until next time,

– Rick –

Setting VMstore Maintenance Mode

Greetings,

It has been a while since I’ve written a blog, but here is one that sets the VMstore maintenance mode. Hopefully there will be more coming at a faster pace.

One of Tintri’s customers wanted to set the VMstore’s maintenance mode. When the VMstore maintenance mode is enabled, alert e-mails are not sent except to support@tintri.com.  Theses support@tintri.com e-mails are marked with “maintenance mode”.

Setting maintenance mode allows you to change network configuration or upgrade VMstore without the VMstore sending alert e-mails.  That way the administrator will not be bothered with extraneous e-mails.  Tintri support still receives e-mails just in case something really important occurs, like a disk failure.

I wrote Python and PowerShell examples. Both are interactive, that is, they ask the user if the maintenance mode should be flipped before flipping the enable flag. The maintenance mode flag is located in the maintenance mode data transfer object (DTO) in the appliance DTO.
ApplianceMaintenanceMode DTO:

 
{ "typeId": "com.tintri.api.rest.v310.dto.domain.beans.hardware.ApplianceMaintenaneMode", "endTime": DateTime, "isEnabled": <Boolean>, "startTime": DateTime, }

Appliance DTO:


{ "typeId": "com.tintri.api.rest.v310.dto.domain.Appliance",
  "errorString": <String>,
  "fanDescription": <String>,
  "lastUpdatedTime": DateTime,
  "localAlias": <String>,
  "localPassword": <String>,
  "powerDescription": <String>,
  "redundancyDescription": <String>,
  "temperatureDescription": <String>,
  "alertCounts": ApplianceAlertCounts,
  "allowSnapshotIncompleteVm": ApplianceAllowSnapshotIncompleteVm,
  "components": [ApplianceComponent],
  "configIps": [ApplianceIp],
  "controllers": [ApplianceController],
  "customizationInfo": ApplianceCustomizationInfo,
  "dateTimeConfig": ApplianceDateTime,
  "disks": [ApplianceDisk],
  "diskEncryptionInfo": ApplianceDiskEncryptionInfo,
  "dnsConfig": ApplianceDns,
  "emailConfig": ApplianceEmail,
  "info": ApplianceInfo,
  "ipmiConfig": ApplianceIpmi,
  "lacpConfig": ApplianceLacp,
  "maintenanceMode": ApplianceMaintenanceMode,
  "operationalInfo": ApplianceOperationalInfo,
  "rbacExternalConfig": RbacExternalConfig,
  "snmpConfig": ApplianceSnmp,
  "supportConfig": ApplianceSupport,
  "syslogForwarding": ApplianceSyslogForwarding,
  "temperatures": [Temperature],
  "upgradeInfo": ApplianceUpgradeInfo,
  "uuid": Uuid,
 }

First let’s look at the Python example. The code uses the Setting DNS Primary at Scale as an example, because both perform a PUT on the /v310/appliance resource.  When setting the maintenance mode, start and end times are required.  The VMstore GUI sets a 6 hour duration and the code follows this precedent.


 now = datetime.datetime.now()
 add_6 = now + datetime.timedelta(hours=6)
 time_zone = my_timezone()
 now_str = now.isoformat() + time_zone
 add_6_str = add_6.isoformat() + time_zone

When resetting the maintenance mode the start and end times should not be present, so the code reflects this.


if (new_is_enabled):
    # Create the maintenance mode DTO for enabling.
    new_maint_mode_info = \
      {"typeId": "com.tintri.api.rest.v310.dto.domain.beans.hardware.ApplianceMaintenanceMode",
       "endTime" : add_6_str,
       "isEnabled" : new_is_enabled,
       "startTime" : now_str
      }
else:
    # Create the maintenance mode DTO for disabling.
    new_maint_mode_info = \
      {"typeId": "com.tintri.api.rest.v310.dto.domain.beans.hardware.ApplianceMaintenanceMode",
       "isEnabled" : new_is_enabled,
      }

The request DTO is used to send to the Appliance DTO with the new maintenance mode DTO filled with values to set.


# Create the Appliance object wit the new ApplianceDns DTO.
new_appliance = \
  {"typeId": "com.tintri.api.rest.v310.dto.domain.Appliance",
   "maintenanceMode": new_maint_mode_info
  }

# Create the Request object with the Appliance DTO.
request = \
  {"typeId": "com.tintri.api.rest.v310.dto.Request",
   "objectsWithNewValues": [new_appliance],
   "propertiesToBeUpdated": ["maintenanceMode"]
  }

# Invoke the appliance API to set the maintenance mode.
url = APPLIANCE_URL
r = tintri.api_put(server_name, url, request, session_id)

The rest of the code gets and prints the maintenance mode. The code is locate on our GitHub site at set_maintenance_mode.py.

The PowerShell example follows the Python example closely.  This is due to bug 42915 in the PowerShell Toolkit and the fact that I was unable to use the Tintri Session ID from the toolkit in Invoke-RestMethod().  For me this example was a lesson in using Invoke-RestMethod().  I used Mircosoft’s library and trial and error.

One of things I did was create some helper functions, like tintriVersion(), tintriLogin(), and tintriLogout().  Here is tintriLogin():


Set-Variable JSON_CONTENT "application/json; charset=utf-8"
Set-Variable APPLIANCE_URL "/api/v310/appliance/default"

function tintriLogin
{
param([String]$server)
$loginUri = "https://$($server)/api/v310/session/login"
$loginDict = @{typeId="com.tintri.api.rest.vcommon.dto.rbac.RestApiCredentials";
               username=$user; 
               password=$password
              }
$loginBody = $loginDict | ConvertTo-Json 
$resp = Invoke-RestMethod -sessionVariable session -Method Post -Uri $loginUri -Body $loginBody -ContentType $JSON_CONTENT
return $session
}

The key here is to obtain the session variable which is done with -sessionVariable session. See the code snippet above in the login invoke. Note, the sessionVariable parameter value, session, doesn't have a dollar sign. Later Invoke-RestMethod() calls use the session variable with the WebSession parameter. An example is below.


$url = "https://$($server)$($APPLIANCE_URL)/maintenanceMode"
$resp = Invoke-RestMethod -Uri $url -Method Get -WebSession $session -ContentType $JSON_CONTENT

Again, we get the time and a six hour delta:


$now = Get-Date
$add6 = $now.AddHours(6)
$nowStr = $now.ToString("yyyy-MM-ddTHH:mmzzz")
$add6Str = $add6.ToString("yyyy-MM-ddTHH:mmzzz")

And we build the ApplianceMaintenanceMode DTO depending on whether the maintenance mode is enabled or not.


if ($newIsEnabled) {
    # Create the maintenance mode object for enabling.
    $newMaintModeInfo = @{typeId = "com.tintri.api.rest.v310.dto.domain.beans.hardware.ApplianceMaintenanceMode";
                          endTime = $add6Str;
                          isEnabled = $newIsEnabled;
                          startTime = $nowStr
                         }
}
else {
    # Create the maintenance mode object for disabling.
    $newMaintModeInfo = @{typeId = "com.tintri.api.rest.v310.dto.domain.beans.hardware.ApplianceMaintenanceMode"; 
                          isEnabled = $newIsEnabled
                         }
}

Finally, the Request DTO is created, and the /v310/appliance resource is invoked.

Filtering VM Information

Greetings,

Just a quick note.  I wrote a blog for our corporate site and finding non-clone VMs and synthetic VMs..  There are two types of filtering: server side and client side.  Both types are shown in the blog post.  The code uses the get_vms_page.py from the Tintri GitHub as a template.

For server side filtering, use the query filter.  For client side filtering, obtain the VMs and filter for what you’re looking for.  Client side filtering is useful for fields that cannot be filtered by the query parameters.

Server side includes fields like hypervisor type, cpuPercent, and space used.  Of course, too many search parameters will affect performance.  Check out VirtualMachineFilterSpec page in the API documentation for VM filters.

Regards,

– Rick –

It’s Easy with PowerShell on Tintri

Greetings,

A new on-demand webinar on Tintri’s Automation Toolkit 2.0 is now available which was live on July 14th, 2015.  Luc Dekens and Sunil Muralidhar cover PowerShell basics, QoS, Service Groups, and SyncVM. To view the webinar, you will have to register.

The webinar mentions scripts.  These are posted on our Tintri GitHub site, where you will find all the examples that Luc mentions plus others.  Note that these examples will have to be modified to work in your environment.  Thank-you Luc for writing and allowing us to post the examples.

Regards,

– Rick –