Create virtual server

Description

Create a virtual server.

Request

Header

Content-Type: application/xml

Accept: application/xml

X-Auth-Token: Keystone token (*1)

X-VA-Project-Id: Project ID of resource creation destination (*2)

X-VA-Domain-Id: Domain ID of resource creation destination (*2)

*1: The scope specified for the token is ignored when this API is executed by the system administrator.

*2: Mandatory when this API is executed by the system administrator. ignored when executed by other users.

Method

POST

Path

/l_servers

Query

n/a

Body


         <Resources>
          <LServer name="virtualServerName">
           <TemplateLink name="virtualServerTemplName"/>
           <ServerImageLink name="imageName"/>
           <ServerImageProject name="projId"/>
           <Disks>
            <Disk>
             <DiskIndex>diskNum</DiskIndex>
             <DiskSize>diskSize</DiskSize>
            </Disk>
           </Disks>
           <NICs>
            <NIC>
             <NICIndex>nicNum</NICIndex>
             <NetworkLinks>
              <NetworkLink id="networkId"/>
               <IpAddress auto="ipAutoSetup" address="ipAddr"/>
              </NetworkLink>
             </NetworkLinks>
            </NIC>
           </NICs>
           <OSSetting>
            <ComputerName>computerName, hostName</ComputerName>
            <AdminPassword>adminPassword</AdminPassword>
            <DNSServers>
             <DNSServer nic="nicIndex" ip="dnsIpAddress" />
            </DNSServers>
           </OSSetting>
           <AvailabilityZone>availZone</AvailabilityZone>
           <Dedicated>deployedToDedicatedVirtualServer</Dedicated>
          </LServer>
         </Resources>
       
Item Description Details
virtualServerName Name of the virtual server Specify a string of up to 64 characters, using alphanumeric characters, hyphens (-), underscores (_), and periods (.). It must start with a halfwidth alphanumeric character.
virtualServer TemplName Template name used by the virtual server Resource name of virtual server templates that have already been created.
imageName Clone image name to be distributed to the boot disk of the virtual server Resource name of cloning images that have already been created.
projId ID of the project that owns the image
  • Public image:

    Leave blank.

  • Private image:

    ID of the project that owns the image.

Note:

Because the image name is unique within the project, image names may be duplicated between projects.

Therefore, this information is necessary for identifying which project an image belongs to, when image names are duplicated.

Specify the following items when not using a template or using a customized template
diskNum Number of the disk to allocate to the virtual server Specify integers starting from 1.

Specify a value from 1 to 55.

Note:

The system disk of the specified image is extracted to the system disk of the virtual server.

Therefore, even if the disk size is specified for disk number 0 (system disk), that value will not be reflected (it will be ignored).

diskSize Size of the disk to be extracted. Specify a number of up to one decimal place, in GB.
nicNum Number that identifies the NIC to allocate to the virtual server Specify an integer starting from 0 (specify sequential numbers). Specify a value from 0 to 9.
networkId ID of the network to which the virtual server connects ID format
ipAddr IP address to allocate to the virtual server

(Optional)

  • If specifying the IP address directly

    <IpAddress auto="false" address="xxx.xxx.xxx.xxx"/>

  • If automatically allocating from the address range set for network resources

    <IpAddress auto="true"> or

    omit the IpAddress tag, or

    omit the auto attribute.

computerName, hostName Computer name, host name Computer name or host name.

Specify from 1 to 15 characters for Windows or from 1 to 63 characters for Linux using alphanumeric characters and hyphens (-). A string consisting of numbers only cannot be specified.

If omitted, the name of the virtual server will be used.

Underscores (_) and periods (.) are replaced with hyphens (-).

adminPassword Administrator password used when the operating system is Windows Administrator password of the public or private image to be distributed.

If a password is not set for the private image to be distributed, the value specified for this parameter will be used.

Specify a value of up to 128 characters, using halfwidth alphanumeric characters and symbols. If omitted, an error will occur.

Cannot set passwords for administrator users other than the Administrator.

nicIndex NIC index for which to configure DNS Index of the NIC for which to configure the IP address of the DNS.
dnsIpAddress IP address of the DNS Specify the IP address of the DNS to be set for each NIC if the operating system is Windows.

If omitted, the IP address of the DNS will be used.

availZone Name of the availability zone where the virtual server will be created Name of the availability zone.

If omitted, the virtual server will be created in an existing availability zone.

deployedToDedicatedVirtualServer Deployed to dedicated virtual server Specify "true" to deploy the virtual server to a dedicated virtual server.

Specify "false" to not deploy the virtual server to a dedicated virtual server.

If omitted, "false" will be used.

For subnet mask, default gateway, etc., the network resource value specified in NetworkLink of each NIC will be used.

Response

Status code

202 Accepted

Body

Task information