Linux command
qm-guest 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Check
qm guest exec-status vm_id pid
Set
qm guest passwd vm_id username
Example
qm guest passwd vm_id username --crypted 1
Example
qm guest cmd vm_id fsfreeze-freeze
Execute
qm guest exec vm_id command arg1 arg2
Example
qm guest exec vm_id command --synchronous 0
Example
qm guest exec vm_id command --timeout 10
Example
qm guest exec vm_id command --pass-stdin 1
说明
qm guest interacts with the QEMU Guest Agent running inside a virtual machine. It allows executing commands, managing user accounts, and running guest agent operations like filesystem freeze/thaw for consistent backups.
参数
- cmd
- Subcommand: cmd, exec, exec-status, passwd
- vmid
- The numeric ID of the virtual machine
- --timeout _seconds_
- Timeout for command execution
- --synchronous _boolean_
- Run command synchronously (default) or asynchronously
- --pass-stdin _boolean_
- Forward stdin to the guest agent
- --crypted _boolean_
- Password is already hashed
FAQ
What is the qm-guest command used for?
qm guest interacts with the QEMU Guest Agent running inside a virtual machine. It allows executing commands, managing user accounts, and running guest agent operations like filesystem freeze/thaw for consistent backups.
How do I run a basic qm-guest example?
Run `qm guest exec-status vm_id pid` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does cmd do in qm-guest?
Subcommand: cmd, exec, exec-status, passwd