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

# Get virtual machine

> Reads one virtual machine by name in your tenant. The response also carries `access_credential`, the VM's screen sharing password, recorded when the VM was created. It is returned only on Get (never on List), only to the tenant that owns the machine, and is omitted — not an error — when the credential has not been created, when the deployment does not serve credentials, or when your token lacks the `compute:ReadMachineCredential` scope.



## OpenAPI

````yaml /api-reference/compute-public.v1.openapi.json get /compute/v1/virtualmachines/{name}
openapi: 3.0.3
info:
  title: Mount Thor Compute — friendly public compute API
  description: >-
    ComputeService is the friendly public compute API: lifecycle (create / get /
    list / delete / power) for VirtualMachines and BareMetalMachines expressed
    in high-level terms, plus the catalog/discovery surface that supplies the
    valid images and machine classes a caller may pick from. There is
    deliberately no Update RPC: the CR spec is whole-spec CEL-immutable, so an
    "edit" is delete + recreate.
  version: 0.1.0
servers: []
security: []
tags:
  - name: ComputeService
paths:
  /compute/v1/virtualmachines/{name}:
    get:
      tags:
        - ComputeService
      summary: Get virtual machine
      description: >-
        Reads one virtual machine by name in your tenant. The response also
        carries `access_credential`, the VM's screen sharing password, recorded
        when the VM was created. It is returned only on Get (never on List),
        only to the tenant that owns the machine, and is omitted — not an error
        — when the credential has not been created, when the deployment does not
        serve credentials, or when your token lacks the
        `compute:ReadMachineCredential` scope.
      operationId: ComputeService_GetVirtualMachine
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetVirtualMachineResponse'
components:
  schemas:
    GetVirtualMachineResponse:
      type: object
      properties:
        virtualMachine:
          $ref: '#/components/schemas/VirtualMachine'
        accessCredential:
          allOf:
            - $ref: '#/components/schemas/VirtualMachineAccessCredential'
          description: >-
            access_credential is optional: absent when the VM has no credential
            recorded yet, when this deployment does not serve credentials, or
            when the caller's token does not carry the
            `compute:ReadMachineCredential` scope. A narrowed token is not an
            error — the machine is returned without it.
    VirtualMachine:
      type: object
      properties:
        name:
          type: string
          description: name is the object name (metadata.name).
        image:
          type: string
          description: image is the catalog image ref the VM boots from (CR spec.image).
        machineClass:
          type: string
          description: machine_class is the catalog SKU (CR spec.class), e.g. "m4-24g".
        ports:
          type: array
          items:
            $ref: '#/components/schemas/Port'
        sshAuthorizedKeys:
          type: array
          items:
            $ref: '#/components/schemas/SshAuthorizedKey'
        status:
          $ref: '#/components/schemas/MachineStatus'
        createdAt:
          type: string
          format: date-time
      description: VirtualMachine is the friendly view/return shape of a VM.
    VirtualMachineAccessCredential:
      type: object
      properties:
        vncPassword:
          type: string
          description: >-
            vnc_password is the eight-character screen sharing password the host
            agent was given at create; never log it, never echo it in an error.
      description: >-
        The VM screen sharing password, generated once per VM and recorded in
        the owning tenant's namespace. Same contract as
        BareMetalAccessCredential: a record of what the machine was configured
        with, for the owning tenant only, not a brokered connection.
    Port:
      type: object
      properties:
        name:
          type: string
          description: name of the endpoint, for example "ssh".
        guestPort:
          type: integer
          description: guest_port inside the machine (1-65535).
          format: uint32
      description: >-
        Port publishes one guest endpoint through the tunnel plane. Mirrors the
        CR's spec.ports[] item (name + guestPort); protocol/exposure are
        platform-managed and have no CR field, so they are not modelled here.
    SshAuthorizedKey:
      type: object
      properties:
        publicKey:
          type: string
          description: public_key in authorized_keys format. A public key is not a secret.
        username:
          type: string
      description: >-
        SshAuthorizedKey grants login with a public key. Maps to the CR's
        spec.sshAuthorizedKeys[] item. `username` is carried but disregarded
        today (every key installs into the platform-managed account mt-user).
    MachineStatus:
      type: object
      properties:
        id:
          type: string
          description: id is the platform-visible identity, e.g. "vm_<uid>".
        state:
          enum:
            - MACHINE_STATE_UNSPECIFIED
            - MACHINE_STATE_PENDING
            - MACHINE_STATE_RUNNING
            - MACHINE_STATE_FAILED
            - MACHINE_STATE_TERMINATING
          type: string
          format: enum
        ready:
          type: boolean
          description: ready is the status of the "Ready" condition.
        message:
          type: string
          description: >-
            message is a human-readable detail drawn from the most relevant
            condition.
      description: MachineStatus is the friendly projection of the CR status.

````