Skip to content

GET /api/appvm/vms/{id}

Updated

Read one AppVM and its current workload status by id.

PropertyValue
Scoperead
Request bodynone
Success200 OK

Endpoint

GET ${baseUrl}/api/appvm/vms/${id}
read

Read one AppVM runtime and workload view.

Use your host URL and API key as shell variables:

baseUrl="https://agent.example.com"
VIRT_AGENT_API_KEY="<your-api-key>"

cURL template

curl --request GET "${baseUrl}/api/appvm/vms/${id}" \
  --header "Authorization: Bearer ${VIRT_AGENT_API_KEY}"
LocationNameTypeRequiredDescription
HeaderAuthorizationbearer tokenyesBearer ${VIRT_AGENT_API_KEY}.
PathidstringyesAppVM id returned by GET /api/appvm/vms or POST /api/appvm/vms.

Returns one AppVM VmView object. mode is appvm. Secret environment values are never returned.

Fields marked optional are omitted from the JSON object when they have no value. Fields marked nullable are always present and use null when they do not apply.

VmView

FieldTypePresenceDescription
idstringalwaysAppVM id.
statestringalwaysStored lifecycle state: created, running, paused, stopped, or failed.
display_statestringalwaysUser-facing state. In addition to lifecycle states, classic VM provisioning can report booting, downloading, creating, or provision_failed.
vcpusintegeralwaysAssigned vCPU count.
memory_mbintegeralwaysAssigned memory in MiB.
kernel_pathstring or nullnullablePVH kernel path when direct kernel boot is used.
firmware_pathstring or nullnullableFirmware path when firmware boot is used.
disk_pathstringalwaysRoot disk path on the Lite host. An in-progress classic provision returns an empty string until the disk exists.
volumesarray of VmVolumealwaysAttached data volumes, in disk order. The item shape is documented below.
seed_diskSeedDiskoptionalThe host-generated cloud-init seed disk. Present only on a VM with cloud_init. It is not a data volume and cannot be detached, but it does occupy a guest device letter.
cmdlinestringalwaysKernel command line.
console_socket_pathstringalwaysHost serial-console socket path. An in-progress classic provision returns an empty string.
failure_reasonFailureReasonoptionalHuman-readable and machine-readable failure details.
pidintegeroptionalCloud Hypervisor process id when known.
netsarray of VmNetworkalwaysNetwork interfaces in order: index 0 is the guest's eth0. Empty array when the AppVM has no interface.
platformVmPlatformoptionalSMBIOS platform values.
diskVmDiskoptionalAgent-managed root disk metadata.
imageVmImageoptionalClassic VM source image identity.
cloud_initCloudInitViewoptionalClassic VM cloud-init view. API-key responses omit cloud_init.password.
io_limitDiskIoLimitoptionalRoot-disk throughput ceiling. Omitted when the disk is unthrottled.
nestedbooleanoptionalWhether the guest may itself run KVM. Omitted when never set explicitly, which means the hypervisor default applies.
cpu_affinityarray of integersoptionalHost logical CPUs the vCPUs are pinned to. Omitted when unpinned.
cpu_topologyCpuTopologyoptionalGuest-visible CPU topology. Omitted when the hypervisor default applies.
pci_devicesarray of stringsalwaysPassed-through host PCI devices, as full BDF strings such as 0000:07:00.0. Empty array when nothing is passed through.
balloon_mbintegeroptionalMemory reclaim target in MiB. Omitted when no memory is being reclaimed.
created_atRFC 3339 stringoptionalCreation timestamp.
discovered_ipv4stringoptionalObserved guest IPv4 address.
guest_panicked_atRFC 3339 stringoptionalWhen a guest kernel panic was observed over pvpanic. state stays running: the hypervisor is alive and the guest is not.
shutting_downbooleanoptionalPresent as true while ACPI shutdown is pending; omitted when false.
modestringalwaysAlways appvm on this endpoint.
appvmAppvmViewalwaysAppVM image, network, workload, health, restart, mount, and redeploy state.

volumes[] (VmVolume)

FieldTypePresenceDescription
idstringalwaysStable per-VM volume id, such as data0.
pathstringalwaysVolume file path on the Lite host.
virtual_size_bytesintegeralwaysVirtual size visible to the guest, in bytes.
fmtstringalwaysVolume image format. Currently qcow2.
readonlybooleanalwaysWhether the volume is attached read-only.
ownedbooleanalwaysWhether the agent owns and manages the volume file. true means deleting the VM erases it.
volume_idstringoptionalId of the matching first-class volume, whose lifetime is independent of this VM. Omitted for a VM-owned disk.
devicestringalwaysGuest block device, such as /dev/vdc. Derived from disk order, so detaching an earlier disk shifts this one down a letter. Mount by UUID or label in the guest, never by device letter.
disk_bytesintegeroptionalBytes the volume file actually occupies, which is smaller than virtual_size_bytes for a sparse image. Only the single-VM read fills this in; list responses omit it rather than pay a stat per row.

seed_disk (SeedDisk)

FieldTypePresenceDescription
devicestringalwaysGuest block device holding the cloud-init seed. It sits directly after the root disk, so data volumes on a cloud-init VM start one letter later than on a VM without one.
size_bytesintegeralwaysSize the guest sees. Fixed, and small: the seed holds only the rendered cloud-init files.

io_limit (DiskIoLimit)

FieldTypePresenceDescription
bps_totalintegeroptionalCombined read and write ceiling in bytes per second. Omitted when unlimited.
iops_totalintegeroptionalCombined read and write ceiling in IO operations per second. Omitted when unlimited.

cpu_topology (CpuTopology)

FieldTypePresenceDescription
socketsintegeralwaysGuest-visible socket count.
coresintegeralwaysCores per socket.
threadsintegeralwaysThreads per core. sockets × cores × threads always equals vcpus.

failure_reason (FailureReason)

FieldTypePresenceDescription
detected_atRFC 3339 stringalwaysTime the failure was detected.
summarystringalwaysOne-line operator-readable explanation.
detailobjectalwaysTagged machine-readable detail. kind is one of socket_gone, socket_dead, ping_timeout, process_exit, process_signal, missing_pid, disk_missing, invalid_vm_id, boot_timeout, or provision_failed.
detail.kindstringalwaysFailure-detail discriminator.
detail.codeintegerconditionalProcess exit code when kind is process_exit.
detail.signumintegerconditionalSignal number when kind is process_signal.
detail.pathstringconditionalMissing disk path when kind is disk_missing.
detail.idstringconditionalInvalid VM id when kind is invalid_vm_id.
detail.secondsintegerconditionalTimeout duration when kind is boot_timeout.
causestringalwaysHigher-level cause: operator_shutdown, guest_shutdown, ch_crash, vmm_hang, disk_missing, boot_timeout, provision_failed, record_invalid, or unknown.

nets[] (VmNetwork)

FieldTypePresenceDescription
modestringalwaysNetwork mode. Currently bridge.
bridgestringalwaysHost bridge interface.
tap_namestringalwaysAgent-created tap interface.
macstringalwaysGuest MAC address.
network_idstringoptionalHost network id.
vlan_tagintegeroptional802.1Q VLAN tag.
ipv4VmNetworkIpConfigoptionalIPv4 assignment metadata.
ipv6VmNetworkIpConfigoptionalIPv6 assignment metadata.
mtuintegeroptionalInterface MTU.
isolatedbooleanoptionalPer-VM bridge port-isolation override.
spoof_guardbooleanoptionalPer-VM anti-spoof override.
rate_limit_mbpsintegeroptionalSymmetric network rate limit in Mbps.
allowed_ipsarray of stringsoptionalExtra source addresses or CIDRs anti-spoof lets through, beyond the interface's own address. Omitted when empty.
dhcp_snooped_ipv4stringoptionalGuest IPv4 learned from the upstream DHCP ACK. Authoritative, and the preferred source for discovered_ipv4. Only set on an interface with no static ipv4.
last_observed_ipv4stringoptionalLast IPv4 seen for this MAC in the host neighbor table. Guest-asserted, so it is a display fallback only, and it survives ARP expiry.

nets[].ipv4 / nets[].ipv6 (VmNetworkIpConfig)

FieldTypePresenceDescription
addressstringalwaysCIDR address.
gatewaystringoptionalGateway address without a CIDR suffix.
dns_serversarray of stringsoptionalDNS server addresses.

platform (VmPlatform)

FieldTypePresenceDescription
serial_numberstringoptionalSMBIOS serial number.

disk (VmDisk)

FieldTypePresenceDescription
modestringalwaysRoot disk mode. Currently copy.
base_pathstringalwaysCanonical source image path.
virtual_size_bytesintegeralwaysVirtual size visible to the guest, in bytes.
ownedbooleanalwaysWhether the agent owns and manages the root disk file.
image_fmtstringoptionalRoot disk image format. Currently qcow2.
qsd_pidintegeroptionalStorage process id.
qsd_start_timeintegeroptionalStorage process start time in boot-relative clock ticks.
qsd_blk_socketstringoptionalRoot-disk block socket path.
qsd_qmp_socketstringoptionalStorage control socket path.
runtimeVolumeRefoptionalBackend-independent runtime identity.

disk.runtime (VolumeRef)

FieldTypePresenceDescription
backendstringalwaysStorage backend. Currently qsd.
pidintegeralwaysStorage process id.
start_timeintegeralwaysStorage process start time in boot-relative clock ticks.
blk_socketstringalwaysRoot-disk block socket path.
qmp_socketstringalwaysStorage control socket path.

image (VmImage)

FieldTypePresenceDescription
image_idstringalwaysSource image id.
distrostringoptionalDistribution name.
versionstringoptionalDistribution version.

cloud_init (CloudInitView)

FieldTypePresenceDescription
hostnamestringalwaysGuest hostname.
userstringalwaysGuest account configured by cloud-init.
ssh_authorized_keysarray of stringsalwaysSSH public keys.
passwordstringoptionalGuest password. This field is always omitted from API-key responses.
networkCloudInitNetworkoptionalRendered static guest network input.
instance_idstringalwaysNoCloud instance identity.
console_autologinbooleanalwaysWhether serial-console auto-login is enabled.
sudobooleanalwaysWhether a non-root cloud-init user receives sudo access.

cloud_init.network (CloudInitNetwork)

FieldTypePresenceDescription
ipv4CloudInitIpConfigalwaysStatic IPv4 configuration.
ipv6CloudInitIpConfigoptionalStatic IPv6 configuration.

cloud_init.network.ipv4 / ipv6

FieldTypePresenceDescription
addressstringalwaysCIDR address.
gatewaystringoptionalGateway address without a CIDR suffix.
dnsarray of stringsoptionalDNS server addresses. This field is named dns, not dns_servers.

appvm (AppvmView)

FieldTypePresenceDescription
image_idstringalwaysSource AppVM image id.
hostnamestringoptionalConfigured guest hostname. For DHCP-derived hostnames, use lease.hostname.
network_modestringalwaysstatic or dhcp.
ipstringoptionalConfigured IPv4 address in static mode.
prefixintegeroptionalConfigured IPv4 prefix length in static mode.
gatewaystringoptionalConfigured gateway in static mode.
dnsarray of stringsoptionalConfigured DNS servers in static mode; omitted when empty.
leaseAppvmLeaseoptionalLatest guest-reported DHCP lease.
argsarray of stringsoptionalEffective workload argument vector; omitted when empty.
cwdstringoptionalWorkload working directory; omitted when it is /.
userstringoptionalAccount the workload runs as; omitted when empty.
envarray of AppvmEnvVaroptionalEffective environment. Secret values are never returned.
workload_exit_codeintegeroptionalLast workload exit code.
workload_exit_signalintegeroptionalLast terminating signal number.
workload_fatalstringoptionalGuest-side startup failure.
spec_pendingbooleanoptionalPresent as true when the stored spec has edits that only take effect on the next boot; omitted when false.
specAppvmSpecViewalwaysThe stored workload spec the AppVM boots from.
healthstringoptionalstarting, healthy, or unhealthy.
health_failing_streakintegeroptionalConsecutive failed health checks; omitted when zero.
healthcheckobjectoptionalEffective health-check definition; omitted when the workload has none.
extra_hostsarray of objectsoptionalAdditional /etc/hosts entries injected into the guest; omitted when empty.
injected_filesarray of InjectedFileoptionalConfig and secret files written into the guest. Secret contents are never returned. Omitted when empty.
tmpfs_mountsarray of objectsoptionaltmpfs mounts created inside the guest; omitted when empty.
last_heartbeat_atRFC 3339 stringoptionalWhen the guest agent last checked in over vsock. Omitted before the first heartbeat.
heartbeat_stalebooleanoptionalPresent as true when heartbeats stopped arriving while the AppVM is still running, which means the guest side is unreachable even though the hypervisor is alive. Omitted when false.
log_stream_detachedbooleanoptionalPresent as true when workload log and exit-code collection detached after an agent restart.
restart_policystringalwaysno, on-failure, or always.
restart_countintegeroptionalConsecutive automatic restart count; omitted when zero.
last_restart_atRFC 3339 stringoptionalLatest automatic restart timestamp.
data_mountsarray of DataMountoptionalGuest device-to-mountpoint mappings; omitted when empty.
build_digeststringoptionalShort digest of the build used by this AppVM.
update_availablebooleanoptionalPresent as true when the source image has a newer build.
redeployingbooleanoptionalPresent as true while redeploy is in progress.
redeploy_errorstringoptionalLast redeploy failure.

appvm.lease (AppvmLease)

FieldTypePresenceDescription
ipstringalwaysLeased IPv4 address.
prefixintegeralwaysIPv4 prefix length.
gatewaystringoptionalLease gateway.
dnsarray of stringsoptionalLease DNS servers; omitted when empty.
searcharray of stringsoptionalDNS search domains; omitted when empty.
lease_secsintegeroptionalLease duration in seconds; omitted for an indefinite or unknown duration.
hostnamestringoptionalEffective guest hostname.
reported_atRFC 3339 stringalwaysTime the agent received the lease report.

appvm.env[] (AppvmEnvVar)

FieldTypePresenceDescription
keystringalwaysEnvironment variable name.
valuestringoptionalEnvironment variable value. Omitted when secret is true.
secretbooleanoptionalPresent as true for a secret variable; omitted when false.

appvm.injected_files[] (InjectedFile)

FieldTypePresenceDescription
pathstringalwaysAbsolute path the file is written to inside the guest.
modeintegeralwaysFile permission bits.
secretbooleanalwaysWhether the file holds a secret. Contents are never returned either way; this says why.

appvm.spec (AppvmSpecView)

FieldTypePresenceDescription
keepalivebooleanalwaysWhether the guest stays up after the workload exits.
commandarray of stringsalwaysWorkload argument vector. Empty means the image entrypoint applies.
envarray of stringsalwaysNon-secret environment entries in KEY=value form.
secret_env_keysarray of stringsalwaysNames of secret environment variables. Values are never returned.
workdirstringoptionalWorking directory override.
userstringoptionalAccount override.
no_healthcheckbooleanalwaysWhether the image's health check is explicitly disabled.
healthcheckobjectoptionalHealth-check override.
extra_hostsarray of objectsalwaysAdditional /etc/hosts entries.
config_filesarray of objectsalwaysNon-secret files injected into the guest, with contents.
secret_filesarray of InjectedFilealwaysSecret files injected into the guest. Contents are never returned.
tmpfs_mountsarray of objectsalwaystmpfs mounts created inside the guest.
restart_policystringalwaysno, on-failure, or always.
stop_grace_secsintegeroptionalSeconds the guest gets to stop before it is forced.

appvm.data_mounts[] (DataMount)

FieldTypePresenceDescription
devicestringalwaysGuest block-device path.
mountpointstringalwaysAbsolute mount path inside the workload root filesystem.
read_onlybooleanalwaysWhether the guest mounts it read-only.
Terminal window
baseUrl="https://agent.example.com"
VIRT_AGENT_API_KEY="<your-api-key>"
id="demo-api-appvm"
curl "${baseUrl}/api/appvm/vms/${id}" \
--header "Authorization: Bearer ${VIRT_AGENT_API_KEY}"
{
"id": "demo-api-appvm",
"state": "running",
"display_state": "running",
"vcpus": 2,
"memory_mb": 2048,
"kernel_path": null,
"firmware_path": null,
"disk_path": "/var/lib/virtainer/vms/demo-api-appvm/root.qcow2",
"volumes": [
{
"id": "data0",
"path": "/var/lib/virtainer/vms/demo-api-appvm.data0.qcow2",
"virtual_size_bytes": 10737418240,
"fmt": "qcow2",
"readonly": false,
"owned": true
}
],
"cmdline": "console=hvc0",
"console_socket_path": "/run/virtainer/demo-api-appvm/console.sock",
"pid": 4243,
"nets": [
{
"mode": "bridge",
"bridge": "vmbr0",
"tap_name": "vtdemoapp0",
"mac": "02:00:00:65:43:21",
"network_id": "default"
}
],
"pci_devices": [],
"created_at": "2026-07-03T10:05:00Z",
"discovered_ipv4": "10.77.23.21",
"mode": "appvm",
"appvm": {
"image_id": "nginx_latest",
"hostname": "demo-api-appvm",
"network_mode": "dhcp",
"lease": {
"ip": "10.77.23.21",
"prefix": 24,
"gateway": "10.77.23.1",
"dns": ["10.77.23.1"],
"search": ["example.internal"],
"lease_secs": 3600,
"hostname": "demo-api-appvm",
"reported_at": "2026-07-03T10:05:08Z"
},
"args": ["nginx", "-g", "daemon off;"],
"env": [
{"key": "PORT", "value": "8080"},
{"key": "APP_SECRET", "secret": true}
],
"health": "healthy",
"restart_policy": "on-failure",
"data_mounts": [
{"device": "/dev/vdb", "mountpoint": "/var/lib/app"}
],
"build_digest": "6d3e8a9f12bc"
}
}
StatusCodeDescription
401UNAUTHORIZEDAPI key is missing or invalid.
403FORBIDDENAPI key is valid but not allowed to access the endpoint.
404NOT_FOUNDNo AppVM exists with id.