Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
themeEmacsDJango
titlehttp -a $TK GET https://vss-api.eis.utoronto.ca:8001/v2/vm/
collapsetrue
HTTP/1.0{
200 OK Allow: HEAD, POST, OPTIONS, GET
Content-Length: 14498
Content-Type: application/json
Date: Mon, 25 Apr 2016 20:50:35 GMT
Server: Werkzeug/0.11.3 Python/2.7.10
X-RateLimit-Limit: 7200
X-RateLimit-Remaining: 7171
X-RateLimit-Reset: 1461618000
{ "_links": {
        "api": "https://vss-api.eis.utoronto.ca:8001/v2/", 
        "_linksself": {
        "api": "https://vss-api.eis.utoronto.ca:8001/v2/", 
        "self": "https://"https://vss-api.eis.utoronto.ca:8001/v2/vm/"
    }, 
    "data": [
        {
            "_links": {
                "self": "http://localhost:5000/v2/vm/50125944-d5e0-248d-0f3c-c499acbeb1ce/"
            }, 
            "cpuCount": 2, 
            "folder": {
                "_links": {
                    "self": "http://localhost:5000/v2/folder/group-v6557"
                }, 
                "moref": "group-v6557", 
                "name": "Swarm", 
                "parent": "Sandbox"
            }, 
            "guestFullName": "Other 3.x Linux (64-bit)", 
            "ipAddress": "128.100.22872.721", 
            "memoryMB": 2048, 
            "name": "1604P-docker-node2", 
            "overallStatus": "green", 
            "powerState": "poweredOn", 
            "provisionedGB": 22, 
            "uuid": "50125944-d5e0-248d-0f3c-c499acbeb1ce"
        }
    ], 
    "meta": {
        "count": 22, 
        "time": "1.04441s", 
        "user": "jm"
    }
}

...

Code Block
languagebash
themeEmacsDJango
http -a $TK GET https://vss-api.eis.utoronto.ca:8001/v2/vm/?name=Test
http -a $TK GET https://vss-api.eis.utoronto.ca:8001/v2/vm/?ip=10.2.1.2
http -a $TK GET https://vss-api.eis.utoronto.ca:8001/v2/vm/?dns=wiki.eis.utoronto.ca

...

Code Block
languagebash
themeEmacsDJango
titlehttp -a $TK GET https://vss-api.eis.utoronto.ca:8001/v2/vm/?name=Test&summary
collapsetrue
http -a $TK GET {
    "_links": {
        "api": "https://vss-api.eis.utoronto.ca:8001/v2/vm/?name=Test&summary", 
HTTP/1.0 200 OK Allow: HEAD, POST, OPTIONS, GET
Content-Length: 414
Content-Type: application/json
Date: Tue, 26 Apr 2016 01:36:41 GMT
Server: Werkzeug/0.11.3 Python/2.7.10
X-RateLimit-Limit: 7200
X-RateLimit-Remaining: 7196
X-RateLimit-Reset: 1461636000
{ "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/"
    }, 
    "data": [
        {
            "_links": {
        "api        "self": "https://vss-api.eis.utoronto.ca:8001/v2/", 
/vm/5012bd15-c20c-a971-aa68-af1a3cf3d0db/"
       "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/"     }, 
    "data": [       "name":  {"1604Q-VMTest_1", 
            "_linksuuid": {
                "self": "https://vss-api.eis.utoronto.ca:8001/v2/vm/"5012bd15-c20c-a971-aa68-af1a3cf3d0db/"
        }
    }], 
    "meta": {
        "namecount": "1604Q-VMTest_1",  
           "uuidtime": "5012bd15-c20c-a971-aa68-af1a3cf3d0db"
        }1.86220s", 
   ],      "metauser": {
        "count": 1,"jm"
          "time": "1.86220s", 
        "user": "jm"
    }
}}
}
Note

From now on, you will need the UUID of any virtual machine, provided by the "_links" section, to get further information about it and eventually to modify properties.

...

NameTypeDescription
uuidstringVirtualCenter-specific 128-bit UUID of a virtual machine, represented as a hexademical string. This identifier is used by VirtualCenter to uniquely identify all virtual machine instances, including those that may share the same SMBIOS UUID.
namestringVirtual Machine name including VSS prefix.
ConfigVM Configuration
bootdelayintegerDelay in milliseconds before starting the boot sequence. The boot delay specifies a time interval between virtual machine power on or restart and the beginning of the boot sequence.
hotaddCPUbooleanWhether virtual processors can be added while this virtual machine is running.
hotremoveCpubooleanWhether virtual processors can be removed while this virtual machine is running.
hotaddMembooleanWhether memory can be added while this virtual machine is running.
FolderLogical Folder
namestringImmediate folder holding VM
parentstringParent folder holding the VM
pathstringFull path to immediate folder
GuestGuest status and configuration
guestFullNamestringThis is the full name of the guest operating system for the virtual machine. For example: Windows 2000 Professional.
guestIdstringGuest operating system configured on a virtual machine.
hostNamestringHostname of the guest operating system, if known.
ipAddressstringPrimary IP address assigned to the guest operating system, if known.
toolsStatusstringCurrent running status of VMware Tools in the guest operating system, if known.
toolsVersionstringCurrent version status of VMware Tools in the guest operating system, if known.
Hardware 
cpuCountintegerNumber of processors in the virtual machine. 
coresPerSocketintegerNumber of cores used to distribute virtual CPUs among sockets in this virtual machine. If the value is unset it implies to numCoresPerSocket = 1.
memoryMBintegerMemory size of the virtual machine, in megabytes.
numEthernetCardsintegerNumber of virtual network adapters. 
numVirtualDisksintegerNumber of virtual disks attached to the virtual machine. 
devicesstringList of strings holding controllers, cd/dvd, disks and nics configured in the VM
versionstringThe version string for this virtual machine.
StorageStorage summary
provisionedGBinteger

Sum of Committed and Uncommitted storage.

uncommittedGBintegerAdditional storage space, in bytes, potentially used by this virtual machine on all datastores.
committedGBintegerTotal storage space, in bytes, committed to this virtual machine across all datastores.
unsharedGBintegerTotal storage space, in bytes, occupied by the virtual machine across all datastores, that is not shared with any other virtual machine.
StatusRuntime status related attributes
overallStatusstringOverall alarm status on this node.
powerStatestringThe current power state of the virtual machine.
alarmsbooleanWhether the VM has triggered alarms.
bootTimeStringThe timestamp when the virtual machine was most recently powered on.
VSSVSS Management tags
AdminstringVM admin responsible of this VM.
InformstringInformational contacts to be notified.
Requestedstring

The timestamp when the virtual machine was requested.

ClientstringCustom client key-value notes.

 

 

Code Block
languagepy
themeDJango
title http -a $TK GET https://vss-api.eis.utoronto.ca:8001/v2/vm/5012bd15-c20c-a971-aa68-af1a3cf3d0db/
collapsetrue
{
    "_links": {
        ....
    }, 
    "data": {
        "config": {
            "bootDelayMs": 5000, 
            "hotaddCpu": true, 
            "hotaddMem": true, 
            "hotremoveCpu": false
        }, 
        "folder": {
            "name": "jm", 
            "parent": "VSS", 
            "path": "VSS > Sandbox > jm"
        }, 
        "guest": {
            "guestFullName": "Ubuntu Linux (64-bit)", 
            "guestId": "ubuntu64Guest", 
            "hostName": null, 
            "ipAddress": null, 
            "toolsStatus": "guestToolsNotInstalled", 
            "toolsVersion": null
        }, 
        "hardware": {
            "coresPerSocket": 1, 
            "cpuCount": 2, 
            "devices": {
                "cds": [], 
                "controllers": [
                    "IDE 0;IDE 0", 
                    "IDE 1;IDE 1", 
                    "SCSI controller 0;LSI Logic"
                ], 
                "disks": [
                    "Hard disk 1;Thin;4GB", 
                    "Hard disk 2;Thin;2GB", 
                    "Hard disk 3;Thin;1GB"
                ], 
                "nics": [
                    "Network adapter 1;Unused_Or_Quarantine_Veth;00:50:56:92:2b:bd", 
                    "Network adapter 2;VL-1102-UTCS;00:50:56:92:11:38"
                ]
            }, 
            "memoryMB": 2048, 
            "numEthernetCards": 2, 
            "numVirtualDisks": 3, 
            "version": "vmx-10"
        }, 
        "name": "1604Q-VMTest_1", 
        "networks": [
            "Unused_Or_Quarantine_Veth", 
            "VL-1102-UTCS"
        ], 
        "snapshot": false, 
        "status": {
            "alarms": false, 
            "bootTime": "", 
            "overallStatus": "green", 
            "powerState": "poweredOff"
        }, 
        "storage": {
            "committedGB": 0, 
            "provisionedGB": 9, 
            "uncommittedGB": 9, 
            "unsharedGB": 0
        }, 
        "uuid": "5012bd15-c20c-a971-aa68-af1a3cf3d0db", 
        "vss": {
            "admin": "JM Lopez:416-577-7061:jm@eis.utoronto.ca", 
            "client": "EIS", 
            "inform": "jm@eis.utoronto.ca", 
            "requested": "2016-04-01 10:38:07"
        }
    }, 
    "meta": {
        "count": 11, 
        "time": "0.48864s", 
        "user": "jm"
    }
}