Blog from August, 2021

VSS-CLI v2021.8.0 is available for download via PyPI or GitLab. Latest version includes the following improvements and bug fixes:

Improvements

compute vm mk: new --template option  (#453)

Commands:

  • compute vm mk shell
  • compute vm mk from-template
  • compute vm mk from-spec
  • compute vm mk from-clone 
  • compute vm mk from-clib

A new --template sets the resulting virtual machine as template. For instance, to duplicate a virtual machine template with a minimal modification:

vss-cli compute vm mk from-template \ 
--source my-template --template \
--description 'slightly modified template' \
--client EIS --os ubuntu64Guest --folder group-v2658 -n PUBLIC \
--disk '{"capacity_gb": 20, "scsi": 0}' --disk '{"capacity_gb": 1024, "scsi": 1}' \
--scsi '{"type": "lsilogic", "bus": 0}' --scsi '{"type": "paravirtual", "bus": 1}' \
my-new-template

compute vm mk: new --cores-per-socket option  (#454)

Commands:

  • compute vm mk shell
  • compute vm mk from-template
  • compute vm mk from-spec
  • compute vm mk from-clone 
  • compute vm mk from-clib

The --cores-per-socket option allows to define an advanced CPU configuration for a new virtual machine. To calculate virtual machine CPU sockets, divide the number of CPUs by the number of cores per socket.

Refer to the Setting the number of cores per CPU in a virtual machine (1010184) KB article for further details and per operating system limitations.

Creating a virtual machine with 8 CPUs in 2 CPU sockets, the --cores-per-socket value should be 4 as follows:

vss-cli compute vm mk shell \ 
--description 'new virtual machine' \
--cpu 8 --cores-per-socket 4 \
--client EIS --os ubuntu64Guest --folder group-v2658 -n PUBLIC \
--disk '{"capacity_gb": 20, "scsi": 0}' --disk '{"capacity_gb": 1024, "scsi": 1}' \
--scsi '{"type": "lsilogic", "bus": 0}' --scsi '{"type": "paravirtual", "bus": 1}' \
my-new-vm

compute vm set cpu count: --cores-per-socket option  (#455)

To update an existing VM, use the command compute vm set <id> set cpu count --cores-per-socket. For example:

compute vm set vm-3457 cpu count --cores-per-socket 4 8

To update cores per socket configuration the virtual machine must be powered off.


core: update pyvss from v2021.6.8 to v2021.8.0 (#456)

Bug Fixes

compute vm set controller scsi rm: missing verb in removal confirmation (#452)

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 

# 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 v2021.8.0 with the following improvements and bug fixes:

Improvements

VM/CPU advanced configuration: cores_per_socket. (#1691)

Endpoints

  • /v2/vm (POST)
  •  /v2/vm/<id>/cpu (PUT)
  •  /v2/vm/<id>/spec (GET)

Description

Allows the user to set advanced configuration for CPUs by setting cores_per_socket in the virtual machine creation payload.

POST /vm
curl -X POST https://vss-api.eis.utoronto.ca/v2/vm -H "Authorization: Bearer $TK" -d '{"os": "centos7_64Guest", "built_from": "os_install", "client": "EIS", "cpu": {"count": 4, "cores_per_socket": 2}, "memory": 1, "usage": "Test", "description": "new release vm deployment, "folder": "group-v2658", "networks": [{"network": "dvportgroup-1111", "type": "vmxnet3"}], "disks": [{"capacity_gb": 20, "scsi": 0}, {"capacity_gb": 100, "scsi": 1}], "power_on": true, "template": false, "name": "vm-0231", "vss_service": 1}'

Also, provides the cpu configuration in the /v2/vm/<id>/spec resource:

GET /vm/<id>/spec
{
  "built": "os_install",
  "machine": {
    "name": "vm-0231",
    "os": "CentOS 7 (64-bit)",
    "cpu": {
      "cores_per_socket": 2,
      "count": 4
    },
    "memory": 1,
    "folder": "VSS > Sandbox > jm > Folder12",
    "disks": [
      {
        "backing_mode": "persistent",
        "backing_sharing": "sharingnone",
        "capacity_gb": 20,
        "scsi": 0
      },
      {
        "backing_mode": "persistent",
        "backing_sharing": "sharingnone",
        "capacity_gb": 100,
        "scsi": 1
      }
    ],
    "iso": "CentOS"
  },
  "networking": {
    "interfaces": [
      {
        "network": "VL-1111-NET",
        "type": "vmxnet3"
      }
    ]
  },
  "metadata": {
    "client": "EIS",
    "description": "content library deployment",
    "usage": "Test",
    "inform": [
      "jm(at)eis.utoronto.ca"
    ],
    "admin": {
      "name": "Jose Manuel Lopez Lujan",
      "email": "jm(at)eis.utoronto.ca",
      "phone": "647-000-0000"
    },
    "vss_service": "",
    "vss_options": []
  }
}

If the virtual machine requires to update an existing cpu value, the payload now supports the following format but also supports a simpler payload if there's no need to set the cores_per_socket value:

curl -X POST https://vss-api.eis.utoronto.ca/v2/vm/vm-1234 -H "Authorization: Bearer $TK" -d '{"value": {"count": 4, "cores_per_socket": 2}}'
curl -X POST https://vss-api.eis.utoronto.ca/v2/vm/vm-1234 -H "Authorization: Bearer $TK" -d '{"value": 4}'


VM/Clone and deploy to mark resulting vm as template. (#1692)

Endpoints

  • /v2/vm (POST)

Description

The improvement allows to convert a resulting virtual machine into template by adding the template attribute in the new vm request payload:

POST /v2/vm
curl -X POST https://vss-api.eis.utoronto.ca/v2/vm -H "Authorization: Bearer $TK" -d '{"os": "centos7_64Guest", "built_from": "os_install", "client": "EIS", "cpu": {"count": 4, "cores_per_socket": 2}, "memory": 1, "usage": "Test", "description": "new release vm deployment, "folder": "group-v2658", "networks": [{"network": "dvportgroup-1111", "type": "vmxnet3"}], "disks": [{"capacity_gb": 20, "scsi": 0}, {"capacity_gb": 100, "scsi": 1}], "power_on": false, "template": true, "name": "vm-0231", "vss_service": 1}'

Sync/VM add cores_per_socket to local db object. (#1693)

Endpoints

  • /v2/vm (GET)

Description

The cores_per_socket attribute is now available in the main virtual machine resource as follows:

GET /v2/vm?filter=cores_per_socket,eq,1
...
      "cores_per_socket": 1,
      "cpu_count": 1,
...

 Inventory/Add coresPerSocket as new property. (#1694)

Endpoints

  • /v2/inventory (POST)
  • /inventory/options (GET)

Description

The coresPerSocket inventory property is now available to be included in the reports:

curl -X POST https://vss-api.eis.utoronto.ca/v2/inventory -H $TK -d '{"properties": ["cpu", "coresPerSocket"]}'