Previous Next JavaScript must be enabled to correctly display this content

## Creates a new VM

post

/kvm/vm

Creates a new VM in Oracle Database Appliance using VmCreateParams. Pre-requisites - Ensure VM Storage and VM CPU Pool are present in the system.

### Request

Supported Media Types

- application/json

Body ()
Parameters to create a VM
Root Schema : VmCreateParams
Type: `object`
Show Source

- bootOptions: string
  VM boot options
- cloudInitParams: object VmCreateCloudInitParams
- cpuPoolName: string
  Name of the CPU Pool
- cpusToPin: array cpusToPin
  CPUs to pin
- description: string
  Description of the VM
- diskSize: string
  Size of the VM disk
- extraArgs: string
  Extra arguments for the VM installer
- extraSrcs: string
  Extra sources for the guest, they are mounted as cdrom devices
- graphicsSettings: string
  Graphics settings for the VM
- ksConfig: string
  Base64 encoded contents of the kickstart file. Should be < max-request-size (configured at 2MB for micronaut)
- maxMemorySize: string
  Maximum size of the VM memory
- maxVcpuCount: integer
  Maximum number of virtual CPUs to use
- memorySize: string
  Size of the VM memory
- name: string
  Name of the VM
- osVariant: string
  OS variant
- prefNode: string
  Preferred node to run the VM
- source: string
  Source installation. If local it can be an ISO or a bootable disk image. If remote it can be a URI pointing to an install tree hosted remotely over HTTP, HTTPS, FTP or NFS
- vcpuCount: integer
  Number of virtual CPUs to use
- vdiskNames: array vdiskNames
  Names of the virtual Disks to use
- vmStorageName: string
  Storage name of the VM
- vnetworkNames: array vnetworkNames
  Names of the virtual Networks to use

    {
        "type":"object",
        "properties":{
            "name":{
                "type":"string",
                "description":"Name of the VM"
            },
            "description":{
                "type":"string",
                "description":"Description of the VM"
            },
            "diskSize":{
                "type":"string",
                "description":"Size of the VM disk"
            },
            "vmStorageName":{
                "type":"string",
                "description":"Storage name of the VM"
            },
            "source":{
                "type":"string",
                "description":"Source installation. If local it can be an ISO or a bootable disk image. If remote it can be a URI pointing to an install tree hosted remotely over HTTP, HTTPS, FTP or NFS"
            },
            "memorySize":{
                "type":"string",
                "description":"Size of the VM memory"
            },
            "maxMemorySize":{
                "type":"string",
                "description":"Maximum size of the VM memory"
            },
            "vnetworkNames":{
                "type":"array",
                "description":"Names of the virtual Networks to use",
                "items":{
                    "type":"string"
                }
            },
            "vdiskNames":{
                "type":"array",
                "description":"Names of the virtual Disks to use",
                "items":{
                    "type":"string"
                }
            },
            "vcpuCount":{
                "type":"integer",
                "description":"Number of virtual CPUs to use"
            },
            "maxVcpuCount":{
                "type":"integer",
                "description":"Maximum number of virtual CPUs to use"
            },
            "cpuPoolName":{
                "type":"string",
                "description":"Name of the CPU Pool"
            },
            "cpusToPin":{
                "type":"array",
                "description":"CPUs to pin",
                "items":{
                    "type":"string"
                }
            },
            "graphicsSettings":{
                "type":"string",
                "description":"Graphics settings for the VM"
            },
            "osVariant":{
                "type":"string",
                "description":"OS variant"
            },
            "prefNode":{
                "type":"string",
                "description":"Preferred node to run the VM"
            },
            "extraArgs":{
                "type":"string",
                "description":"Extra arguments for the VM installer"
            },
            "extraSrcs":{
                "type":"string",
                "description":"Extra sources for the guest, they are mounted as cdrom devices"
            },
            "bootOptions":{
                "type":"string",
                "description":"VM boot options"
            },
            "ksConfig":{
                "type":"string",
                "description":"Base64 encoded contents of the kickstart file. Should be < max-request-size (configured at 2MB for micronaut)"
            },
            "cloudInitParams":{
                "$ref":"#/definitions/VmCreateCloudInitParams"
            }
        }
    }

Nested Schema : VmCreateCloudInitParams
Type: `object`
Show Source

- metaData: string
  Base64 encoded metadata parameters
- networkConfig: string
  Base64 encoded network-config parameters
- userData: string
  Base64 encoded user-data parameters
- vendorData: string
  Base64 encoded vendor-data parameters

    {
        "type":"object",
        "properties":{
            "userData":{
                "type":"string",
                "description":"Base64 encoded user-data parameters"
            },
            "vendorData":{
                "type":"string",
                "description":"Base64 encoded vendor-data parameters"
            },
            "networkConfig":{
                "type":"string",
                "description":"Base64 encoded network-config parameters"
            },
            "metaData":{
                "type":"string",
                "description":"Base64 encoded metadata parameters"
            }
        }
    }

Nested Schema : cpusToPin
Type: `array`
CPUs to pin
Show Source

- Array of: string

    {
        "type":"array",
        "description":"CPUs to pin",
        "items":{
            "type":"string"
        }
    }

Nested Schema : vdiskNames
Type: `array`
Names of the virtual Disks to use
Show Source

- Array of: string

    {
        "type":"array",
        "description":"Names of the virtual Disks to use",
        "items":{
            "type":"string"
        }
    }

Nested Schema : vnetworkNames
Type: `array`
Names of the virtual Networks to use
Show Source

- Array of: string

    {
        "type":"array",
        "description":"Names of the virtual Networks to use",
        "items":{
            "type":"string"
        }
    }

Back to Top

### Response

Supported Media Types

- application/json

#### 200 Response

OK
Body ()
Root Schema : KvmJob
Type: `object`
Show Source

- jobId: string
- jobReport: object ServiceJobReport
  Job Request Status
- syncJob: boolean

    {
        "type":"object",
        "properties":{
            "syncJob":{
                "type":"boolean"
            },
            "jobId":{
                "type":"string"
            },
            "jobReport":{
                "$ref":"#/definitions/ServiceJobReport"
            }
        }
    }

Nested Schema : ServiceJobReport
Type: `object`
Job Request Status
Show Source

- cpsMetadata: string
- createTimestamp: string(date-time)
- description: string
- jobId: string
- jobType: string
- message: string
- reports: array reports
- resourceList: array resourceList
- status: string
  Allowed Values: `[ "Created", "Scheduled", "Running", "Success", "Failure", "Retrying", "Waiting", "InternalError", "Reverting", "Reverted", "NodeDisconnectedFailure", "RunningTaskOnFail" ]`
- updatedTime: string(date-time)

    {
        "description":"Job Request Status",
        "properties":{
            "jobId":{
                "type":"string"
            },
            "status":{
                "type":"string",
                "enum":[
                    "Created",
                    "Scheduled",
                    "Running",
                    "Success",
                    "Failure",
                    "Retrying",
                    "Waiting",
                    "InternalError",
                    "Reverting",
                    "Reverted",
                    "NodeDisconnectedFailure",
                    "RunningTaskOnFail"
                ]
            },
            "message":{
                "type":"string"
            },
            "reports":{
                "type":"array",
                "items":{
                    "$ref":"#/definitions/TaskReport"
                }
            },
            "createTimestamp":{
                "type":"string",
                "format":"date-time"
            },
            "resourceList":{
                "type":"array",
                "items":{
                    "$ref":"#/definitions/JobResourceInfo"
                }
            },
            "description":{
                "type":"string"
            },
            "updatedTime":{
                "type":"string",
                "format":"date-time"
            },
            "jobType":{
                "type":"string"
            },
            "cpsMetadata":{
                "type":"string"
            }
        }
    }

Nested Schema : reports
Type: `array`
Show Source

- Array of: object TaskReport

    {
        "type":"array",
        "items":{
            "$ref":"#/definitions/TaskReport"
        }
    }

Nested Schema : resourceList
Type: `array`
Show Source

- Array of: object JobResourceInfo
  resource information

    {
        "type":"array",
        "items":{
            "$ref":"#/definitions/JobResourceInfo"
        }
    }

Nested Schema : TaskReport
Type: `object`
Show Source

- duration: string
- endTime: string(date-time)
- jobId: string
- nodeName: string
- parentTaskId: string
- reportLevel: string
  Allowed Values: `[ "Verbose", "Info", "Error" ]`
- startTime: string(date-time)
- status: string
  Allowed Values: `[ "Created", "Scheduled", "Running", "Success", "Failure", "Retrying", "Waiting", "InternalError", "Reverting", "Reverted", "NodeDisconnectedFailure", "Skipped" ]`
- tags: array tags
- taskDescription: string
- taskId: string
- taskName: string
- taskResult: string
- updatedTime: string(date-time)

    {
        "properties":{
            "taskId":{
                "type":"string"
            },
            "taskName":{
                "type":"string"
            },
            "nodeName":{
                "type":"string"
            },
            "taskResult":{
                "type":"string"
            },
            "startTime":{
                "type":"string",
                "format":"date-time"
            },
            "endTime":{
                "type":"string",
                "format":"date-time"
            },
            "duration":{
                "type":"string"
            },
            "status":{
                "type":"string",
                "enum":[
                    "Created",
                    "Scheduled",
                    "Running",
                    "Success",
                    "Failure",
                    "Retrying",
                    "Waiting",
                    "InternalError",
                    "Reverting",
                    "Reverted",
                    "NodeDisconnectedFailure",
                    "Skipped"
                ]
            },
            "taskDescription":{
                "type":"string"
            },
            "parentTaskId":{
                "type":"string"
            },
            "jobId":{
                "type":"string"
            },
            "tags":{
                "type":"array",
                "items":{
                    "type":"string"
                }
            },
            "reportLevel":{
                "type":"string",
                "enum":[
                    "Verbose",
                    "Info",
                    "Error"
                ]
            },
            "updatedTime":{
                "type":"string",
                "format":"date-time"
            }
        }
    }

Nested Schema : tags
Type: `array`
Show Source

- Array of: string

    {
        "type":"array",
        "items":{
            "type":"string"
        }
    }

Nested Schema : JobResourceInfo
Type: `object`
resource information
Show Source

- jobId: string
- resourceId: string
- resourceNewType: string
- resourceType: string
  Allowed Values: `[ "Backup", "BackupConfig", "DB", "DbHome", "Grid", "Pdb", "Recovery", "Report", "Tde", "ObjectStoreSwift" ]`
- updatedTime: string(date-time)

    {
        "description":"resource information",
        "properties":{
            "resourceId":{
                "type":"string"
            },
            "resourceType":{
                "type":"string",
                "enum":[
                    "Backup",
                    "BackupConfig",
                    "DB",
                    "DbHome",
                    "Grid",
                    "Pdb",
                    "Recovery",
                    "Report",
                    "Tde",
                    "ObjectStoreSwift"
                ]
            },
            "resourceNewType":{
                "type":"string"
            },
            "jobId":{
                "type":"string"
            },
            "updatedTime":{
                "type":"string",
                "format":"date-time"
            }
        }
    }

#### Default Response

An unexpected error has occurred
Body ()
Root Schema : Error
Type: `object`
Show Source

- code(required): string
- message(required): string

    {
        "required":[
            "code",
            "message"
        ],
        "properties":{
            "code":{
                "type":"string"
            },
            "message":{
                "type":"string"
            }
        }
    }

Back to Top