简体   繁体   中英

Requesting SoftLayer VM with Python API Unable to Find Price for Block Device 3

I am trying to request a SoftLayer VM with the Python API, but I am getting an error when the vsi includes 3 disks.

Error:

SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(SoftLayer_Exception_NotFound): Unable to find a price for block device 3.

Here is the vsi:

new_vsi = {
        'domain': domain,
        'hostname': hostname + str(n),
        'datacenter': datacenter,
        'dedicated': False,
        'private': False,
        'cpus': number_of_cpus,
        'os_code' : u'UBUNTU_LATEST_64', 
        'hourly': is_hourly_billed,
        'disks': ['100','200', '100'],
        'local_disk': True,
        'memory': 16384,
        'private_vlan': privatevlan,
        'public_vlan': publicvlan,
        'nic_speed':1000
}

If I only have two disks in the list there won't be any errors, but if I add a third disk to the list I will get the above error. I have tried various values for the third disk, including: 25, 100, 150, 200, and 300.

该错误是因为您的配置'local_disk': True,设备3(或磁盘3)仅可用于专用主机或非本地磁盘,如果将其更改为'local_disk': False ,它应该可以工作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM