...
Resource | URI | Description | GET | POST | PUT | DELETE | OPTIONS* |
---|---|---|---|---|---|---|---|
Virtual Machine | /vm/ | Virtual Machine management resource. Read, update, delete, create virtual machines. |
Note | ||
---|---|---|
| ||
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 -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 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "_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 in the following table:
Attribute | Description | Type | Ref URI | Options | Default | Required |
---|---|---|---|---|---|---|
admin_email | Administrator's email | string | - | - | User's email number submitting the request | |
admin_name | Administrator's name | string | - | - | User's name number submitting the request | |
admin_phone | Administrator's phone number | string | - | - | User's phone number submitting the request | |
bill_dept | Billing Department | string | - | - | - | |
built_from | Build process | string | - | os_install template clone | - | |
cpu | CPU count | integer | - | - | 1 | |
description | Short description of the service or application | string | - | - | - | |
disks | Disks in GB | - | - | 40 | ||
domain | Fault domain Managed Object Identifier (moId) to create VM on | string | /v2/domain/ | - | Fualt Domain 3 | |
folder | Managed Object Identifier (moId) format | string | /v2/folder/ | - | - | |
inform | Informational comma separated emails | string | - | - | User's email number submitting the request | |
iso | ISO image path to be mounted after creation | string | - | - | None | |
memory | Memory in GB | integer | - | - | 1 | |
name | Human readable name | string | - | - | Randomly generated | |
networks | Network Managed Object Identifier (moId) | string | - | - | Unaccessible VLAN | |
os | Guest operating system id | string | /v2/os/ | - | - | |
usage | Virtual Machine usage. | string | - | Prod Test QA Dev | Test | |
source_vm | Template or Virtual Machine Uuid | string | /v2/vm/ /v2/template/ | - | - | only with template/clone |