KubeVirt VirtualMachineInstances API
Operations for managing VirtualMachineInstance (VMI) resources. A VirtualMachineInstance represents a running virtual machine and tracks its actual state.
Operations for managing VirtualMachineInstance (VMI) resources. A VirtualMachineInstance represents a running virtual machine and tracks its actual state.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/kubevirt:kubevirt-virtualmachineinstances-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: KubeVirt VM Management Virtual Machine Instances API
description: The KubeVirt VM Management API extends the Kubernetes API with custom resources for running and managing virtual machines alongside containers. It provides CRD endpoints for VirtualMachine, VirtualMachineInstance, and VirtualMachineInstanceMigration resources, plus subresource REST endpoints for VM lifecycle operations including start, stop, pause, unpause, restart, migrate, and console/VNC access.
version: 1.3.0
contact:
name: KubeVirt Community
url: https://kubevirt.io/
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://{kubernetes-api-server}
description: Kubernetes API server
variables:
kubernetes-api-server:
default: localhost:6443
description: Address of the Kubernetes API server
tags:
- name: VirtualMachineInstances
description: Operations for managing VirtualMachineInstance (VMI) resources. A VirtualMachineInstance represents a running virtual machine and tracks its actual state.
paths:
/apis/kubevirt.io/v1/namespaces/{namespace}/virtualmachineinstances:
get:
operationId: listNamespacedVirtualMachineInstance
summary: KubeVirt List VirtualMachineInstances
description: Returns all running VirtualMachineInstance resources in the specified namespace. Each VMI represents an active virtual machine process.
tags:
- VirtualMachineInstances
parameters:
- $ref: '#/components/parameters/namespace'
- $ref: '#/components/parameters/labelSelector'
- $ref: '#/components/parameters/fieldSelector'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: List of VirtualMachineInstances
content:
application/json:
schema:
$ref: '#/components/schemas/VirtualMachineInstanceList'
'401':
description: Unauthorized
'403':
description: Forbidden
/apis/kubevirt.io/v1/namespaces/{namespace}/virtualmachineinstances/{name}:
get:
operationId: readNamespacedVirtualMachineInstance
summary: KubeVirt Get a VirtualMachineInstance
description: Returns the specified VirtualMachineInstance including its phase, network interfaces, volumes, node assignment, and guest OS information.
tags:
- VirtualMachineInstances
parameters:
- $ref: '#/components/parameters/namespace'
- $ref: '#/components/parameters/name'
responses:
'200':
description: VirtualMachineInstance details
content:
application/json:
schema:
$ref: '#/components/schemas/VirtualMachineInstance'
'401':
description: Unauthorized
'404':
description: VirtualMachineInstance not found
components:
schemas:
ObjectMeta:
type: object
description: Standard Kubernetes object metadata.
required:
- name
properties:
name:
type: string
description: Name of the resource.
namespace:
type: string
description: Namespace the resource belongs to.
labels:
type: object
additionalProperties:
type: string
description: Labels for organizing and selecting resources.
annotations:
type: object
additionalProperties:
type: string
description: Non-identifying metadata.
resourceVersion:
type: string
uid:
type: string
creationTimestamp:
type: string
format: date-time
DomainSpec:
type: object
description: Virtual hardware configuration for the VM guest.
properties:
cpu:
type: object
description: CPU configuration for the VM.
properties:
cores:
type: integer
description: Number of CPU cores.
minimum: 1
sockets:
type: integer
description: Number of CPU sockets.
minimum: 1
threads:
type: integer
description: Number of CPU threads per core.
minimum: 1
model:
type: string
description: CPU model to emulate, e.g. 'host-model' or 'Westmere'.
dedicatedCpuPlacement:
type: boolean
description: If true, requests dedicated CPU pinning via CPU Manager.
features:
type: array
description: CPU feature flags to enable or disable.
items:
type: object
properties:
name:
type: string
policy:
type: string
enum:
- force
- require
- optional
- disable
- forbid
memory:
type: object
description: Memory configuration for the VM.
properties:
guest:
type: string
description: Amount of memory for the guest OS in Kubernetes resource quantity format, e.g. '2Gi', '512Mi'.
hugepages:
type: object
description: Huge pages configuration.
properties:
pageSize:
type: string
description: Size of huge pages, e.g. '2Mi' or '1Gi'.
devices:
type: object
description: Virtual device configuration.
properties:
disks:
type: array
description: Disk devices attached to the VM.
items:
$ref: '#/components/schemas/Disk'
interfaces:
type: array
description: Network interface devices.
items:
$ref: '#/components/schemas/Interface'
rng:
type: object
description: Random number generator device configuration.
watchdog:
type: object
description: Hardware watchdog device configuration.
features:
type: object
description: Hardware feature flags for the VM.
properties:
acpi:
type: object
description: ACPI configuration.
smm:
type: object
description: System Management Mode configuration.
hyperv:
type: object
description: Hyper-V enlightenments for Windows VMs.
firmware:
type: object
description: Firmware configuration for the VM.
properties:
bootloader:
type: object
description: Bootloader configuration (BIOS or UEFI).
properties:
bios:
type: object
description: BIOS bootloader.
efi:
type: object
description: EFI/UEFI bootloader.
properties:
secureBoot:
type: boolean
description: If true, enables Secure Boot.
serial:
type: string
description: Serial number to expose to the guest.
uuid:
type: string
format: uuid
description: SMBIOS UUID for the VM.
machine:
type: object
description: Machine type configuration.
properties:
type:
type: string
description: Machine type, e.g. 'q35' or 'pc-q35-rhel8.4.0'.
VirtualMachineInstanceStatus:
type: object
description: Observed runtime status of a VirtualMachineInstance.
properties:
nodeName:
type: string
description: Node where the VMI is running.
guestOSInfo:
type: object
description: Information about the guest operating system.
properties:
name:
type: string
description: OS name reported by the guest agent.
version:
type: string
description: OS version.
id:
type: string
description: OS ID (e.g. 'rhel', 'ubuntu').
prettyName:
type: string
description: Human-readable OS name.
interfaces:
type: array
description: Network interfaces as reported by the guest agent.
items:
type: object
properties:
name:
type: string
mac:
type: string
ipAddress:
type: string
ipAddresses:
type: array
items:
type: string
phase:
type: string
description: Current lifecycle phase of the VMI.
enum:
- Pending
- Scheduling
- Scheduled
- Running
- Succeeded
- Failed
- Unknown
phaseTransitionTimestamps:
type: array
description: History of phase transitions with timestamps.
items:
type: object
properties:
phase:
type: string
phaseTransitionTimestamp:
type: string
format: date-time
migrationState:
type: object
description: Current migration state if the VMI is being migrated.
properties:
startTimestamp:
type: string
format: date-time
endTimestamp:
type: string
format: date-time
targetNode:
type: string
sourceNode:
type: string
completed:
type: boolean
failed:
type: boolean
conditions:
type: array
items:
type: object
VirtualMachineInstanceList:
type: object
description: List of VirtualMachineInstance resources.
properties:
apiVersion:
type: string
kind:
type: string
items:
type: array
items:
$ref: '#/components/schemas/VirtualMachineInstance'
VirtualMachineInstanceSpec:
type: object
description: Specification of the virtual machine hardware and guest configuration.
properties:
domain:
$ref: '#/components/schemas/DomainSpec'
networks:
type: array
description: Network interfaces to attach to the VM.
items:
$ref: '#/components/schemas/Network'
volumes:
type: array
description: Volumes to attach to the VM.
items:
$ref: '#/components/schemas/Volume'
affinity:
type: object
description: Kubernetes affinity rules for pod scheduling.
tolerations:
type: array
description: Kubernetes tolerations for node scheduling.
items:
type: object
nodeSelector:
type: object
additionalProperties:
type: string
description: Node selector constraints for VM placement.
hostname:
type: string
description: Hostname to set in the guest OS.
subdomain:
type: string
description: Subdomain for the VM's DNS entry.
terminationGracePeriodSeconds:
type: integer
description: Grace period in seconds before forceful VM termination.
minimum: 0
evictionStrategy:
type: string
description: Controls how the VM behaves during node eviction. 'LiveMigrate' migrates instead of stopping.
enum:
- LiveMigrate
- None
Network:
type: object
description: A network to attach a VM interface to.
required:
- name
properties:
name:
type: string
description: Name of the network, referenced by interface name.
pod:
type: object
description: Default pod network configuration.
properties:
vmNetworkCIDR:
type: string
description: CIDR for the VM network in masquerade mode.
multus:
type: object
description: Multus CNI network attachment.
properties:
networkName:
type: string
description: Name of the NetworkAttachmentDefinition.
default:
type: boolean
description: If true, this is the default network.
VirtualMachineInstance:
type: object
description: A running VirtualMachineInstance representing the actual state of an active virtual machine process in KubeVirt.
properties:
apiVersion:
type: string
enum:
- kubevirt.io/v1
kind:
type: string
enum:
- VirtualMachineInstance
metadata:
$ref: '#/components/schemas/ObjectMeta'
spec:
$ref: '#/components/schemas/VirtualMachineInstanceSpec'
status:
$ref: '#/components/schemas/VirtualMachineInstanceStatus'
Disk:
type: object
description: A virtual disk device attached to the VM.
required:
- name
properties:
name:
type: string
description: Name of the disk, must match a volume name.
bootOrder:
type: integer
description: Boot order for this disk (lower numbers boot first).
minimum: 1
disk:
type: object
description: Virtio disk configuration.
properties:
bus:
type: string
enum:
- virtio
- sata
- scsi
- ide
cdrom:
type: object
description: CD-ROM device configuration.
properties:
bus:
type: string
enum:
- virtio
- sata
- scsi
readonly:
type: boolean
lun:
type: object
description: LUN device configuration.
properties:
bus:
type: string
Volume:
type: object
description: A storage volume to attach to a disk device.
required:
- name
properties:
name:
type: string
description: Name of the volume, referenced by disk name.
containerDisk:
type: object
description: OCI container image used as a disk.
properties:
image:
type: string
description: OCI image reference containing the disk image.
imagePullPolicy:
type: string
enum:
- Always
- Never
- IfNotPresent
dataVolume:
type: object
description: DataVolume (CDI) as a disk source.
properties:
name:
type: string
description: Name of the DataVolume resource.
persistentVolumeClaim:
type: object
description: Kubernetes PersistentVolumeClaim as a disk source.
properties:
claimName:
type: string
description: Name of the PVC.
readOnly:
type: boolean
cloudInitNoCloud:
type: object
description: Cloud-init NoCloud data source for guest initialization.
properties:
userData:
type: string
description: Cloud-init user-data as a string.
networkData:
type: string
description: Cloud-init network-config as a string.
cloudInitConfigDrive:
type: object
description: Cloud-init Config Drive data source.
properties:
userData:
type: string
networkData:
type: string
sysprep:
type: object
description: Windows Sysprep answer file source.
properties:
configMap:
type: object
properties:
name:
type: string
emptyDisk:
type: object
description: Ephemeral empty disk created for the VM.
properties:
capacity:
type: string
description: Disk capacity in Kubernetes resource quantity format.
hostDisk:
type: object
description: Host filesystem path as a disk.
properties:
path:
type: string
description: Absolute path on the host.
type:
type: string
enum:
- DiskOrCreate
- Disk
Interface:
type: object
description: A virtual network interface device.
required:
- name
properties:
name:
type: string
description: Name of the interface, must match a network name.
model:
type: string
description: Network interface model type. 'virtio' is recommended for best performance.
enum:
- virtio
- e1000
- e1000e
- rtl8139
masquerade:
type: object
description: NAT masquerade networking mode.
bridge:
type: object
description: Bridge networking mode, connected to a host bridge.
sriov:
type: object
description: SR-IOV passthrough networking mode.
macAddress:
type: string
description: Fixed MAC address for the interface.
pattern: ^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$
ports:
type: array
description: Port forwarding rules for masquerade interfaces.
items:
type: object
properties:
name:
type: string
port:
type: integer
minimum: 1
maximum: 65535
protocol:
type: string
enum:
- TCP
- UDP
parameters:
name:
name: name
in: path
required: true
description: The name of the resource.
schema:
type: string
namespace:
name: namespace
in: path
required: true
description: The Kubernetes namespace of the resource.
schema:
type: string
fieldSelector:
name: fieldSelector
in: query
required: false
description: Field selector to filter resources.
schema:
type: string
limit:
name: limit
in: query
required: false
description: Maximum number of results per page.
schema:
type: integer
minimum: 1
labelSelector:
name: labelSelector
in: query
required: false
description: Label selector to filter resources.
schema:
type: string
externalDocs:
description: KubeVirt User Guide
url: https://kubevirt.io/user-guide/