Blog from September, 2019

Please be advised that there will be a scheduled maintenance on VMware vCenter Server due to a software upgrade from 2:00 pm to 8:00pm on Saturday, September 21, 2019.
Virtual Machines will NOT be affected by this maintenance and you will still be able to access your VM(s) using any remote access methods you have already configured (eg. RDP, ssh, etc).

Following services will be unavailable during the maintenance period:


Any events scheduled to take place while the vCenter server is offline will NOT be processed (eg. neither VM snapshots will be started, will running snapshots be stopped).

We apologize for any inconvenience.

For any questions or concerns regarding this maintenance, please contact vss@eis.utoronto.ca.

VSS-CLI v0.2.3 is available for download via PyPI or GitLab. Latest version includes the following improvements and new features:

Improvements

Virtual Machine Network Interface Controllers creation and updates (#157, #158, #162)

Commands

  • compute vm mk shell

  • compute vm mk from-template
  • compute vm mk from-clone
  • compute vm mk from-spec
  • compute vm mk from-file
  • compute vm set nic up
  • compute vm set nic mk

Description

Following the improvements on the ITS Private Cloud API v2.4.3 🎉, you can now specify (or not) the virtual machine network interface controller in the option -n/--net, in the following format -n <net-moref-name>=<nic-type>

This change applies to compute vm mk and compute vm set nic mk . For example:

 

Updating camelCase to snake_case attributes (#159, #161)

Commands

  • compute os ls

  • compute vm ls
  • compute vm get
  • *  (all)

Description

Guest operating system command has been updated to comply wit changes on v2.4.3 of the API, thus attributes have been renamed as follows. 

Also Object attributes have been updated to match the filters on the backend API:


Adding interactive options to set guest-os command(#159)

Commands

  • compute vm set guest-os

Description

Shows options when provided a substring of the operating system to set up:

Default sorting method for ls commands (#163)

Commands

  • compute folder ls

  • compute os ls
  • compute vm ls
  • compute net ls
  • compute image public ls
  • compute iso public ls
  • compute net public ls

Description

Adding default sorting by name to improve result presentation.

Transfer option for inventory command (#156)

Commands

  • compute inventory 

Description

Option --transfer/--no-transfer to either transfer or not resulting inventory file:

Inventory doc example (#164)

Description:

How-to is available here.

Upgrade

Remember, VSS-CLI documentation is now available in VSS-CLI and the full Change Log is available here. Upgrade or install VSS-CLI as follows:


# using vss-cli
vss-cli upgrade stable

# upgrade with pip
pip install vss-cli --upgrade

# install
pip install vss-cli 


For more information, please refer to the official documentation site.

We are pleased to announce we released the ITS Cloud API v2.4.3 with the following improvements and bug fixes:

Improvements

Virtual Machine Network Interface Controllers creation and updates (#997, #999, #1000)

Endpoints

Description

Based on user feedback and user behaviour, we have improved the way of creating virtual machine network interface controller (NICs). From this version on, Virtual Machine NICs can include network adapter type vmxnet3, vmxnet2, e1000, e1000e in the payload.

Originally, network adapters were created by mapping a list/array of strings ["dvportgroup-1", "dvportgroup-2"] now, NICs are specified by a list of adapter objects [{"network": "dvportgroup-1", "type": "vmxnet2"}, {"network": "dvportgroup-1"}], for example:


Create a Virtual Machine with two NICs: vmxnet3 and e1000e:

curl -H "Authentication: Bearer $TK" -X POST https://cloud-api.eis.utoronto.ca/v2/vm -d '{"description": "Testing new adapter payload", "bill_dept": "EIS", "usage": "Dev", "built_from": "os_install", "os": "78", "folder": "group-v123", "disks": [8], "networks": [{"network": "dvportgroup-1"}, {"network": "dvportgroup-1", "type": "e1000e"}]}'

Note that one of the NICs does not specify the adapter type. In that case the API would set the default adapter to vmxnet3.


Create a couple of network adapters of a given vm:

curl -H "Authentication: Bearer $TK" -X POST https://cloud-api.eis.utoronto.ca/v2/vm/<uuid>/nic -d '[{"network": "dvportgroup-1", "type": "vmxnet2"}, {"network": "dvportgroup-1"}]'


Also, the Virtual Machine Specification resource has been updated to provide the desired format:

curl -H "Authentication: Bearer $TK" -X GET https://cloud-api.eis.utoronto.ca/v2/vm/5030d943-bec7-d76b-a808-99d5366c3409/spec

{
  "_links": {
    "self": "https://cloud-api.eis.utoronto.ca/v2/vm/5030d943-bec7-d76b-a808-99d5366c3409/spec",
    "vm": "https://cloud-api.eis.utoronto.ca/v2/vm/5030d943-bec7-d76b-a808-99d5366c3409"
  },
  "data": {
    "admin_email": "jm.lopez(at)utoronto.ca",
    "admin_name": "Jose Manuel Lopez Lujan",
    "admin_phone": "000-000-0000",
    "bill_dept": "EIS",
    "built_from": "os_install",
    "cpu": 1,
    "description": "Testing vm deployment",
    "disks": [
      8
    ],
    "domain": "domain-c63",
    "folder": "group-v154",
    "inform": [
      "jm.lopez(at)utoronto.ca"
    ],
    "memory": 1,
    "name": "pensive_stonebraker",
    "networks": [
      {
        "network": "dvportgroup-1082",
        "type": "vmxnet3"
      },
      {
        "network": "dvportgroup-1083",
        "type": "e1000"
      }
    ],
    "os": "other26xLinux64Guest",
    "usage": "QA",
    "vss_options": [],
    "vss_service": ""
  },
  "meta": {
    "count": 18,
    "time": "0.16410s",
    "user": "josem"
  }
}

Object attribute update from Camel case to snake case naming convention (#998)

Endpoints

  • /v2/* (all)

Description

The API had a mix of camelCase and snake_case attribute format, and in order to standardize it, we have taken the pythonic approach to use snake_case only. From this version forward, all object attributes will look like the following example:

{
      "cpu_count": 1,
      "created_on": "2019-09-16 Mon 13:32:39 EDT",
      "folder": {
        "moref": "group-v154",
        "name": "Development",
        "parent_moref": "group-v144",
        "path": "VSS > Development",
        "vim_type": "vim.Folder"
      },
      "folder_moref": "group-v154",
      "guest_full_name": "Other 2.6.x Linux (64-bit)",
      "guest_id": "other26xLinux64Guest",
      "hostname": null,
      "ip_address": null,
      "is_template": false,
      "memory_gb": 1.0,
      "memory_mb": 1024,
      "moref": "vm-1114",
      "name": "1909Q-pensive_stonebraker",
      "overall_status": "green",
      "power_state": "poweredOff",
      "provisioned_gb": 10.18,
      "tools_running_status": "guestToolsNotRunning",
      "tools_version": "2147483647",
      "tools_version_status": "guestToolsUnmanaged",
      "uncommitted_bytes": 10452728320,
      "unshared_bytes": 476686370,
      "updated_on": "2019-09-16 Mon 13:32:39 EDT",
      "uuid": "5030d943-bec7-d76b-a808-99d5366c3409",
      "version": "vmx-07"
    }


Guest Operating System object refactor (#996)

Endpoints

  • /v2/os

Description

Guest operating system resource provided objects with the following attributes:

  • guestFullName
  • guestId
  • id

Two out of three attributes were renamed and simplified to:

  • full_name
  • guest_id

And added:

  • family

Then, the new operating system object would look as follows:

   {
      "family": "linuxGuest",
      "full_name": "CentOS 6",
      "guest_id": "centos6Guest",
      "id": 80
    },
    {
      "family": "windowsGuest",
      "full_name": "Microsoft Windows Server 2003 Standard Edition (64 bit)",
      "guest_id": "winNetStandard64Guest",
      "id": 3
    }

Inventory allows user to specify whether to transfer report to vskey-stor (#1001)

Endpoints

  • /v2/inventory

Description

The inventory request resource has a new payload attribute to either transfer the resulting inventory report file to vskey-stor or not. To disable transferring, set the attribute transfer=false. For example:

curl -H "Authentication: Bearer $TK" -X POST https://cloud-api.eis.utoronto.ca/v2/inventory -d '{"properties": ["folder", "disks"], "format": "csv", "transfer": false}'

An inventory file will be generated and can be dowloaded from the API itself:

curl -H "Authentication: Bearer $TK" -X GET https://cloud-api.eis.utoronto.ca/v2/inventory/<request-id>


Bug Fixes

Cross-Origin Read Blocking (CORB)

Endpoints

  • / (all)

Description

Cross-Origin Read Blocking (CORB) is a new web platform security feature that helps mitigate the threat of side-channel attacks (including Spectre). It is designed to prevent the browser from delivering certain cross-origin network responses to a web page, when they might contain sensitive information and are not needed for existing web features. For example, it will block a cross-origin text/html response requested from a <script> or <img> tag, replacing it with an empty response instead. This is an important part of the protections included with Site Isolation. (From Chromium.org)

The API now provides a X-Content-Type-Options: nosniff response header to allow browsers block requests where contents do not match the Content-Type header.

HTTP/1.1 200 OK
Allow: HEAD, OPTIONS, GET
Content-Length: 0
Content-Type: text/html; charset=utf-8
Date: Fri, 20 Sep 2019 17:14:33 GMT
Server: gunicorn/19.7.1
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Ratelimit-Limit: 5000
X-Ratelimit-Remaining: 4999
X-Ratelimit-Reset: 1569002400
X-Vssapi-Appserver: 7853de480362
X-Vssapi-Version: v2.4.3


Virtual Machine event resource not working properly (#1004)

Endpoints

  • /v2/vm/<uuid>/event

Description

The resource to obtain related events on vCenter was not working properly returning 500 errors instead. A fix has been released and works as expected

Virtual Machine HA Group errors (#1003)

Endpoints

  • /v2/vm/<uuid>/vss/ha-group

Description

Exception was thrown due to a typo in the code. Fix has been released and it's working as expected.



VSS-CLI v0.2.2 is available for download via PyPI or GitLab. Latest version includes the following improvements and new features:

Improvements:

  • #145: core: pyvss upgrade from 0.9.39 -> 0.9.40: by jm.lopez

  • #147: core: ruamel.yaml upgrade to 0.16.5: by jm.lopez

  • #148: core: Pygments upgrade to 2.4.2: by jm.lopez

  • #149: core: click-plugins upgrade to 1.1.1: by jm.lopez

  • #151: core: update Configuration.get_images attribute methods: by jm.lopez

  • #152: core: autocompletion improvements: by jm.lopez

  • #154: ci: check-in version and git SHA on VSS API: by jm.lopez

Bug Fixes:

  • #143: core: config.get_folder_by_name_or_moref_path cannot find folder: by jm.lopez

  • #150: core: autocompletion not populating all folders: by jm.lopez

New Features:

  • #153: compute vm set: Add a --wait flag to commands which generate requests: by jm.lopez

  • #153: compute vm mk: Add a --wait flag to commands which generate requests: by jm.lopez

  • #153: compute folder set: Add a --wait flag to commands which generate requests: by jm.lopez

  • #153: compute inventory mk: Add a --wait flag to commands which generate requests: by jm.lopez


Remember, VSS-CLI documentation is now available in VSS-CLI and the full Change Log is available here.

Upgrade or install PyVSS as follows:

# using vss-cli
vss-cli upgrade stable

# upgrade with pip
pip install vss-cli --upgrade

# install
pip install vss-cli 

For more information, please refer to the official documentation site.