问题
I was trying to get the details of dedicated servers by using slcli(version 5.4.4)
and getting following error "SoftLayerAPIError(SoftLayer_Exception_Order_Item_Invalid): Invalid price 64 GB (Dedicated Host) (200375) provided on the order container. Please select a dedicated instance RAM price to order a dedicated instance."
command which I tried
slcli order place --verify --billing hourly CLOUD_SERVER DALLAS13 \ RAM_64_UNIT_DEDICATED \ REBOOT_REMOTE_CONSOLE \ 1_GBPS_PRIVATE_NETWORK_UPLINKS_DEDICATED_HOSTS \ BANDWIDTH_0_GB_2 \ 1_IP_ADDRESS \ GUEST_DISK_100_GB_LOCAL_DEDICATED_HOST \ GUEST_DISK_100_GB_LOCAL_DEDICATED_DISK1 \ GUEST_CORE_16_DEDICATED \ OS_UBUNTU_16_04_LTS_XENIAL_XERUS_MINIMAL_64_BIT_FOR_VSI \ MONITORING_HOST_PING \ NOTIFICATION_EMAIL_AND_TICKET \ AUTOMATED_NOTIFICATION \ UNLIMITED_SSL_VPN_USERS_1_PPTP_VPN_USER_PER_ACCOUNT \ NESSUS_VULNERABILITY_ASSESSMENT_REPORTING \ --extras '{"virtualGuests": [{"hostname": "test", "domain": "softlayer.com"}]}' \ --complex-type SoftLayer_Container_Product_Order_Virtual_Guest
回答1:
You got that error because you did not select a Dedicated Host server where your virtual guest will be hosted.
You have to add the hostId in the option extras in front of the object "virtualGuests" the same as this example:
--extras '{"hostId": 12345, "virtualGuests": [{"hostname": "test", "domain": "softlayer.com"}]}'
You can use this slcli command to get the dedicated host available in your account:
slcli dedicatedhost list
来源:https://stackoverflow.com/questions/50372654/getting-error-while-creating-dedicated-vsi-from-softlayer-slcli