← 返回命令列表

Linux command

virt-qemu-run 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Run

virt-qemu-run [path/to/guest.xml]

Example

virt-qemu-run -r [path/to/directory] [path/to/guest.xml]

Example

virt-qemu-run -v [path/to/guest.xml]

Example

virt-qemu-run -h

说明

virt-qemu-run is an experimental tool to run a QEMU guest virtual machine independent of the libvirtd daemon. It provides a way to run VMs using libvirt domain XML definitions without requiring the full libvirt infrastructure. The guest runs in the foreground and the command exits when the guest shuts down. This is useful for testing, embedded use cases, or running isolated VMs without daemon overhead. Exit status is 0 on successful shutdown and non-zero on failure.

参数

-r _DIR_, --root _DIR_
Store VM state files in the specified directory. Must be removed manually after shutdown. When omitted, a temporary directory is created and cleaned up automatically when the VM exits.
-s _SECRET-XML-FILE_,_SECRET-VALUE-FILE_, --secret _SECRET-XML-FILE_,_SECRET-VALUE-FILE_
Load a secret into the secret driver. The XML file defines the secret (UUID must match one referenced in the domain XML); the value file contains the secret data. May be repeated.
-v, --verbose
Display verbose startup information.
-h, --help
Display help information.

FAQ

What is the virt-qemu-run command used for?

virt-qemu-run is an experimental tool to run a QEMU guest virtual machine independent of the libvirtd daemon. It provides a way to run VMs using libvirt domain XML definitions without requiring the full libvirt infrastructure. The guest runs in the foreground and the command exits when the guest shuts down. This is useful for testing, embedded use cases, or running isolated VMs without daemon overhead. Exit status is 0 on successful shutdown and non-zero on failure.

How do I run a basic virt-qemu-run example?

Run `virt-qemu-run [path/to/guest.xml]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -r _DIR_, --root _DIR_ do in virt-qemu-run?

Store VM state files in the specified directory. Must be removed manually after shutdown. When omitted, a temporary directory is created and cleaned up automatically when the VM exits.