Search code examples
ibm-cloud-infrastructure

Create a VSI within specific vlan and subnet using slcli


Hi guys I'm trying to create a VSI using slcli and I have to restore an IMAGE and put this VSI within a specific private vlan. Does anyone know the correct parameter I have to use in the slcli command? Here is an example of my command: slcli order place --verify --billing hourly SUSPEND_CLOUD_SERVER SAOPAULO --preset B1_2x8x100 BANDWIDTH_0_GB_2 1_GBPS_PRIVATE_NETWORK_UPLINK 1_IP_ADDRESS MONITORING_HOST_PING NOTIFICATION_EMAIL_AND_TICKET AUTOMATED_NOTIFICATION UNLIMITED_SSL_VPN_USERS_1_PPTP_VPN_USER_PER_ACCOUNT NESSUS_VULNERABILITY_ASSESSMENT_REPORTING REBOOT_REMOTE_CONSOLE --extras '{"virtualGuests": [{"hostname": "TESTE123", "domain": "xpto.com"}], "imageTemplateId": 1234567 }' --complex-type SoftLayer_Container_Product_Order_Virtual_Guest


Solution

  • You need to add the property primaryBackendNetworkComponent to specify the private vlan, and primaryNetworkComponent if you want to specify the public vlan

    Try with the following:

    slcli order place --verify --billing hourly SUSPEND_CLOUD_SERVER SAOPAULO --preset B1_2x8x100 BANDWIDTH_0_GB_2 1_GBPS_PRIVATE_NETWORK_UPLINK 1_IP_ADDRESS MONITORING_HOST_PING NOTIFICATION_EMAIL_AND_TICKET AUTOMATED_NOTIFICATION UNLIMITED_SSL_VPN_USERS_1_PPTP_VPN_USER_PER_ACCOUNT NESSUS_VULNERABILITY_ASSESSMENT_REPORTING REBOOT_REMOTE_CONSOLE --extras '{"virtualGuests": [{"hostname": "TESTE123", "domain": "xpto.com","primaryBackendNetworkComponent":{"networkVlan":{"id":1133322}}}], "imageTemplateId": 1234567 }' --complex-type SoftLayer_Container_Product_Order_Virtual_Guest

    Some useful links:

    SoftLayer API: Order Virtual Server with specific VLAN

    Create a SoftLayer virtual guest on a specific subnet