← 返回命令列表

Linux command

pvesh 命令

文本

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

常用示例

Example

pvesh get /nodes

Example

pvesh get /nodes/[node_name]/[lxc|qemu]

Discover

pvesh ls /

Example

pvesh usage /pools

Add

pvesh create /storage --storage [storage_id] --vgname [volume_group] --type lvmthin --thinpool [thinpool_name] --content [content_types]

说明

pvesh provides direct command-line access to the Proxmox VE REST API. It allows querying and modifying all cluster resources including nodes, VMs, containers, storage, and users. This is useful for scripting and automation tasks. The tool mirrors the web interface's capabilities, enabling administrators to perform any operation available through the GUI from the command line or scripts.

参数

get, g
Retrieve data from API path
ls, l
List available subpaths
usage, u
Show usage information for API path
create
Create new resource at API path
set
Modify existing resource
delete
Remove resource at API path
--output-format _format_
Output format (text, json, json-pretty)

FAQ

What is the pvesh command used for?

pvesh provides direct command-line access to the Proxmox VE REST API. It allows querying and modifying all cluster resources including nodes, VMs, containers, storage, and users. This is useful for scripting and automation tasks. The tool mirrors the web interface's capabilities, enabling administrators to perform any operation available through the GUI from the command line or scripts.

How do I run a basic pvesh example?

Run `pvesh get /nodes` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does get, g do in pvesh?

Retrieve data from API path