A new session lists no VMs, or a VM that exists is "not found"
Check the same read with includeUnmanaged: true. A session only manages what it created or adopted, and change requests report other resources as not found. Adopt the intended resource with libvirt_resource_adopt on the right connection, then repeat the request. Cloning also needs the storage pool that holds the base VM's disk adopted.
The connection is refused or required
Check the address scheme and the connection name. Only qemu, qemu+ssh, qemu+tls, qemu+tcp, qemu+unix, lxc and test addresses are accepted, and a server that requires explicit connections needs connectionId on every request. Create the connection in the current session with libvirt_connection_create; connections from an earlier session are gone. On a socket or HTTP server, a client that disconnects keeps its session and adopted resources until 30 idle minutes pass, so other sessions cannot adopt them until then.
A request timed out or a connection dropped
Check the resource's current state before repeating anything: each call stops waiting after 30 seconds, and a retried change can already have run. Wait out a rate-limit delay, and use a batch for fleet work because it counts as one call.
A base VM refuses to start, or cloning says it must be shut off
Check the VM's role and state. A VM marked as a base starts only with force: true, and branching, phase advance and clone deletion need Shutoff. Work in a clone, or retire the clones before starting the base; request shutdown and wait for Shutoff rather than using destroy.
Creating a VM failed or its first start cannot access a file
Check the pool, the definition and the firmware file from the failed attempt before retrying under the same name. Media outside a storage pool are listed as unverified and fail at start with "Cannot access storage file"; stage them inside a pool. Firmware preparation needs an SSH connection to a remote host.
A macOS VM does not start because of passt
Check whether the VM uses the automatic network backend. Automatic VMs switch to the commandline backend and retry once. For an explicit passt choice, install passt on the host or redefine the VM with commandline.
A snapshot is refused, or deleting one kept files
Check the snapshot mode and the delete report. Memory snapshots are refused for VMs with a 3D display and internal snapshots for raw disks; take a disk-only external snapshot. Retained layers carry a reason and can still hold data, so review what uses them before removing anything.
Deleting a VM is refused or reports a disk error
Check for snapshots and checkpoints first; delete them deliberately, then the VM. A disk error after deletion means the definition is already gone: inspect the volume and remove it with volume_delete only after confirming nothing uses it as a base.
The console works but a guest service does not
Check inside the guest that SSH, RDP or Screen Sharing is enabled, and that the network gives a route: NAT guests need libvirt's default network, macvtap guests are unreachable from the host itself, and macOS uses host ports 10122 and 15900. A listen address of 0.0.0.0 is not an address to dial.
A virsh command is denied or exits non-zero
Check the denial reason or stderr. Denied and unknown commands are refused, write commands need an adopted target placed right after the subcommand, and the operator can switch the tool off. Use the typed tool the reason names.
What you getThe VM, disk or snapshot you meant, in a known state, with backing files preserved.