使用第二个磁盘创建vGPU设备 [英] Creating a vGPU device with second disk
问题描述
感谢上一个问题(创建和识别vGPU设备),我知道,要使用GPU创建新的VSI,我可以使用此rest api:
Thanks for the previous asked question(Creating and recognition of a vGPU device), I know that, to create a new VSI using GPU, I can use this rest api:
https://[用户名] :[apiKey] @ api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/createObject
带有有效负载json字符串.
With payload json string.
我的问题是,如果在创建vgpu设备时需要第二张磁盘,该如何将该信息添加到上述有效负载json字符串中呢?
My question is, what if I need a second disk when creating a vgpu device, how to add that information into the above payload json string?
推荐答案
要添加第二个磁盘,您需要在有效负载json中添加属性"blockDevices",您可以在其中放置磁盘的大小.
To add second disks, you need to add the attribute ¨blockDevices¨ into the payload json, where you can put the size of the disk.
创建新VSI的GPU选项为"AC"和"ACL".
The GPU option to create a new VSI are ¨AC¨ and ¨ACL¨
•对于GPU"AC",磁盘的大小从10 GB到2.00 TB(SAN),并且属性"localDiskFlag"必须为"false",因为磁盘是SAN.
• For the GPU ¨AC¨ the size of the disks are from 10 GB to 2.00 TB (SAN) and the attribute ¨localDiskFlag¨ must be ¨false¨ because the disk is SAN.
•GPU"ACL"具有2个选项:
• The the GPU ¨ ACL¨ has to 2 options:
"ACL1_8X60X100",其中第二个和第三个磁盘的大小仅为300 GB(本地).
"ACL1_8X60X100", where the second and third disk has only the size 300 GB (LOCAL).
"ACL1_16X120X100",其中第二个和第三个磁盘的大小仅为600 GB(本地).
"ACL1_16X120X100", where the second and third disk has only the size 600 GB (LOCAL).
属性"localDiskFlag"必须为"true",因为磁盘是本地的.
The attribute ¨localDiskFlag¨ must be "true" because the disk is LOCAL.
您可以使用此rest api示例通过GPU的"AC"选项创建VSI:
You can use this rest api example to create a VSI with the GPU ¨AC¨ option:
方法:开机自检
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/createObject
身体:杰森
{
"parameters": [
{
"hostname": "test",
"domain": "test.local",
"datacenter": {
"name": "dal13"
},
"hourlyBillingFlag": "true",
"localDiskFlag": false,
"operatingSystemReferenceCode": "CENTOS_7_64",
"supplementalCreateObjectOptions": {
"flavorKeyName": "AC1_8X60X25"
},
"blockDevices": [
{
"device": "2",
"diskImage": {
"capacity": 50
}
}
]
}
]
}
要使用GPU"ACL"选项创建另一个VSI,您可以使用其他rest api示例来更改上述值:
To create another VSI with the GPU ¨ACL¨ option, you can use this other rest api example changing the values mentioned above:
{
"parameters": [
{
"hostname": "test",
"domain": "test.local",
"datacenter": {
"name": "dal13"
},
"hourlyBillingFlag": "true",
"localDiskFlag": true,
"operatingSystemReferenceCode": "CENTOS_7_64",
"supplementalCreateObjectOptions": {
"flavorKeyName": "ACL1_8X60X100"
},
"blockDevices": [
{
"device": "2",
"diskImage": {
"capacity": 300
}
}
]
}
]
}
这篇关于使用第二个磁盘创建vGPU设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!