Documentation Index

Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt

Use this file to discover all available pages before exploring further.

createServerInstances

Prev Next

Available in VPC

Create a server instance (VM).

Syntax

The createServerInstances syntax is as follows:

./ncloud vserver createServerInstances \
    --vpcNo <vpc-no> \
    --subnetNo <subnet-no> \
    --networkInterfaceList <network-interface-config> \
    --memberServerImageInstanceNo <member-image-no> | --serverImageNo <image-no> | --serverImageProductCode <image-product-code> \
    [--serverSpecCode <server-spec-code>] \
    [--serverProductCode <server-product-code>] \
    [--raidTypeName <raid-type-name>] \
    [--blockDevicePartitionList <block-device-partition-config>] \
    [--blockStorageMappingList <block-storage-mapping-config>] \
    [--isEncryptedBaseBlockStorageVolume <true|false>] \
    [--feeSystemTypeCode <MTRAT|FXSUM>] \
    [--serverCreateCount <count>] \
    [--serverCreateStartNo <start-no>] \
    [--serverName <server-name>] \
    [--placementGroupNo <placement-group-no>] \
    [--isProtectServerTermination <true|false>] \
    [--serverDescription <description>] \
    [--initScriptNo <init-script-no>] \
    [--loginKeyName <login-key-name>] \
    [--associateWithPublicIp <true|false>] \
    [--fabricClusterPoolNo <fabric-cluster-pool-no>] \
    [--isPreInstallGpuDriver <true|false>] \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running createServerInstances.

Required options

The following options are required for createServerInstances.

Options Type Required Description
--vpcNo String Required VPC number
  • Set the VPC to create the server instance.
  • See getVpcList.
--subnetNo String Required Subnet number
--networkInterfaceList List Required List of network interfaces
  • For each network interface, enter {field=‘value’} pairs within quotation marks, separated by commas.
    • networkInterfaceOrder (required): Network interface order. 0-2 (Default network interface: 0). Up to 3 can be entered. Used as the basis for device naming (e.g., if the order is 2, the device name is eth2).
    • networkInterfaceNo (conditional): Network interface number. Required when adding a user-created network interface. See getNetworkInterfaceList.
    • subnetNo (conditional): Subnet number of the network interface. Required when creating a new network interface or entering networkInterfaceNo. Automatically assigned for the default network interface. See getSubnetList.
    • ip (optional): IP address of the network interface. If not entered, a valid IP address is automatically assigned sequentially. Can be set manually when creating a new network interface. Enter a value within the IP range of the subnet where the network interface is being created (IP addresses 0-5 and the last IP address of the subnet can't be used, and IP addresses within the subnet range must be unique).
    • accessControlGroupNoList (conditional): ACG number list of the network interface. Required when creating a new network interface. Up to 3 entries are allowed. See getAccessControlGroupList.
--memberServerImageInstanceNo String Conditional Server image instance number
  • Enter when creating a server with a user-generated server image.
  • At least one of the following is required: memberServerImageInstanceNo, serverImageNo, or serverImageProductCode.
  • See getMemberServerImageInstanceList.
--serverImageNo String Conditional Server image number
  • Enter when creating a server with a new server image (KVM, RHV, XEN).
  • At least one of the following is required: memberServerImageInstanceNo, serverImageNo, or serverImageProductCode.
  • See getServerImageList.
--serverImageProductCode String Conditional Server image product code
  • Enter when creating a server with a new server image (RHV, XEN).
  • At least one of the following is required: memberServerImageInstanceNo, serverImageNo, or serverImageProductCode.
  • See getServerImageProductList.
--serverSpecCode String Conditional Server spec code
  • Set the server specifications when using serverImageNo.
  • Default: Minimum specifications (in the order of memory, CPU, default block storage capacity, disk type (NET))
  • Can't be used at the same time with serverProductCode.
  • See getServerSpecList.
--raidTypeName String Conditional RAID type name
  • Required when creating a bare metal server.
  • See getRaidList.

Optional options

These are the optional options for createServerInstances. Options that are not specified will use their default values.

Options Type Required Description
--serverProductCode String Optional Server product code
  • Set the server specifications when using serverImageProductCode.
  • Default: Minimum specifications (in the order of memory, CPU, default block storage capacity, disk type (NET))
  • Can't be used at the same time with serverSpecCode.
  • See getServerSpecList.
  • --blockDevicePartitionList List Optional List of block device partitions
    • Applicable to bare metal servers. Partition features may not be supported depending on the server specifications.
    • For each partition, enter {field=‘value’} pairs within quotation marks, separated by commas.
      • mountPoint (optional): Mount point. Must start with the / (root) path (the first mount point must be entered as / (root)). Subpaths under / must start with a lowercase English letter and consist only of lowercase English letters and numbers. Path names currently used as system directories by the operating system can't be entered (e.g., /root, /bin, /dev)
      • partitionSize (optional): Partition capacity. 50 GB or more
    --blockStorageMappingList List Optional Block storage mapping list
    • For each storage, enter {field=‘value’} pairs within quotation marks, separated by commas.
      • order (required): Storage order. 0~20. One default storage (order=0) must be allocated, and up to 20 additional instances can be added (for a total of 21, including the default storage). Available only for KVM
      • snapshotInstanceNo (optional): Storage snapshot instance number. Enter when creating from a snapshot. Available only for KVM
      • blockStorageSize (optional): Storage size. Available only for KVM
      • blockStorageName (optional): Storage name. Available only for KVM
      • blockStorageVolumeTypeCode (optional): Storage volume type code. Available only for KVM. See getBlockStorageVolumeTypeList.
      • noBlockStorage (conditional): Whether to exclude storage. true (Excluded) | false (Not excluded, snapshotInstanceNo required). Default storage can't be used.
      • emptyBlockStorage (conditional) Whether to create new storage. true (Create) | false (Not create, snapshotInstanceNo required). Default storage can't be used.
    --isEncryptedBaseBlockStorageVolume Boolean Optional Whether to encrypt the default block storage volume
    • true | false (default)
      • true: Encrypted
      • false: Not encrypted
    • Can only be set on RHV server images.
    --feeSystemTypeCode String Optional Pricing plan type code
    • MTRAT (default) | FXSUM
      • MTRAT: Hourly pricing plan (pay-as-you-go plan)
      • FXSUM: Monthly pricing plan (flat rate plan)
    --serverCreateCount Integer Optional Number of created servers
    • 1-100 (default: 1)
    --serverCreateStartNo Integer Optional Server creation start number
    • 0-999 (default: 1)
    • Determine the start number of the serial number assigned to the server name when creating more than one server.
    • The sum of serverCreateStartNo and serverCreateCount can't exceed 1000.
    --serverName String Optional Server name
    • Auto-generated on no input
    • The string must start with a lowercase English letter and end with a lowercase English letter or a number.
    • Enter 3-30 characters using a combination of lowercase English letters, numbers, and the special character - (3-15 characters for a Windows Server).
    --placementGroupNo String Optional Physical placement group number
    --isProtectServerTermination Boolean Optional Termination protection status
    • Prevent accidental server termination.
    • true | false (default)
      • true: Protected
      • false: Not protected
    --serverDescription String Optional Server description (byte)
    • 0-1000
    --initScriptNo String Optional Init script number
    --loginKeyName String Optional Authentication key name
    --associateWithPublicIp Boolean Optional Whether to create and assign a new public IP
    • true | false (default)
      • true: Assign
      • false: Not assign
    • Assignment is completed when the server is created and goes into operation.
    • Available for a public subnet.
    • Available if serverCreateCount is 1.
    --fabricClusterPoolNo String Optional Fabric cluster pool number
    --isPreInstallGpuDriver Boolean Optional Whether to pre-install GPU driver
    • true | false (default)
      • true: Install
      • false: Not install

    Common options

    For information about the options common to all vserver subcommands, see Server (VPC) options.

    Examples

    If the server instance creation request is successful, the server instance's identification information and initial state are returned.

    Command

    The command example is as follows:

    ./ncloud vserver createServerInstances \
        --vpcNo 12345678 \
        --subnetNo 23456789 \
        --networkInterfaceList "networkInterfaceOrder='0', accessControlGroupNoList=['67890123']" \
        --serverImageProductCode SW.VSVR.OS.LNX64.ROCKY.0810.B050 \
        --serverProductCode SVR.VSVR.HICPU.C002.M004.NET.SSD.B050.G002 \
        --serverName test-server-01 \
        --loginKeyName test-server-instance-key-01 \
        --regionCode KR \
        --output json
    

    Output

    The output example is as follows:

    {
      "createServerInstancesResponse": {
        "totalRows": 1,
        "serverInstanceList": [
          {
            "serverInstanceNo": "34567890",
            "serverName": "test-server-01",
            "cpuCount": 2,
            "memorySize": 4294967296,
            "platformType": {
              "code": "LNX64",
              "codeName": "Linux 64 Bit"
            },
            "loginKeyName": "test-server-instance-key-01",
            "serverInstanceStatus": {
              "code": "INIT",
              "codeName": "Server INIT status"
            },
            "serverInstanceOperation": {
              "code": "NULL",
              "codeName": "Server NULL OP"
            },
            "serverInstanceStatusName": "init",
            "createDate": "2026-05-14T17:29:35+0900",
            "uptime": "2026-05-14T17:29:35+0900",
            "serverImageProductCode": "SW.VSVR.OS.LNX64.ROCKY.0810.B050",
            "serverProductCode": "SVR.VSVR.HICPU.C002.M004.NET.SSD.B050.G002",
            "isProtectServerTermination": false,
            "zoneCode": "KR-1",
            "regionCode": "KR",
            "vpcNo": "12345678",
            "subnetNo": "null",
            "networkInterfaceNoList": [],
            "serverInstanceType": {
              "code": "HICPU",
              "codeName": "High-CPU"
            },
            "baseBlockStorageDiskType": {
              "code": "NET",
              "codeName": "Network storage"
            },
            "baseBlockStorageDiskDetailType": {
              "code": "SSD",
              "codeName": "SSD"
            },
            "hypervisorType": {
              "code": "XEN",
              "codeName": "XEN"
            },
            "serverImageNo": "45678901",
            "serverSpecCode": "c2-g2-s50",
            "eventList": [],
            "isPreInstallGpuDriver": false
          }
        ],
        "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "returnCode": "0",
        "returnMessage": "success"
      }
    }