|
|
### Get VM template
|
|
|
|
|
|
Before starting an evaluation you need to get an appropriate VM template that
|
|
|
contains the required Cloudiator IDs. You get suitable VM template via the
|
|
|
Mowgli framework.
|
|
|
|
|
|
##### Web interface
|
|
|
|
|
|
1. Open in your browser: http://MOWGLi_HOST:8282/#/default/templateVmGet call.
|
|
|
2. Click *Try Out*.
|
|
|
3. Fill the parameters. Hereby you need to provide constraints that actually match to an existing flavor in your cloud, e.g.
|
|
|
```
|
|
|
cloud: 1 (use the id of the registered cloud, probabely 1 if only one cloud is registered)
|
|
|
location: NAME_OF_AN_EXISTING_AVAILABILITY_ZONE
|
|
|
imageDistribution: UBUNTU
|
|
|
imageVersion: 16
|
|
|
cores: 2
|
|
|
memory: 4096
|
|
|
disk: 70
|
|
|
```
|
|
|
4. Click *Execute*.
|
|
|
5. The following response shows a list of exemplary results:
|
|
|
```
|
|
|
[
|
|
|
{
|
|
|
"resourceType": "VM",
|
|
|
"idCloud": 1,
|
|
|
"idImage": 58,
|
|
|
"idHardware": 107,
|
|
|
"idLocation": 121
|
|
|
},
|
|
|
{
|
|
|
"resourceType": "VM",
|
|
|
"idCloud": 1,
|
|
|
"idImage": 85,
|
|
|
"idHardware": 107,
|
|
|
"idLocation": 121
|
|
|
}
|
|
|
]
|
|
|
```
|
|
|
|
|
|
##### Shell
|
|
|
|
|
|
|
|
|
1. Use the following call, change the first 8 lines according to your cloud.
|
|
|
```
|
|
|
CLOUD=1
|
|
|
LOCATION=blade
|
|
|
IMAGEDISTRIBUTION=UBUNTU
|
|
|
IMAGEVERSION=16
|
|
|
CORES=2
|
|
|
MEMORY=4096
|
|
|
DISK=30
|
|
|
MOWGLI_IP=x.x.x.x
|
|
|
```
|
|
|
|
|
|
|
|
|
curl -X GET "http://$MOWGLI_IP:8282/v1/template/vm?cloud=$CLOUD&location=$LOCATION&imageDistribution=$IMAGEDISTRIBUTION&imageVersion=$IMAGEVERSION&cores=$CORES&memory=$MEMORY&disk=$DISK" -H "accept: application/json" | jq
|
|
|
2. The output are the suitable VM templates:
|
|
|
```
|
|
|
[
|
|
|
{
|
|
|
"resourceType": "VM",
|
|
|
"idCloud": 1,
|
|
|
"idImage": 67,
|
|
|
"idHardware": 112,
|
|
|
"idLocation": 122
|
|
|
},
|
|
|
{
|
|
|
"resourceType": "VM",
|
|
|
"idCloud": 1,
|
|
|
"idImage": 97,
|
|
|
"idHardware": 112,
|
|
|
"idLocation": 122
|
|
|
}
|
|
|
]
|
|
|
```
|
|
|
|
|
|
##### Issues with the VM template
|
|
|
|
|
|
Cloudiator stores the EC2 t2.medium instance with 1 instead of the actual 2 cores. In addition, disk sizes are only collected for the (expensive) instances with dedicated disk.
|
|
|
|
|
|
Therefore for EC2 instances leave the disk requirement empty and the VMs will be created with the disk size of the created custom image. E.g. to select the t2.medium instance you need to specify the resource requirements as follows:
|
|
|
|
|
|
```
|
|
|
cloud: 1 (EC2 cloud id)
|
|
|
location: NAME_OF_AN_EXISTING_AVAILABILITY_ZONE
|
|
|
imageDistribution: UBUNTU
|
|
|
imageVersion: 16
|
|
|
cores: 1
|
|
|
memory: 4096
|
|
|
disk:
|
|
|
```
|
|
|
|
|
|
In case you did not get any matching VM templates you can check the supported
|
|
|
locations via http://MOWGLi_HOST:8282/#/default/templateLocationGet, images via http://MOWGLi_HOST:8282/#/default/templateImageGet and hardware flavors via http://MOWGLi_HOST:8282/#/default/templateHardwareGet
|
|
|
|
|
|
In case you do not get any templates the cloud credentials might be wrong and you want to check [troubleshooting](#### Logging). |