> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vers.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Post apiv1vmnew root



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/vm/new_root
openapi: 3.1.0
info:
  title: Orchestrator Control Plane API
  description: ''
  license:
    name: ''
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/vm/new_root:
    post:
      tags:
        - vm
      operationId: create_new_root_vm
      parameters:
        - name: wait_boot
          in: query
          description: >-
            If true, wait for the newly-created VM to finish booting before
            returning. Default: false.
          required: false
          schema:
            type: boolean
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewRootRequest'
        required: true
      responses:
        '201':
          description: VM created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewVmResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    NewRootRequest:
      type: object
      required:
        - vm_config
      properties:
        vm_config:
          $ref: '#/components/schemas/VmCreateVmConfig'
    NewVmResponse:
      type: object
      description: Response body for new VM requests (new_root, from_commit, branch)
      required:
        - vm_id
      properties:
        vm_id:
          type: string
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Reason of error
        success:
          type: boolean
          description: 'Is always: false'
    VmCreateVmConfig:
      type: object
      description: Struct representing configuration options common to all VMs
      properties:
        fs_size_mib:
          type:
            - integer
            - 'null'
          format: int32
          description: The disk size, in MiB.
          minimum: 0
        image_name:
          type:
            - string
            - 'null'
          description: The filesystem base image name. Currently, must be 'default'
        kernel_name:
          type:
            - string
            - 'null'
          description: The kernel name. Currently, must be 'default.bin'
        labels:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          propertyNames:
            type: string
        mem_size_mib:
          type:
            - integer
            - 'null'
          format: int32
          description: The RAM size, in MiB.
          minimum: 0
        vcpu_count:
          type:
            - integer
            - 'null'
          format: int32
          description: How many vCPUs to allocate to this VM (and its children)
          minimum: 0
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: Token

````