首页 文章

Softlayer Python API无法以1 Gbps的网络速度订购虚拟机

提问于
浏览
1

我在尝试使用Softlayer Python API订购虚拟机时遇到此异常 .

SoftLayer.exceptions.SoftLayerAPIError: SoftLayerAPIError(SoftLayer_Exception_Public): 1 Gbps Public & Private Network Uplinks must be ordered with permission Add Compute with Public Network Port.

这是VSI:

client = SoftLayer.Client(username=softlayerusername, api_key=softlayerapikey)
manager = SoftLayer.VSManager(client)
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','25'],
        'local_disk': True,
        'memory': 16384,
        'private_vlan': privatevlan,
        'public_vlan': publicvlan,
        'nic_speed':1000
    }
vsi = manager.create_instance(**new_vsi)

我可以看到错误与nic_speed设置为1000有关,但我不知道“有权许可订购......”意味着什么,以及如何实现这一点 . 这是在私人Softlayer帐户上,VLAN上还有其他机器的网络速度大于1 Gbps

1 回答

  • 0

    似乎错误是因为您的帐户不允许具有公共网络端口的新VM,因此我建议您将值 'private': False 更改为 'private': True ,然后重试

相关问题