Versions Compared

Key

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

...

ResourceURIDescriptionGETPOSTPUTDELETEOPTIONS*
Virtual Machine/vm/Virtual Machine management resource. Read, update, delete, create virtual machines.(tick)(tick)(tick)(tick)(tick)
Note
titleOPTIONS HTTP method

Remember, you can also show what methods are allowed and method description, parameters, etc. by making a GET HTTP request to https://vss-api.eis.utoronto.ca:8001/v2/vm/.

Code Block
http OPTIONS "https://vss-api.eis.utoronto.ca:8001/v2/vm/"
curl -X OPTIONS "https://vss-api.eis.utoronto.ca:8001/v2/vm/" 

...

 

Code Block
languagebash
themeDJango
 http -a $TK GET "https://vss-api.eis.utoronto.ca:8001/v2/vm/5012bd15-c20c-a971-aa68-af1a3cf3d0db/"

HTTP response data would look something like:

Code Block
languagepy
themeDJango
titleResponse
collapsetrue
{
    "_links": {
        ....
    }, 
    "data": {
        "config": {
            "bootDelayMs": 5000, 
            "hotaddCpu": true, 
            "hotaddMem": true, 
            "hotremoveCpu": false
        }, 
        "folder": {
            "name": "jm", 
            "parent": "Sandbox", 
            "path": "Public > 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-123-123: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"
    }
}
 
Note

Links list have been removed from the VM info section due to its size, however, in the next section we'll describe every single sub resource.

Create Virtual Machine

To create a new Virtual Machine, send a POST request to /v2/vm/. The attribute values that must be set to successfully create a Virtual Machine are marked with a (tick) in the following table:

AttributeDescriptionTypeRef URIOptionsDefaultRequired
admin_emailAdministrator's emailstring--User's email number submitting the request 
admin_nameAdministrator's namestring--User's name number submitting the request 
admin_phoneAdministrator's phone numberstring--User's phone number submitting the request 
bill_deptBilling Departmentstring---(tick)
built_fromBuild processstring-

os_install

template

clone

-(tick)
cpuCPU countinteger--1 
descriptionShort description of the service or applicationstring---(tick)
disksDisks in GB --40 
domainFault domain Managed Object Identifier (moId) to create VM onstring/v2/domain/-Fualt Domain 3 
folderManaged Object Identifier (moId) formatstring/v2/folder/--(tick)
informInformational comma separated emailsstring--User's email number submitting the request 
isoISO image path to be mounted after creationstring--None 
memoryMemory in GBinteger--1 
nameHuman readable namestring--Randomly generated 
networksNetwork Managed Object Identifier (moId)string--Unaccessible VLAN 
os

Guest operating system id

string/v2/os/--(tick)
usageVirtual Machine usage.string-

Prod

Test

QA

Dev

Test 
source_vmTemplate or Virtual Machine Uuidstring

/v2/vm/

/v2/template/

--

(tick) only with

template/clone