Авторские статьи

Proxmox VE API. Nodes.


/nodes



/nodes


GET
Description: Cluster node index.
Permissions:

User Permissions Description
all N/A N/A

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes
CLI pvesh get /nodes



/nodes/{node}


GET
Description: Node index.
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}
CLI pvesh get /nodes/{node}



/nodes/{node}/qemu


GET
Description: Virtual machine index (per node).
Permissions:

User Permissions Description
all N/A Only list VMs where you have VM.Audit permissons on /vms/.

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/qemu
CLI pvesh get /nodes/{node}/qemu

POST
Description: Create or restore a virtual machine.
Permissions:

User Permissions Description
all N/A You need 'VM.Allocate' permissions on /vms/{vmid} or on the VM pool /pool/{pool}. For restore (option 'archive'), it is enough if the user has 'VM.Backup' permission and the VM already exists. If you create disks you need 'Datastore.AllocateSpace' on any used storage.

Parameters:

Name Type Format Description Optional
cdrom string pve-qm-drive This is an alias for option -ide2
force boolean N/A Allow to overwrite existing VM.
boot string N/A Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).
startup string pve-startup-order Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.
agent boolean N/A Enable/disable Qemu GuestAgent.
vga string N/A Select VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use option 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrur' for other OS types. Option 'qxl' enables the SPICE display sever. You can also run without any graphic card using a serial devive as terminal.
parallel[n] string N/A Map host parallel devices (n is 0 to 2).

Note: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.

Experimental: user reported problems with this option.

numa[n] string pve-qm-numanode numa topology
keyboard string N/A Keybord layout for vnc server. Default is read from the datacenter configuration file.
watchdog string pve-qm-watchdog Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the guest will be restarted (or execute the action specified)
bootdisk string pve-qm-bootdisk Enable booting from specified disk.
sockets integer N/A The number of CPU sockets.
template boolean N/A Enable/disable Template.
net[n] string pve-qm-net Specify network devices.

MODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3

XX:XX:XX:XX:XX:XX should be an unique MAC address. This is
automatically generated if not specified.

The bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.

Option 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.

If you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:

10.0.2.2 Gateway
10.0.2.3 DNS Server
10.0.2.4 SMB Server

The DHCP server assign addresses to the guest starting from 10.0.2.15.

hotplug string pve-hotplug-features Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.
archive string N/A The backup file.
balloon integer N/A Amount of target RAM for the VM in MB. Using zero disables the ballon driver.
cpuunits integer N/A CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.

NOTE: You can disable fair-scheduler configuration by setting this to 0.

storage string pve-storage-id Default storage.
reboot boolean N/A Allow reboot. If set to '0' the VM exit on reboot.
shares integer N/A Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning
serial[n] string N/A Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).

Note: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.

Experimental: user reported problems with this option.

machine string N/A Specific the Qemu machine type.
freeze boolean N/A Freeze CPU at startup (use 'c' monitor command to start execution).
smp integer N/A The number of CPUs. Please use option -sockets instead.
tablet boolean N/A Enable/disable the usb tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned of by default if you use spice (vga=qxl).
autostart boolean N/A Automatic restart after crash (currently ignored).
lock string N/A Lock/unlock the VM.
migrate_downtime number N/A Set maximum tolerated downtime (in seconds) for migrations.
ide[n] string pve-qm-drive Use volume as IDE hard disk or CD-ROM (n is 0 to 3).
localtime boolean N/A Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.
node string pve-node The cluster node name.
memory integer N/A Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.
args string N/A Note: this option is for experts only. It allows you to pass arbitrary arguments to kvm, for example:

args: -no-reboot -no-hpet

description string N/A Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.
scsihw string N/A scsi controller model
kvm boolean N/A Enable/disable KVM hardware virtualization.
tdf boolean N/A Enable/disable time drift fix.
cpu string N/A Emulated CPU type.
protection boolean N/A Sets the protection flag of the VM. This will prevent the remove operation.
migrate_speed integer N/A Set maximum speed (in MB/s) for migrations. Value 0 is no limit.
hostpci[n] string pve-qm-hostpci Map host pci devices. HOSTPCIDEVICE syntax is:

'bus:dev.func' (hexadecimal numbers)

You can us the 'lspci' command to list existing pci devices.

The 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').

Note: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.

Experimental: user reported problems with this option.

unique boolean N/A Assign a unique random ethernet address.
pool string pve-poolid Add the VM to the specified pool.
virtio[n] string pve-qm-drive Use volume as VIRTIO hard disk (n is 0 to 15).
unused[n] string pve-volume-id Reference to unused volumes.
usb[n] string pve-qm-usb-device Configure an USB device (n is 0 to 4). This can be used to
pass-through usb devices to the guest. HOSTUSBDEVICE syntax is:

'bus-port(.port)*' (decimal numbers) or
'vendor_id:product_id' (hexadeciaml numbers)

You can use the 'lsusb -t' command to list existing usb devices.

Note: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.

The value 'spice' can be used to add a usb redirection devices for spice.

name string dns-name Set a name for the VM. Only used on the configuration web interface.
startdate string N/A Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.
vmid integer pve-vmid The (unique) ID of the VM.
scsi[n] string pve-qm-drive Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).
acpi boolean N/A Enable/disable ACPI.
vcpus integer N/A Number of hotplugged vcpus.
ostype string N/A Used to enable special optimization/features for specific
operating systems:

other => unspecified OS
wxp => Microsoft Windows XP
w2k => Microsoft Windows 2000
w2k3 => Microsoft Windows 2003
w2k8 => Microsoft Windows 2008
wvista => Microsoft Windows Vista
win7 => Microsoft Windows 7
win8 => Microsoft Windows 8/2012
l24 => Linux 2.4 Kernel
l26 => Linux 2.6/3.X Kernel
solaris => solaris/opensolaris/openindiania kernel

other|l24|l26|solaris ... no special behaviour
wxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch

cores integer N/A The number of cores per socket.
cpulimit number N/A Limit of CPU usage. Note if the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.
sata[n] string pve-qm-drive Use volume as SATA hard disk or CD-ROM (n is 0 to 5).
onboot boolean N/A Specifies whether a VM will be started during system bootup.
numa boolean N/A Enable/disable Numa.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu
CLI pvesh create /nodes/{node}/qemu



/nodes/{node}/qemu/{vmid}


GET
Description: Directory index
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional
subdir string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}
CLI pvesh get /nodes/{node}/qemu/{vmid}

DELETE
Description: Destroy the vm (also delete all used/owned volumes).
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Allocate']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
skiplock boolean N/A Ignore locks - only root is allowed to use this option.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
string
Usage:
HTTP DELETE /api2/json/nodes/{node}/qemu/{vmid}
CLI pvesh delete /nodes/{node}/qemu/{vmid}



/nodes/{node}/qemu/{vmid}/firewall


GET
Description: Directory index.
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/firewall
CLI pvesh get /nodes/{node}/qemu/{vmid}/firewall



/nodes/{node}/qemu/{vmid}/firewall/rules


GET
Description: List rules.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional
pos integer N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/firewall/rules
CLI pvesh get /nodes/{node}/qemu/{vmid}/firewall/rules

POST
Description: Create new rule.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
node string pve-node The cluster node name.
iface string pve-iface Network interface name.
proto string pve-fw-protocol-spec N/A
dest string pve-fw-addr-spec N/A
macro string N/A N/A
vmid integer pve-vmid The (unique) ID of the VM.
pos integer N/A Update rule at position
.
action string N/A Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.
enable integer N/A N/A
source string pve-fw-addr-spec N/A
dport string pve-fw-port-spec N/A
sport string pve-fw-port-spec N/A
type string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/firewall/rules
CLI pvesh create /nodes/{node}/qemu/{vmid}/firewall/rules



/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}


GET
Description: Get single rule data.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
pos integer N/A Update rule at position
.

Return:
object

Name Type Format Description Optional
pos integer N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}
CLI pvesh get /nodes/{node}/qemu/{vmid}/firewall/rules/{pos}

PUT
Description: Modify rule data.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
comment string N/A N/A
moveto integer N/A Move rule to new position . Other arguments are ignored.
iface string pve-iface Network interface name.
proto string pve-fw-protocol-spec N/A
dest string pve-fw-addr-spec N/A
macro string N/A N/A
vmid integer pve-vmid The (unique) ID of the VM.
pos integer N/A Update rule at position
.
action string N/A Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.
enable integer N/A N/A
source string pve-fw-addr-spec N/A
dport string pve-fw-port-spec N/A
sport string pve-fw-port-spec N/A
type string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}
CLI pvesh set /nodes/{node}/qemu/{vmid}/firewall/rules/{pos}

DELETE
Description: Delete rule.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
pos integer N/A Update rule at position
.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}
CLI pvesh delete /nodes/{node}/qemu/{vmid}/firewall/rules/{pos}



/nodes/{node}/qemu/{vmid}/firewall/aliases


GET
Description: List aliases
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional
comment string N/A N/A
cidr string N/A N/A
name string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/firewall/aliases
CLI pvesh get /nodes/{node}/qemu/{vmid}/firewall/aliases

POST
Description: Create IP or Network Alias.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
node string pve-node The cluster node name.
cidr string IPorCIDR Network/IP specification in CIDR format.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A Alias name.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/firewall/aliases
CLI pvesh create /nodes/{node}/qemu/{vmid}/firewall/aliases



/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}


GET
Description: Read alias.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A Alias name.

Return:
object
Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}
CLI pvesh get /nodes/{node}/qemu/{vmid}/firewall/aliases/{name}

PUT
Description: Update IP or Network alias.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
rename string N/A Rename an existing alias.
node string pve-node The cluster node name.
name string N/A Alias name.
vmid integer pve-vmid The (unique) ID of the VM.
comment string N/A N/A
cidr string IPorCIDR Network/IP specification in CIDR format.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}
CLI pvesh set /nodes/{node}/qemu/{vmid}/firewall/aliases/{name}

DELETE
Description: Remove IP or Network alias.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A Alias name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}
CLI pvesh delete /nodes/{node}/qemu/{vmid}/firewall/aliases/{name}



/nodes/{node}/qemu/{vmid}/firewall/ipset


GET
Description: List IPSets
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional
comment string N/A N/A
name string N/A IP set name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/firewall/ipset
CLI pvesh get /nodes/{node}/qemu/{vmid}/firewall/ipset

POST
Description: Create new IPSet
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
rename string N/A Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.
node string pve-node The cluster node name.
name string N/A IP set name.
vmid integer pve-vmid The (unique) ID of the VM.
comment string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/firewall/ipset
CLI pvesh create /nodes/{node}/qemu/{vmid}/firewall/ipset



/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}


GET
Description: List IPSet content
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A IP set name.

Return:
array

Name Type Format Description Optional
comment string N/A N/A
cidr string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
nomatch boolean N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}
CLI pvesh get /nodes/{node}/qemu/{vmid}/firewall/ipset/{name}

POST
Description: Add IP or Network to IPSet.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
node string pve-node The cluster node name.
name string N/A IP set name.
vmid integer pve-vmid The (unique) ID of the VM.
nomatch boolean N/A N/A
cidr string IPorCIDRorAlias Network/IP specification in CIDR format.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}
CLI pvesh create /nodes/{node}/qemu/{vmid}/firewall/ipset/{name}

DELETE
Description: Delete IPSet
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A IP set name.

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}
CLI pvesh delete /nodes/{node}/qemu/{vmid}/firewall/ipset/{name}



/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}


GET
Description: Read IP or Network settings from IPSet.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
cidr string IPorCIDRorAlias Network/IP specification in CIDR format.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A IP set name.

Return:
object
Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}
CLI pvesh get /nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}

PUT
Description: Update IP or Network settings
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
comment string N/A N/A
name string N/A IP set name.
vmid integer pve-vmid The (unique) ID of the VM.
nomatch boolean N/A N/A
cidr string IPorCIDRorAlias Network/IP specification in CIDR format.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}
CLI pvesh set /nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}

DELETE
Description: Remove IP or Network from IPSet.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
cidr string IPorCIDRorAlias Network/IP specification in CIDR format.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A IP set name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}
CLI pvesh delete /nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}



/nodes/{node}/qemu/{vmid}/firewall/options


GET
Description: Get VM firewall options.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
object

Name Type Format Description Optional
policy_out string N/A Output policy.
enable boolean N/A Enable host firewall rules.
macfilter boolean N/A Enable/disable MAC address filter.
log_level_in string N/A Log level for incoming traffic.
policy_in string N/A Input policy.
log_level_out string N/A Log level for outgoing traffic.
dhcp boolean N/A Enable DHCP.

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/firewall/options
CLI pvesh get /nodes/{node}/qemu/{vmid}/firewall/options

PUT
Description: Set Firewall options.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
policy_out string N/A Output policy.
enable boolean N/A Enable host firewall rules.
macfilter boolean N/A Enable/disable MAC address filter.
log_level_in string N/A Log level for incoming traffic.
vmid integer pve-vmid The (unique) ID of the VM.
policy_in string N/A Input policy.
log_level_out string N/A Log level for outgoing traffic.
dhcp boolean N/A Enable DHCP.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/qemu/{vmid}/firewall/options
CLI pvesh set /nodes/{node}/qemu/{vmid}/firewall/options



/nodes/{node}/qemu/{vmid}/firewall/log


GET
Description: Read firewall log
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Console']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
start integer N/A N/A
vmid integer pve-vmid The (unique) ID of the VM.
limit integer N/A N/A

Return:
array

Name Type Format Description Optional
t string N/A Line text
n integer N/A Line number

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/firewall/log
CLI pvesh get /nodes/{node}/qemu/{vmid}/firewall/log



/nodes/{node}/qemu/{vmid}/firewall/refs


GET
Description: Lists possible IPSet/Alias reference which are allowed in source/dest properties.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
type string N/A Only list references of specified type.

Return:
array

Name Type Format Description Optional
comment string N/A N/A
type string N/A N/A
name string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/firewall/refs
CLI pvesh get /nodes/{node}/qemu/{vmid}/firewall/refs



/nodes/{node}/qemu/{vmid}/status


GET
Description: Directory index
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional
subdir string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/status
CLI pvesh get /nodes/{node}/qemu/{vmid}/status



/nodes/{node}/qemu/{vmid}/status/current


GET
Description: Get virtual machine status.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
object
Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/status/current
CLI pvesh get /nodes/{node}/qemu/{vmid}/status/current



/nodes/{node}/qemu/{vmid}/status/start


POST
Description: Start virtual machine.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.PowerMgmt']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
migratedfrom string pve-node The cluster node name.
stateuri string N/A Some command save/restore state from this location.
vmid integer pve-vmid The (unique) ID of the VM.
machine string N/A Specific the Qemu machine type.
skiplock boolean N/A Ignore locks - only root is allowed to use this option.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/status/start
CLI pvesh create /nodes/{node}/qemu/{vmid}/status/start



/nodes/{node}/qemu/{vmid}/status/stop


POST
Description: Stop virtual machine.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.PowerMgmt']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
migratedfrom string pve-node The cluster node name.
keepActive boolean N/A Do not decativate storage volumes.
vmid integer pve-vmid The (unique) ID of the VM.
timeout integer N/A Wait maximal timeout seconds.
skiplock boolean N/A Ignore locks - only root is allowed to use this option.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/status/stop
CLI pvesh create /nodes/{node}/qemu/{vmid}/status/stop



/nodes/{node}/qemu/{vmid}/status/reset


POST
Description: Reset virtual machine.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.PowerMgmt']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
skiplock boolean N/A Ignore locks - only root is allowed to use this option.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/status/reset
CLI pvesh create /nodes/{node}/qemu/{vmid}/status/reset



/nodes/{node}/qemu/{vmid}/status/shutdown


POST
Description: Shutdown virtual machine.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.PowerMgmt']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
keepActive boolean N/A Do not decativate storage volumes.
vmid integer pve-vmid The (unique) ID of the VM.
forceStop boolean N/A Make sure the VM stops.
timeout integer N/A Wait maximal timeout seconds.
skiplock boolean N/A Ignore locks - only root is allowed to use this option.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/status/shutdown
CLI pvesh create /nodes/{node}/qemu/{vmid}/status/shutdown



/nodes/{node}/qemu/{vmid}/status/suspend


POST
Description: Suspend virtual machine.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.PowerMgmt']] N/A

Parameters:

Name Type Format Description Optional
skiplock boolean N/A Ignore locks - only root is allowed to use this option.
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/status/suspend
CLI pvesh create /nodes/{node}/qemu/{vmid}/status/suspend



/nodes/{node}/qemu/{vmid}/status/resume


POST
Description: Resume virtual machine.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.PowerMgmt']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
skiplock boolean N/A Ignore locks - only root is allowed to use this option.
vmid integer pve-vmid The (unique) ID of the VM.
nocheck boolean N/A N/A

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/status/resume
CLI pvesh create /nodes/{node}/qemu/{vmid}/status/resume



/nodes/{node}/qemu/{vmid}/snapshot


GET
Description: List all snapshots.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/snapshot
CLI pvesh get /nodes/{node}/qemu/{vmid}/snapshot

POST
Description: Snapshot a VM.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Snapshot']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
description string N/A A textual description or comment.
vmid integer pve-vmid The (unique) ID of the VM.
snapname string pve-configid The name of the snapshot.
vmstate boolean N/A Save the vmstate

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/snapshot
CLI pvesh create /nodes/{node}/qemu/{vmid}/snapshot



/nodes/{node}/qemu/{vmid}/snapshot/{snapname}


GET
Description:
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
snapname string pve-configid The name of the snapshot.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/snapshot/{snapname}
CLI pvesh get /nodes/{node}/qemu/{vmid}/snapshot/{snapname}

DELETE
Description: Delete a VM snapshot.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Snapshot']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
force boolean N/A For removal from config file, even if removing disk snapshots fails.
snapname string pve-configid The name of the snapshot.

Return:
string
Usage:
HTTP DELETE /api2/json/nodes/{node}/qemu/{vmid}/snapshot/{snapname}
CLI pvesh delete /nodes/{node}/qemu/{vmid}/snapshot/{snapname}



/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config


GET
Description: Get snapshot configuration
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Snapshot']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
snapname string pve-configid The name of the snapshot.

Return:
object
Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config
CLI pvesh get /nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config

PUT
Description: Update snapshot metadata.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Snapshot']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
snapname string pve-configid The name of the snapshot.
description string N/A A textual description or comment.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config
CLI pvesh set /nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config



/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback


POST
Description: Rollback VM state to specified snapshot.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Snapshot']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
snapname string pve-configid The name of the snapshot.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback
CLI pvesh create /nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback



/nodes/{node}/qemu/{vmid}/rrd


GET
Description: Read VM RRD statistics (returns PNG)
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
ds string pve-configid-list The list of datasources you want to display.
cf string N/A The RRD consolidation function
timeframe string N/A Specify the time frame you are interested in.

Return:
object

Name Type Format Description Optional
filename string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/rrd
CLI pvesh get /nodes/{node}/qemu/{vmid}/rrd



/nodes/{node}/qemu/{vmid}/rrddata


GET
Description: Read VM RRD statistics
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
cf string N/A The RRD consolidation function
timeframe string N/A Specify the time frame you are interested in.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/rrddata
CLI pvesh get /nodes/{node}/qemu/{vmid}/rrddata



/nodes/{node}/qemu/{vmid}/config


GET
Description: Get current virtual machine configuration. This does not include pending configuration changes (see 'pending' API).
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
current boolean N/A Get current values (instead of pending values).
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
object

Name Type Format Description Optional
digest string N/A SHA1 digest of configuration file. This can be used to prevent concurrent modifications.

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/config
CLI pvesh get /nodes/{node}/qemu/{vmid}/config

PUT
Description: Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Disk', u'VM.Config.CDROM', u'VM.Config.CPU', u'VM.Config.Memory', u'VM.Config.Network', u'VM.Config.HWType', u'VM.Config.Options'], u'any', 1] N/A

Parameters:

Name Type Format Description Optional
revert string pve-configid-list Revert a pending change.
force boolean N/A Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.
net[n] string pve-qm-net Specify network devices.

MODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3

XX:XX:XX:XX:XX:XX should be an unique MAC address. This is
automatically generated if not specified.

The bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.

Option 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.

If you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:

10.0.2.2 Gateway
10.0.2.3 DNS Server
10.0.2.4 SMB Server

The DHCP server assign addresses to the guest starting from 10.0.2.15.

lock string N/A Lock/unlock the VM.
numa boolean N/A Enable/disable Numa.
startup string pve-startup-order Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.
hotplug string pve-hotplug-features Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.
vga string N/A Select VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use option 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrur' for other OS types. Option 'qxl' enables the SPICE display sever. You can also run without any graphic card using a serial devive as terminal.
parallel[n] string N/A Map host parallel devices (n is 0 to 2).

Note: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.

Experimental: user reported problems with this option.

numa[n] string pve-qm-numanode numa topology
migrate_speed integer N/A Set maximum speed (in MB/s) for migrations. Value 0 is no limit.
keyboard string N/A Keybord layout for vnc server. Default is read from the datacenter configuration file.
watchdog string pve-qm-watchdog Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the guest will be restarted (or execute the action specified)
smp integer N/A The number of CPUs. Please use option -sockets instead.
hostpci[n] string pve-qm-hostpci Map host pci devices. HOSTPCIDEVICE syntax is:

'bus:dev.func' (hexadecimal numbers)

You can us the 'lspci' command to list existing pci devices.

The 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').

Note: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.

Experimental: user reported problems with this option.

sockets integer N/A The number of CPU sockets.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
startdate string N/A Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.
tablet boolean N/A Enable/disable the usb tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned of by default if you use spice (vga=qxl).
balloon integer N/A Amount of target RAM for the VM in MB. Using zero disables the ballon driver.
scsihw string N/A scsi controller model
boot string N/A Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).
reboot boolean N/A Allow reboot. If set to '0' the VM exit on reboot.
shares integer N/A Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning
serial[n] string N/A Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).

Note: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.

Experimental: user reported problems with this option.

machine string N/A Specific the Qemu machine type.
template boolean N/A Enable/disable Template.
memory integer N/A Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.
migrate_downtime number N/A Set maximum tolerated downtime (in seconds) for migrations.
ide[n] string pve-qm-drive Use volume as IDE hard disk or CD-ROM (n is 0 to 3).
localtime boolean N/A Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.
node string pve-node The cluster node name.
scsi[n] string pve-qm-drive Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).
args string N/A Note: this option is for experts only. It allows you to pass arbitrary arguments to kvm, for example:

args: -no-reboot -no-hpet

onboot boolean N/A Specifies whether a VM will be started during system bootup.
description string N/A Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.
cpuunits integer N/A CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.

NOTE: You can disable fair-scheduler configuration by setting this to 0.

kvm boolean N/A Enable/disable KVM hardware virtualization.
tdf boolean N/A Enable/disable time drift fix.
ostype string N/A Used to enable special optimization/features for specific
operating systems:

other => unspecified OS
wxp => Microsoft Windows XP
w2k => Microsoft Windows 2000
w2k3 => Microsoft Windows 2003
w2k8 => Microsoft Windows 2008
wvista => Microsoft Windows Vista
win7 => Microsoft Windows 7
win8 => Microsoft Windows 8/2012
l24 => Linux 2.4 Kernel
l26 => Linux 2.6/3.X Kernel
solaris => solaris/opensolaris/openindiania kernel

other|l24|l26|solaris ... no special behaviour
wxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch

protection boolean N/A Sets the protection flag of the VM. This will prevent the remove operation.
agent boolean N/A Enable/disable Qemu GuestAgent.
cdrom string pve-qm-drive This is an alias for option -ide2
freeze boolean N/A Freeze CPU at startup (use 'c' monitor command to start execution).
virtio[n] string pve-qm-drive Use volume as VIRTIO hard disk (n is 0 to 15).
cpulimit number N/A Limit of CPU usage. Note if the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.
usb[n] string pve-qm-usb-device Configure an USB device (n is 0 to 4). This can be used to
pass-through usb devices to the guest. HOSTUSBDEVICE syntax is:

'bus-port(.port)*' (decimal numbers) or
'vendor_id:product_id' (hexadeciaml numbers)

You can use the 'lsusb -t' command to list existing usb devices.

Note: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.

The value 'spice' can be used to add a usb redirection devices for spice.

name string dns-name Set a name for the VM. Only used on the configuration web interface.
autostart boolean N/A Automatic restart after crash (currently ignored).
vmid integer pve-vmid The (unique) ID of the VM.
bootdisk string pve-qm-bootdisk Enable booting from specified disk.
acpi boolean N/A Enable/disable ACPI.
vcpus integer N/A Number of hotplugged vcpus.
skiplock boolean N/A Ignore locks - only root is allowed to use this option.
cores integer N/A The number of cores per socket.
unused[n] string pve-volume-id Reference to unused volumes.
sata[n] string pve-qm-drive Use volume as SATA hard disk or CD-ROM (n is 0 to 5).
cpu string N/A Emulated CPU type.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/qemu/{vmid}/config
CLI pvesh set /nodes/{node}/qemu/{vmid}/config

POST
Description: Set virtual machine options (asynchrounous API).
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Disk', u'VM.Config.CDROM', u'VM.Config.CPU', u'VM.Config.Memory', u'VM.Config.Network', u'VM.Config.HWType', u'VM.Config.Options'], u'any', 1] N/A

Parameters:

Name Type Format Description Optional
cdrom string pve-qm-drive This is an alias for option -ide2
revert string pve-configid-list Revert a pending change.
force boolean N/A Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.
background_delay integer N/A Time to wait for the task to finish. We return 'null' if the task finish within that time.
startup string pve-startup-order Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.
migrate_speed integer N/A Set maximum speed (in MB/s) for migrations. Value 0 is no limit.
freeze boolean N/A Freeze CPU at startup (use 'c' monitor command to start execution).
parallel[n] string N/A Map host parallel devices (n is 0 to 2).

Note: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.

Experimental: user reported problems with this option.

numa[n] string pve-qm-numanode numa topology
keyboard string N/A Keybord layout for vnc server. Default is read from the datacenter configuration file.
watchdog string pve-qm-watchdog Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the guest will be restarted (or execute the action specified)
bootdisk string pve-qm-bootdisk Enable booting from specified disk.
sockets integer N/A The number of CPU sockets.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
template boolean N/A Enable/disable Template.
net[n] string pve-qm-net Specify network devices.

MODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3

XX:XX:XX:XX:XX:XX should be an unique MAC address. This is
automatically generated if not specified.

The bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.

Option 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.

If you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:

10.0.2.2 Gateway
10.0.2.3 DNS Server
10.0.2.4 SMB Server

The DHCP server assign addresses to the guest starting from 10.0.2.15.

delete string pve-configid-list A list of settings you want to delete.
tablet boolean N/A Enable/disable the usb tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned of by default if you use spice (vga=qxl).
cpu string N/A Emulated CPU type.
balloon integer N/A Amount of target RAM for the VM in MB. Using zero disables the ballon driver.
cpuunits integer N/A CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.

NOTE: You can disable fair-scheduler configuration by setting this to 0.

boot string N/A Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).
reboot boolean N/A Allow reboot. If set to '0' the VM exit on reboot.
shares integer N/A Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning
smp integer N/A The number of CPUs. Please use option -sockets instead.
machine string N/A Specific the Qemu machine type.
migrate_downtime number N/A Set maximum tolerated downtime (in seconds) for migrations.
autostart boolean N/A Automatic restart after crash (currently ignored).
lock string N/A Lock/unlock the VM.
acpi boolean N/A Enable/disable ACPI.
ide[n] string pve-qm-drive Use volume as IDE hard disk or CD-ROM (n is 0 to 3).
localtime boolean N/A Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.
node string pve-node The cluster node name.
memory integer N/A Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.
args string N/A Note: this option is for experts only. It allows you to pass arbitrary arguments to kvm, for example:

args: -no-reboot -no-hpet

description string N/A Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.
scsihw string N/A scsi controller model
kvm boolean N/A Enable/disable KVM hardware virtualization.
tdf boolean N/A Enable/disable time drift fix.
skiplock boolean N/A Ignore locks - only root is allowed to use this option.
protection boolean N/A Sets the protection flag of the VM. This will prevent the remove operation.
agent boolean N/A Enable/disable Qemu GuestAgent.
serial[n] string N/A Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).

Note: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.

Experimental: user reported problems with this option.

hostpci[n] string pve-qm-hostpci Map host pci devices. HOSTPCIDEVICE syntax is:

'bus:dev.func' (hexadecimal numbers)

You can us the 'lspci' command to list existing pci devices.

The 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').

Note: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.

Experimental: user reported problems with this option.

virtio[n] string pve-qm-drive Use volume as VIRTIO hard disk (n is 0 to 15).
unused[n] string pve-volume-id Reference to unused volumes.
usb[n] string pve-qm-usb-device Configure an USB device (n is 0 to 4). This can be used to
pass-through usb devices to the guest. HOSTUSBDEVICE syntax is:

'bus-port(.port)*' (decimal numbers) or
'vendor_id:product_id' (hexadeciaml numbers)

You can use the 'lsusb -t' command to list existing usb devices.

Note: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.

The value 'spice' can be used to add a usb redirection devices for spice.

name string dns-name Set a name for the VM. Only used on the configuration web interface.
startdate string N/A Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.
vmid integer pve-vmid The (unique) ID of the VM.
scsi[n] string pve-qm-drive Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).
vga string N/A Select VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use option 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrur' for other OS types. Option 'qxl' enables the SPICE display sever. You can also run without any graphic card using a serial devive as terminal.
vcpus integer N/A Number of hotplugged vcpus.
ostype string N/A Used to enable special optimization/features for specific
operating systems:

other => unspecified OS
wxp => Microsoft Windows XP
w2k => Microsoft Windows 2000
w2k3 => Microsoft Windows 2003
w2k8 => Microsoft Windows 2008
wvista => Microsoft Windows Vista
win7 => Microsoft Windows 7
win8 => Microsoft Windows 8/2012
l24 => Linux 2.4 Kernel
l26 => Linux 2.6/3.X Kernel
solaris => solaris/opensolaris/openindiania kernel

other|l24|l26|solaris ... no special behaviour
wxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch

cores integer N/A The number of cores per socket.
hotplug string pve-hotplug-features Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.
cpulimit number N/A Limit of CPU usage. Note if the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.
sata[n] string pve-qm-drive Use volume as SATA hard disk or CD-ROM (n is 0 to 5).
onboot boolean N/A Specifies whether a VM will be started during system bootup.
numa boolean N/A Enable/disable Numa.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/config
CLI pvesh create /nodes/{node}/qemu/{vmid}/config



/nodes/{node}/qemu/{vmid}/pending


GET
Description: Get virtual machine configuration, including pending changes.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional
value string N/A Current value.
key string N/A Configuration option name.
pending string N/A Pending value.
delete integer N/A Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request.

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/pending
CLI pvesh get /nodes/{node}/qemu/{vmid}/pending



/nodes/{node}/qemu/{vmid}/unlink


PUT
Description: Unlink/delete disk images.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Disk']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
force boolean N/A Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.
vmid integer pve-vmid The (unique) ID of the VM.
idlist string pve-configid-list A list of disk IDs you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/qemu/{vmid}/unlink
CLI pvesh set /nodes/{node}/qemu/{vmid}/unlink



/nodes/{node}/qemu/{vmid}/vncproxy


POST
Description: Creates a TCP VNC proxy connections.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Console']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
websocket boolean N/A starts websockify instead of vncproxy
vmid integer pve-vmid The (unique) ID of the VM.

Return:

Name Type Format Description Optional
ticket string N/A N/A
cert string N/A N/A
upid string N/A N/A
port integer N/A N/A
user string N/A N/A

Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/vncproxy
CLI pvesh create /nodes/{node}/qemu/{vmid}/vncproxy



/nodes/{node}/qemu/{vmid}/vncwebsocket


GET
Description: Opens a weksocket for VNC traffic.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Console']] You also need to pass a valid ticket (vncticket).

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
port integer N/A Port number returned by previous vncproxy call.
vncticket string N/A Ticket from previous call to vncproxy.

Return:
object

Name Type Format Description Optional
port string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/vncwebsocket
CLI pvesh get /nodes/{node}/qemu/{vmid}/vncwebsocket



/nodes/{node}/qemu/{vmid}/spiceproxy


POST
Description: Returns a SPICE configuration to connect to the VM.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Console']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
proxy string address SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).

Return:

Name Type Format Description Optional
host string N/A N/A
password string N/A N/A
type string N/A N/A
proxy string N/A N/A
tls-port integer N/A N/A

Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/spiceproxy
CLI pvesh create /nodes/{node}/qemu/{vmid}/spiceproxy



/nodes/{node}/qemu/{vmid}/sendkey


PUT
Description: Send key event to virtual machine.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Console']] N/A

Parameters:

Name Type Format Description Optional
skiplock boolean N/A Ignore locks - only root is allowed to use this option.
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
key string N/A The key (qemu monitor encoding).

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/qemu/{vmid}/sendkey
CLI pvesh set /nodes/{node}/qemu/{vmid}/sendkey



/nodes/{node}/qemu/{vmid}/feature


GET
Description: Check if feature for virtual machine is available.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
feature string N/A Feature to check.
snapname string pve-configid The name of the snapshot.

Return:
object

Name Type Format Description Optional
hasFeature boolean N/A N/A
nodes array N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/qemu/{vmid}/feature
CLI pvesh get /nodes/{node}/qemu/{vmid}/feature



/nodes/{node}/qemu/{vmid}/clone


POST
Description: Create a copy of virtual machine/template.
Permissions:

User Permissions Description
N/A [u'and', [u'perm', u'/vms/{vmid}', [u'VM.Clone']], [u'or', [u'perm', u'/vms/{newid}', [u'VM.Allocate']], [u'perm', u'/pool/{pool}', [u'VM.Allocate'], u'require_param', u'pool']]] You need 'VM.Clone' permissions on /vms/{vmid}, and 'VM.Allocate' permissions on /vms/{newid} (or on the VM pool /pool/{pool}). You also need 'Datastore.AllocateSpace' on any used storage.

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
full boolean N/A Create a full copy of all disk. This is always done when you clone a normal VM. For VM templates, we try to create a linked clone by default.
description string N/A Description for the new VM.
format string N/A Target format for file storage.
vmid integer pve-vmid The (unique) ID of the VM.
storage string pve-storage-id Target storage for full clone.
snapname string pve-configid The name of the snapshot.
newid integer pve-vmid VMID for the clone.
target string pve-node Target node. Only allowed if the original VM is on shared storage.
pool string pve-poolid Add the new VM to the specified pool.
name string dns-name Set a name for the new VM.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/clone
CLI pvesh create /nodes/{node}/qemu/{vmid}/clone



/nodes/{node}/qemu/{vmid}/move_disk


POST
Description: Move volume to different storage.
Permissions:

User Permissions Description
N/A [u'and', [u'perm', u'/vms/{vmid}', [u'VM.Config.Disk']], [u'perm', u'/storage/{storage}', [u'Datastore.AllocateSpace']]] You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage.

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
format string N/A Target Format.
vmid integer pve-vmid The (unique) ID of the VM.
storage string pve-storage-id Target storage.
disk string N/A The disk you want to move.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
delete boolean N/A Delete the original disk after successful copy. By default the original disk is kept as unused disk.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/move_disk
CLI pvesh create /nodes/{node}/qemu/{vmid}/move_disk



/nodes/{node}/qemu/{vmid}/migrate


POST
Description: Migrate virtual machine. Creates a new migration task.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Migrate']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
force boolean N/A Allow to migrate VMs which use local devices. Only root may use this option.
target string pve-node Target node.
online boolean N/A Use online/live migration.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/migrate
CLI pvesh create /nodes/{node}/qemu/{vmid}/migrate



/nodes/{node}/qemu/{vmid}/monitor


POST
Description: Execute Qemu monitor commands.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Monitor']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
command string N/A The monitor command.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/monitor
CLI pvesh create /nodes/{node}/qemu/{vmid}/monitor



/nodes/{node}/qemu/{vmid}/resize


PUT
Description: Extend volume size.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Disk']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
skiplock boolean N/A Ignore locks - only root is allowed to use this option.
disk string N/A The disk you want to resize.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
size string N/A The new size. With the '+' sign the value is added to the actual size of the volume and without it, the value is taken as an absolute one. Shrinking disk size is not supported.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/qemu/{vmid}/resize
CLI pvesh set /nodes/{node}/qemu/{vmid}/resize



/nodes/{node}/qemu/{vmid}/template


POST
Description: Create a Template.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Allocate']] You need 'VM.Allocate' permissions on /vms/{vmid}

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
disk string N/A If you want to convert only 1 disk to base image.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/qemu/{vmid}/template
CLI pvesh create /nodes/{node}/qemu/{vmid}/template



/nodes/{node}/lxc


GET
Description: LXC container index (per node).
Permissions:

User Permissions Description
all N/A Only list CTs where you have VM.Audit permissons on /vms/.

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/lxc
CLI pvesh get /nodes/{node}/lxc

POST
Description: Create or restore a container.
Permissions:

User Permissions Description
all N/A You need 'VM.Allocate' permissions on /vms/{vmid} or on the VM pool /pool/{pool}. For restore, it is enough if the user has 'VM.Backup' permission and the VM already exists. You also need 'Datastore.AllocateSpace' permissions on the storage.

Parameters:

Name Type Format Description Optional
restore boolean N/A Mark this as restore task.
tty integer N/A Specify the number of tty available to the container
force boolean N/A Allow to overwrite existing container.
cmode string N/A Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login).
lock string N/A Lock/unlock the VM.
startup string pve-startup-order Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.
ostemplate string N/A The OS template or backup file.
net[n] string {u'gw': {u'format_description': u'GatewayIPv4', u'optional': 1, u'type': u'string', u'description': u'Default gateway for IPv4 traffic.', u'format': u'ipv4'}, u'bridge': {u'format_description': u'vmbr', u'pattern': u'[-_.\\w\\d]+', u'type': u'string', u'description': u'Bridge to attach the network device to.', u'optional': 1}, u'gw6': {u'format_description': u'GatewayIPv6', u'type': u'string', u'optional': 1, u'description': u'Default gateway for IPv6 traffic.', u'format': u'ipv6'}, u'name': {u'format_description': u'String', u'pattern': u'[-_.\\w\\d]+', u'type': u'string', u'description': u'Name of the network device as seen from inside the container. (lxc.network.name)'}, u'firewall': {u'format_description': u'[1|0]', u'type': u'boolean', u'optional': 1, u'description': u"Controls whether this interface's firewall rules should be used."}, u'ip': {u'format_description': u'IPv4Format/CIDR', u'type': u'string', u'optional': 1, u'description': u'IPv4 address in CIDR format.', u'format': u'pve-ipv4-config'}, u'mtu': {u'format_description': u'Number', u'optional': 1, u'minimum': 64, u'type': u'integer', u'description': u'Maximum transfer unit of the interface. (lxc.network.mtu)'}, u'tag': {u'description': u'VLAN tag foro this interface.', u'optional': 1, u'maximum': u'4094', u'minimum': u'2', u'format_description': u'VlanNo', u'type': u'integer'}, u'ip6': {u'format_description': u'IPv6Format/CIDR', u'optional': 1, u'type': u'string', u'description': u'IPv6 address in CIDR format.', u'format': u'pve-ipv6-config'}, u'hwaddr': {u'format_description': u'MAC', u'pattern': u'(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})', u'optional': 1, u'description': u'Bridge to attach the network device to. (lxc.network.hwaddr)', u'type': u'string'}, u'type': {u'optional': 1, u'enum': [u'veth'], u'type': u'string', u'description': u'Network interface type.'}} Specifies network interfaces for the container.
searchdomain string dns-name-list Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver.
hostname string dns-name Set a host name for the container.
storage string pve-storage-id Default Storage.
swap integer N/A Amount of SWAP for the VM in MB.
template boolean N/A Enable/disable Template.
memory integer N/A Amount of RAM for the VM in MB.
node string pve-node The cluster node name.
description string N/A Container description. Only used on the configuration web interface.
cpuunits integer N/A CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.

NOTE: You can disable fair-scheduler configuration by setting this to 0.

protection boolean N/A Sets the protection flag of the container. This will prevent the remove operation. This will prevent the CT or CT's disk remove/update operation.
console boolean N/A Attach a console device (/dev/console) to the container.
password string N/A Sets root password inside container.
arch string N/A OS architecture type.
pool string pve-poolid Add the VM to the specified pool.
rootfs string {u'volume': {u'format_description': u'volume', u'default_key': 1, u'type': u'string', u'description': u'Volume, device or directory to mount into the container.'}, u'backup': {u'format_description': u'[1|0]', u'type': u'boolean', u'optional': 1, u'description': u'Whether to include the mountpoint in backups.'}, u'size': {u'format_description': u'DiskSize', u'type': u'string', u'optional': 1, u'description': u'Volume size (read only value).', u'format': u'disk-size'}} Use volume as container root.
cpulimit number N/A Limit of CPU usage. Note if the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.
mp[n] string {u'volume': {u'format_description': u'volume', u'default_key': 1, u'type': u'string', u'description': u'Volume, device or directory to mount into the container.'}, u'backup': {u'format_description': u'[1|0]', u'type': u'boolean', u'optional': 1, u'description': u'Whether to include the mountpoint in backups.'}, u'mp': {u'format_description': u'Path', u'type': u'string', u'optional': 1, u'description': u'Path to the mountpoint as seen from inside the container.'}, u'size': {u'format_description': u'DiskSize', u'type': u'string', u'optional': 1, u'description': u'Volume size (read only value).', u'format': u'disk-size'}} Use volume as container mount point (experimental feature).
vmid integer pve-vmid The (unique) ID of the VM.
ostype string N/A OS type. Corresponds to lxc setup scripts in /usr/share/lxc/config/.common.conf.
nameserver string address-list Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver.
unused[n] string pve-volume-id Reference to unused volumes.
onboot boolean N/A Specifies whether a VM will be started during system bootup.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/lxc
CLI pvesh create /nodes/{node}/lxc



/nodes/{node}/lxc/{vmid}


GET
Description: Directory index
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional
subdir string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}
CLI pvesh get /nodes/{node}/lxc/{vmid}

DELETE
Description: Destroy the container (also delete all uses files).
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Allocate']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
string
Usage:
HTTP DELETE /api2/json/nodes/{node}/lxc/{vmid}
CLI pvesh delete /nodes/{node}/lxc/{vmid}



/nodes/{node}/lxc/{vmid}/config


GET
Description: Get container configuration.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
object

Name Type Format Description Optional
digest string N/A SHA1 digest of configuration file. This can be used to prevent concurrent modifications.

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/config
CLI pvesh get /nodes/{node}/lxc/{vmid}/config

PUT
Description: Set container options.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Disk', u'VM.Config.CPU', u'VM.Config.Memory', u'VM.Config.Network', u'VM.Config.Options'], u'any', 1] N/A

Parameters:

Name Type Format Description Optional
tty integer N/A Specify the number of tty available to the container
cmode string N/A Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login).
lock string N/A Lock/unlock the VM.
startup string pve-startup-order Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
net[n] string {u'gw': {u'format_description': u'GatewayIPv4', u'type': u'string', u'optional': 1, u'description': u'Default gateway for IPv4 traffic.', u'format': u'ipv4'}, u'bridge': {u'format_description': u'vmbr', u'optional': 1, u'type': u'string', u'description': u'Bridge to attach the network device to.', u'pattern': u'[-_.\\w\\d]+'}, u'gw6': {u'format_description': u'GatewayIPv6', u'type': u'string', u'optional': 1, u'description': u'Default gateway for IPv6 traffic.', u'format': u'ipv6'}, u'name': {u'format_description': u'String', u'pattern': u'[-_.\\w\\d]+', u'type': u'string', u'description': u'Name of the network device as seen from inside the container. (lxc.network.name)'}, u'firewall': {u'format_description': u'[1|0]', u'type': u'boolean', u'optional': 1, u'description': u"Controls whether this interface's firewall rules should be used."}, u'ip': {u'format_description': u'IPv4Format/CIDR', u'optional': 1, u'type': u'string', u'description': u'IPv4 address in CIDR format.', u'format': u'pve-ipv4-config'}, u'mtu': {u'format_description': u'Number', u'optional': 1, u'minimum': 64, u'type': u'integer', u'description': u'Maximum transfer unit of the interface. (lxc.network.mtu)'}, u'tag': {u'description': u'VLAN tag foro this interface.', u'optional': 1, u'maximum': u'4094', u'minimum': u'2', u'format_description': u'VlanNo', u'type': u'integer'}, u'ip6': {u'format_description': u'IPv6Format/CIDR', u'optional': 1, u'type': u'string', u'description': u'IPv6 address in CIDR format.', u'format': u'pve-ipv6-config'}, u'hwaddr': {u'format_description': u'MAC', u'type': u'string', u'optional': 1, u'description': u'Bridge to attach the network device to. (lxc.network.hwaddr)', u'pattern': u'(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})'}, u'type': {u'optional': 1, u'enum': [u'veth'], u'type': u'string', u'description': u'Network interface type.'}} Specifies network interfaces for the container.
console boolean N/A Attach a console device (/dev/console) to the container.
hostname string dns-name Set a host name for the container.
swap integer N/A Amount of SWAP for the VM in MB.
template boolean N/A Enable/disable Template.
memory integer N/A Amount of RAM for the VM in MB.
node string pve-node The cluster node name.
description string N/A Container description. Only used on the configuration web interface.
cpuunits integer N/A CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.

NOTE: You can disable fair-scheduler configuration by setting this to 0.

protection boolean N/A Sets the protection flag of the container. This will prevent the remove operation. This will prevent the CT or CT's disk remove/update operation.
searchdomain string dns-name-list Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver.
arch string N/A OS architecture type.
rootfs string {u'volume': {u'format_description': u'volume', u'type': u'string', u'default_key': 1, u'description': u'Volume, device or directory to mount into the container.'}, u'backup': {u'format_description': u'[1|0]', u'type': u'boolean', u'optional': 1, u'description': u'Whether to include the mountpoint in backups.'}, u'size': {u'format_description': u'DiskSize', u'type': u'string', u'optional': 1, u'description': u'Volume size (read only value).', u'format': u'disk-size'}} Use volume as container root.
unused[n] string pve-volume-id Reference to unused volumes.
mp[n] string {u'volume': {u'format_description': u'volume', u'type': u'string', u'default_key': 1, u'description': u'Volume, device or directory to mount into the container.'}, u'backup': {u'format_description': u'[1|0]', u'type': u'boolean', u'optional': 1, u'description': u'Whether to include the mountpoint in backups.'}, u'mp': {u'format_description': u'Path', u'type': u'string', u'optional': 1, u'description': u'Path to the mountpoint as seen from inside the container.'}, u'size': {u'format_description': u'DiskSize', u'type': u'string', u'optional': 1, u'description': u'Volume size (read only value).', u'format': u'disk-size'}} Use volume as container mount point (experimental feature).
vmid integer pve-vmid The (unique) ID of the VM.
ostype string N/A OS type. Corresponds to lxc setup scripts in /usr/share/lxc/config/.common.conf.
nameserver string address-list Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver.
cpulimit number N/A Limit of CPU usage. Note if the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.
onboot boolean N/A Specifies whether a VM will be started during system bootup.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/lxc/{vmid}/config
CLI pvesh set /nodes/{node}/lxc/{vmid}/config



/nodes/{node}/lxc/{vmid}/config/{vmid}



/nodes/{node}/lxc/{vmid}/config/{vmid}/resize


PUT
Description: Resize a container mountpoint.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Disk', u'VM.Config.CPU', u'VM.Config.Memory', u'VM.Config.Network', u'VM.Config.Options'], u'any', 1] N/A

Parameters:

Name Type Format Description Optional
tty integer N/A Specify the number of tty available to the container
cmode string N/A Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login).
lock string N/A Lock/unlock the VM.
startup string pve-startup-order Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.
disk string N/A The disk you want to resize.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
size string N/A The new size. With the '+' sign the value is added to the actual size of the volume and without it, the value is taken as an absolute one. Shrinking disk size is not supported.
net[n] string {u'gw': {u'format_description': u'GatewayIPv4', u'type': u'string', u'optional': 1, u'description': u'Default gateway for IPv4 traffic.', u'format': u'ipv4'}, u'bridge': {u'format_description': u'vmbr', u'optional': 1, u'type': u'string', u'description': u'Bridge to attach the network device to.', u'pattern': u'[-_.\\w\\d]+'}, u'gw6': {u'format_description': u'GatewayIPv6', u'optional': 1, u'type': u'string', u'description': u'Default gateway for IPv6 traffic.', u'format': u'ipv6'}, u'name': {u'format_description': u'String', u'pattern': u'[-_.\\w\\d]+', u'type': u'string', u'description': u'Name of the network device as seen from inside the container. (lxc.network.name)'}, u'firewall': {u'format_description': u'[1|0]', u'optional': 1, u'type': u'boolean', u'description': u"Controls whether this interface's firewall rules should be used."}, u'ip': {u'format_description': u'IPv4Format/CIDR', u'type': u'string', u'optional': 1, u'description': u'IPv4 address in CIDR format.', u'format': u'pve-ipv4-config'}, u'mtu': {u'format_description': u'Number', u'optional': 1, u'minimum': 64, u'type': u'integer', u'description': u'Maximum transfer unit of the interface. (lxc.network.mtu)'}, u'tag': {u'description': u'VLAN tag foro this interface.', u'optional': 1, u'maximum': u'4094', u'minimum': u'2', u'format_description': u'VlanNo', u'type': u'integer'}, u'ip6': {u'format_description': u'IPv6Format/CIDR', u'type': u'string', u'optional': 1, u'description': u'IPv6 address in CIDR format.', u'format': u'pve-ipv6-config'}, u'hwaddr': {u'format_description': u'MAC', u'pattern': u'(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})', u'type': u'string', u'description': u'Bridge to attach the network device to. (lxc.network.hwaddr)', u'optional': 1}, u'type': {u'optional': 1, u'enum': [u'veth'], u'type': u'string', u'description': u'Network interface type.'}} Specifies network interfaces for the container.
console boolean N/A Attach a console device (/dev/console) to the container.
hostname string dns-name Set a host name for the container.
swap integer N/A Amount of SWAP for the VM in MB.
template boolean N/A Enable/disable Template.
memory integer N/A Amount of RAM for the VM in MB.
node string pve-node The cluster node name.
description string N/A Container description. Only used on the configuration web interface.
cpuunits integer N/A CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.

NOTE: You can disable fair-scheduler configuration by setting this to 0.

protection boolean N/A Sets the protection flag of the container. This will prevent the remove operation. This will prevent the CT or CT's disk remove/update operation.
searchdomain string dns-name-list Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver.
arch string N/A OS architecture type.
rootfs string {u'volume': {u'format_description': u'volume', u'type': u'string', u'default_key': 1, u'description': u'Volume, device or directory to mount into the container.'}, u'backup': {u'format_description': u'[1|0]', u'optional': 1, u'type': u'boolean', u'description': u'Whether to include the mountpoint in backups.'}, u'size': {u'format_description': u'DiskSize', u'type': u'string', u'optional': 1, u'description': u'Volume size (read only value).', u'format': u'disk-size'}} Use volume as container root.
cpulimit number N/A Limit of CPU usage. Note if the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.
mp[n] string {u'volume': {u'format_description': u'volume', u'default_key': 1, u'type': u'string', u'description': u'Volume, device or directory to mount into the container.'}, u'backup': {u'format_description': u'[1|0]', u'type': u'boolean', u'optional': 1, u'description': u'Whether to include the mountpoint in backups.'}, u'mp': {u'format_description': u'Path', u'type': u'string', u'optional': 1, u'description': u'Path to the mountpoint as seen from inside the container.'}, u'size': {u'format_description': u'DiskSize', u'type': u'string', u'optional': 1, u'description': u'Volume size (read only value).', u'format': u'disk-size'}} Use volume as container mount point (experimental feature).
vmid integer pve-vmid The (unique) ID of the VM.
ostype string N/A OS type. Corresponds to lxc setup scripts in /usr/share/lxc/config/.common.conf.
nameserver string address-list Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver.
unused[n] string pve-volume-id Reference to unused volumes.
onboot boolean N/A Specifies whether a VM will be started during system bootup.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/lxc/{vmid}/config/{vmid}/resize
CLI pvesh set /nodes/{node}/lxc/{vmid}/config/{vmid}/resize



/nodes/{node}/lxc/{vmid}/status


GET
Description: Directory index
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional
subdir string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/status
CLI pvesh get /nodes/{node}/lxc/{vmid}/status



/nodes/{node}/lxc/{vmid}/status/current


GET
Description: Get virtual machine status.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
object
Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/status/current
CLI pvesh get /nodes/{node}/lxc/{vmid}/status/current



/nodes/{node}/lxc/{vmid}/status/start


POST
Description: Start the container.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.PowerMgmt']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/status/start
CLI pvesh create /nodes/{node}/lxc/{vmid}/status/start



/nodes/{node}/lxc/{vmid}/status/stop


POST
Description: Stop the container.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.PowerMgmt']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/status/stop
CLI pvesh create /nodes/{node}/lxc/{vmid}/status/stop



/nodes/{node}/lxc/{vmid}/status/shutdown


POST
Description: Shutdown the container.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.PowerMgmt']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
forceStop boolean N/A Make sure the Container stops.
vmid integer pve-vmid The (unique) ID of the VM.
timeout integer N/A Wait maximal timeout seconds.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/status/shutdown
CLI pvesh create /nodes/{node}/lxc/{vmid}/status/shutdown



/nodes/{node}/lxc/{vmid}/status/suspend


POST
Description: Suspend the container.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.PowerMgmt']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/status/suspend
CLI pvesh create /nodes/{node}/lxc/{vmid}/status/suspend



/nodes/{node}/lxc/{vmid}/status/resume


POST
Description: Resume the container.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.PowerMgmt']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/status/resume
CLI pvesh create /nodes/{node}/lxc/{vmid}/status/resume



/nodes/{node}/lxc/{vmid}/snapshot


GET
Description: List all snapshots.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/snapshot
CLI pvesh get /nodes/{node}/lxc/{vmid}/snapshot

POST
Description: Snapshot a container.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Snapshot']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
description string N/A A textual description or comment.
snapname string pve-configid The name of the snapshot.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/snapshot
CLI pvesh create /nodes/{node}/lxc/{vmid}/snapshot



/nodes/{node}/lxc/{vmid}/snapshot/{snapname}


GET
Description:
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
snapname string pve-configid The name of the snapshot.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/snapshot/{snapname}
CLI pvesh get /nodes/{node}/lxc/{vmid}/snapshot/{snapname}

DELETE
Description: Delete a LXC snapshot.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Snapshot']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
force boolean N/A For removal from config file, even if removing disk snapshots fails.
vmid integer pve-vmid The (unique) ID of the VM.
snapname string pve-configid The name of the snapshot.

Return:
string
Usage:
HTTP DELETE /api2/json/nodes/{node}/lxc/{vmid}/snapshot/{snapname}
CLI pvesh delete /nodes/{node}/lxc/{vmid}/snapshot/{snapname}



/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback


POST
Description: Rollback LXC state to specified snapshot.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Snapshot']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
snapname string pve-configid The name of the snapshot.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback
CLI pvesh create /nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback



/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config


GET
Description: Get snapshot configuration
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Snapshot']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
snapname string pve-configid The name of the snapshot.

Return:
object
Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config
CLI pvesh get /nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config

PUT
Description: Update snapshot metadata.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Snapshot']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
snapname string pve-configid The name of the snapshot.
description string N/A A textual description or comment.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config
CLI pvesh set /nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config



/nodes/{node}/lxc/{vmid}/firewall


GET
Description: Directory index.
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/firewall
CLI pvesh get /nodes/{node}/lxc/{vmid}/firewall



/nodes/{node}/lxc/{vmid}/firewall/rules


GET
Description: List rules.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional
pos integer N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/firewall/rules
CLI pvesh get /nodes/{node}/lxc/{vmid}/firewall/rules

POST
Description: Create new rule.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
comment string N/A N/A
enable integer N/A N/A
dport string pve-fw-port-spec N/A
proto string pve-fw-protocol-spec N/A
dest string pve-fw-addr-spec N/A
macro string N/A N/A
vmid integer pve-vmid The (unique) ID of the VM.
pos integer N/A Update rule at position
.
source string pve-fw-addr-spec N/A
iface string pve-iface Network interface name.
action string N/A Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.
sport string pve-fw-port-spec N/A
type string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/firewall/rules
CLI pvesh create /nodes/{node}/lxc/{vmid}/firewall/rules



/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}


GET
Description: Get single rule data.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
pos integer N/A Update rule at position
.

Return:
object

Name Type Format Description Optional
pos integer N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}
CLI pvesh get /nodes/{node}/lxc/{vmid}/firewall/rules/{pos}

PUT
Description: Modify rule data.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
node string pve-node The cluster node name.
moveto integer N/A Move rule to new position . Other arguments are ignored.
enable integer N/A N/A
dport string pve-fw-port-spec N/A
proto string pve-fw-protocol-spec N/A
dest string pve-fw-addr-spec N/A
macro string N/A N/A
vmid integer pve-vmid The (unique) ID of the VM.
pos integer N/A Update rule at position
.
source string pve-fw-addr-spec N/A
iface string pve-iface Network interface name.
action string N/A Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.
sport string pve-fw-port-spec N/A
type string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}
CLI pvesh set /nodes/{node}/lxc/{vmid}/firewall/rules/{pos}

DELETE
Description: Delete rule.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
pos integer N/A Update rule at position
.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}
CLI pvesh delete /nodes/{node}/lxc/{vmid}/firewall/rules/{pos}



/nodes/{node}/lxc/{vmid}/firewall/aliases


GET
Description: List aliases
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional
comment string N/A N/A
cidr string N/A N/A
name string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/firewall/aliases
CLI pvesh get /nodes/{node}/lxc/{vmid}/firewall/aliases

POST
Description: Create IP or Network Alias.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
node string pve-node The cluster node name.
cidr string IPorCIDR Network/IP specification in CIDR format.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A Alias name.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/firewall/aliases
CLI pvesh create /nodes/{node}/lxc/{vmid}/firewall/aliases



/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}


GET
Description: Read alias.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A Alias name.

Return:
object
Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}
CLI pvesh get /nodes/{node}/lxc/{vmid}/firewall/aliases/{name}

PUT
Description: Update IP or Network alias.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
rename string N/A Rename an existing alias.
node string pve-node The cluster node name.
name string N/A Alias name.
vmid integer pve-vmid The (unique) ID of the VM.
comment string N/A N/A
cidr string IPorCIDR Network/IP specification in CIDR format.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}
CLI pvesh set /nodes/{node}/lxc/{vmid}/firewall/aliases/{name}

DELETE
Description: Remove IP or Network alias.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A Alias name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}
CLI pvesh delete /nodes/{node}/lxc/{vmid}/firewall/aliases/{name}



/nodes/{node}/lxc/{vmid}/firewall/ipset


GET
Description: List IPSets
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional
comment string N/A N/A
name string N/A IP set name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/firewall/ipset
CLI pvesh get /nodes/{node}/lxc/{vmid}/firewall/ipset

POST
Description: Create new IPSet
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
node string pve-node The cluster node name.
name string N/A IP set name.
vmid integer pve-vmid The (unique) ID of the VM.
rename string N/A Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/firewall/ipset
CLI pvesh create /nodes/{node}/lxc/{vmid}/firewall/ipset



/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}


GET
Description: List IPSet content
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A IP set name.

Return:
array

Name Type Format Description Optional
comment string N/A N/A
cidr string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
nomatch boolean N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}
CLI pvesh get /nodes/{node}/lxc/{vmid}/firewall/ipset/{name}

POST
Description: Add IP or Network to IPSet.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
node string pve-node The cluster node name.
name string N/A IP set name.
vmid integer pve-vmid The (unique) ID of the VM.
nomatch boolean N/A N/A
cidr string IPorCIDRorAlias Network/IP specification in CIDR format.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}
CLI pvesh create /nodes/{node}/lxc/{vmid}/firewall/ipset/{name}

DELETE
Description: Delete IPSet
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A IP set name.

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}
CLI pvesh delete /nodes/{node}/lxc/{vmid}/firewall/ipset/{name}



/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}


GET
Description: Read IP or Network settings from IPSet.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
cidr string IPorCIDRorAlias Network/IP specification in CIDR format.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A IP set name.

Return:
object
Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}
CLI pvesh get /nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}

PUT
Description: Update IP or Network settings
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
comment string N/A N/A
node string pve-node The cluster node name.
name string N/A IP set name.
vmid integer pve-vmid The (unique) ID of the VM.
nomatch boolean N/A N/A
cidr string IPorCIDRorAlias Network/IP specification in CIDR format.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}
CLI pvesh set /nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}

DELETE
Description: Remove IP or Network from IPSet.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
cidr string IPorCIDRorAlias Network/IP specification in CIDR format.
vmid integer pve-vmid The (unique) ID of the VM.
name string N/A IP set name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}
CLI pvesh delete /nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}



/nodes/{node}/lxc/{vmid}/firewall/options


GET
Description: Get VM firewall options.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
object

Name Type Format Description Optional
policy_out string N/A Output policy.
enable boolean N/A Enable host firewall rules.
macfilter boolean N/A Enable/disable MAC address filter.
log_level_in string N/A Log level for incoming traffic.
policy_in string N/A Input policy.
log_level_out string N/A Log level for outgoing traffic.
dhcp boolean N/A Enable DHCP.

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/firewall/options
CLI pvesh get /nodes/{node}/lxc/{vmid}/firewall/options

PUT
Description: Set Firewall options.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Config.Network']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
policy_out string N/A Output policy.
enable boolean N/A Enable host firewall rules.
macfilter boolean N/A Enable/disable MAC address filter.
log_level_in string N/A Log level for incoming traffic.
vmid integer pve-vmid The (unique) ID of the VM.
policy_in string N/A Input policy.
log_level_out string N/A Log level for outgoing traffic.
dhcp boolean N/A Enable DHCP.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/lxc/{vmid}/firewall/options
CLI pvesh set /nodes/{node}/lxc/{vmid}/firewall/options



/nodes/{node}/lxc/{vmid}/firewall/log


GET
Description: Read firewall log
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Console']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
start integer N/A N/A
vmid integer pve-vmid The (unique) ID of the VM.
limit integer N/A N/A

Return:
array

Name Type Format Description Optional
t string N/A Line text
n integer N/A Line number

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/firewall/log
CLI pvesh get /nodes/{node}/lxc/{vmid}/firewall/log



/nodes/{node}/lxc/{vmid}/firewall/refs


GET
Description: Lists possible IPSet/Alias reference which are allowed in source/dest properties.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
type string N/A Only list references of specified type.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
array

Name Type Format Description Optional
comment string N/A N/A
type string N/A N/A
name string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/firewall/refs
CLI pvesh get /nodes/{node}/lxc/{vmid}/firewall/refs



/nodes/{node}/lxc/{vmid}/rrd


GET
Description: Read VM RRD statistics (returns PNG)
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
cf string N/A The RRD consolidation function
ds string pve-configid-list The list of datasources you want to display.
timeframe string N/A Specify the time frame you are interested in.

Return:
object

Name Type Format Description Optional
filename string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/rrd
CLI pvesh get /nodes/{node}/lxc/{vmid}/rrd



/nodes/{node}/lxc/{vmid}/rrddata


GET
Description: Read VM RRD statistics
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
cf string N/A The RRD consolidation function
timeframe string N/A Specify the time frame you are interested in.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/rrddata
CLI pvesh get /nodes/{node}/lxc/{vmid}/rrddata



/nodes/{node}/lxc/{vmid}/vncproxy


POST
Description: Creates a TCP VNC proxy connections.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Console']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
websocket boolean N/A use websocket instead of standard VNC.

Return:

Name Type Format Description Optional
cert string N/A N/A
ticket string N/A N/A
upid string N/A N/A
user string N/A N/A
port integer N/A N/A

Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/vncproxy
CLI pvesh create /nodes/{node}/lxc/{vmid}/vncproxy



/nodes/{node}/lxc/{vmid}/vncwebsocket


GET
Description: Opens a weksocket for VNC traffic.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Console']] You also need to pass a valid ticket (vncticket).

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
port integer N/A Port number returned by previous vncproxy call.
vncticket string N/A Ticket from previous call to vncproxy.

Return:
object

Name Type Format Description Optional
port string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/vncwebsocket
CLI pvesh get /nodes/{node}/lxc/{vmid}/vncwebsocket



/nodes/{node}/lxc/{vmid}/spiceproxy


POST
Description: Returns a SPICE configuration to connect to the CT.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Console']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
proxy string address SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).

Return:

Name Type Format Description Optional
host string N/A N/A
password string N/A N/A
type string N/A N/A
proxy string N/A N/A
tls-port integer N/A N/A

Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/spiceproxy
CLI pvesh create /nodes/{node}/lxc/{vmid}/spiceproxy



/nodes/{node}/lxc/{vmid}/migrate


POST
Description: Migrate the container to another node. Creates a new migration task.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Migrate']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
target string pve-node Target node.
online boolean N/A Use online/live migration.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/migrate
CLI pvesh create /nodes/{node}/lxc/{vmid}/migrate



/nodes/{node}/lxc/{vmid}/feature


GET
Description: Check if feature for virtual machine is available.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.
feature string N/A Feature to check.
snapname string pve-configid The name of the snapshot.

Return:
object

Name Type Format Description Optional
hasFeature boolean N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/lxc/{vmid}/feature
CLI pvesh get /nodes/{node}/lxc/{vmid}/feature



/nodes/{node}/lxc/{vmid}/template


POST
Description: Create a Template.
Permissions:

User Permissions Description
N/A [u'perm', u'/vms/{vmid}', [u'VM.Allocate']] You need 'VM.Allocate' permissions on /vms/{vmid}

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
vmid integer pve-vmid The (unique) ID of the VM.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/lxc/{vmid}/template
CLI pvesh create /nodes/{node}/lxc/{vmid}/template



/nodes/{node}/ceph


GET
Description: Directory index.
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/ceph
CLI pvesh get /nodes/{node}/ceph



/nodes/{node}/ceph/osd


GET
Description: Get Ceph osd list/tree.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
object
Usage:
HTTP GET /api2/json/nodes/{node}/ceph/osd
CLI pvesh get /nodes/{node}/ceph/osd

POST
Description: Create OSD
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
dev string N/A Block device name.
journal_dev string N/A Block device name for journal.
fstype string N/A File system type.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/ceph/osd
CLI pvesh create /nodes/{node}/ceph/osd



/nodes/{node}/ceph/osd/{osdid}


DELETE
Description: Destroy OSD
Parameters:

Name Type Format Description Optional
osdid integer N/A OSD ID
node string pve-node The cluster node name.
cleanup boolean N/A If set, we remove partition table entries.

Return:
string
Usage:
HTTP DELETE /api2/json/nodes/{node}/ceph/osd/{osdid}
CLI pvesh delete /nodes/{node}/ceph/osd/{osdid}



/nodes/{node}/ceph/osd/{osdid}/in


POST
Description: ceph osd in
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
osdid integer N/A OSD ID

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/ceph/osd/{osdid}/in
CLI pvesh create /nodes/{node}/ceph/osd/{osdid}/in



/nodes/{node}/ceph/osd/{osdid}/out


POST
Description: ceph osd out
Parameters:

Name Type Format Description Optional
osdid integer N/A OSD ID
node string pve-node The cluster node name.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/ceph/osd/{osdid}/out
CLI pvesh create /nodes/{node}/ceph/osd/{osdid}/out



/nodes/{node}/ceph/mon


GET
Description: Get Ceph monitor list.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional
name string N/A N/A
addr string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/ceph/mon
CLI pvesh get /nodes/{node}/ceph/mon

POST
Description: Create Ceph Monitor
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/ceph/mon
CLI pvesh create /nodes/{node}/ceph/mon



/nodes/{node}/ceph/mon/{monid}


DELETE
Description: Destroy Ceph monitor.
Parameters:

Name Type Format Description Optional
monid integer N/A Monitor ID
node string pve-node The cluster node name.

Return:
string
Usage:
HTTP DELETE /api2/json/nodes/{node}/ceph/mon/{monid}
CLI pvesh delete /nodes/{node}/ceph/mon/{monid}



/nodes/{node}/ceph/pools


GET
Description: List all pools.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional
pool_name string N/A N/A
pool integer N/A N/A
size integer N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/ceph/pools
CLI pvesh get /nodes/{node}/ceph/pools

POST
Description: Create POOL
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
name string N/A The name of the pool. It must be unique.
min_size integer N/A Minimum number of replicas per object
pg_num integer N/A Number of placement groups.
size integer N/A Number of replicas per object
crush_ruleset integer N/A The ruleset to use for mapping object placement in the cluster.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/ceph/pools
CLI pvesh create /nodes/{node}/ceph/pools



/nodes/{node}/ceph/pools/{name}


DELETE
Description: Destroy pool
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
name string N/A The name of the pool. It must be unique.

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/ceph/pools/{name}
CLI pvesh delete /nodes/{node}/ceph/pools/{name}



/nodes/{node}/ceph/disks


GET
Description: List local disks.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
type string N/A Only list specific types of disks.

Return:
array

Name Type Format Description Optional
used string N/A N/A
vendor string N/A N/A
dev string N/A N/A
gpt boolean N/A N/A
osdid integer N/A N/A
serial string N/A N/A
model string N/A N/A
size integer N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/ceph/disks
CLI pvesh get /nodes/{node}/ceph/disks



/nodes/{node}/ceph/config


GET
Description: Get Ceph configuration.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
string
Usage:
HTTP GET /api2/json/nodes/{node}/ceph/config
CLI pvesh get /nodes/{node}/ceph/config



/nodes/{node}/ceph/init


POST
Description: Create initial ceph default configuration and setup symlinks.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
pg_bits integer N/A Placement group bits, used to specify the default number of placement groups (Note: 'osd pool default pg num' does not work for deafult pools)
network string CIDR Use specific network for all ceph related traffic
size integer N/A Number of replicas per object

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/ceph/init
CLI pvesh create /nodes/{node}/ceph/init



/nodes/{node}/ceph/stop


POST
Description: Stop ceph services.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
service string N/A Ceph service name.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/ceph/stop
CLI pvesh create /nodes/{node}/ceph/stop



/nodes/{node}/ceph/start


POST
Description: Start ceph services.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
service string N/A Ceph service name.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/ceph/start
CLI pvesh create /nodes/{node}/ceph/start



/nodes/{node}/ceph/status


GET
Description: Get ceph status.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
object
Usage:
HTTP GET /api2/json/nodes/{node}/ceph/status
CLI pvesh get /nodes/{node}/ceph/status



/nodes/{node}/ceph/crush


GET
Description: Get OSD crush map
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
string
Usage:
HTTP GET /api2/json/nodes/{node}/ceph/crush
CLI pvesh get /nodes/{node}/ceph/crush



/nodes/{node}/ceph/log


GET
Description: Read ceph log
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Syslog']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
start integer N/A N/A
limit integer N/A N/A

Return:
array

Name Type Format Description Optional
t string N/A Line text
n integer N/A Line number

Usage:
HTTP GET /api2/json/nodes/{node}/ceph/log
CLI pvesh get /nodes/{node}/ceph/log



/nodes/{node}/services


GET
Description: Service list.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/services
CLI pvesh get /nodes/{node}/services



/nodes/{node}/services/{service}


GET
Description: Directory index
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
service string N/A Service ID

Return:
array

Name Type Format Description Optional
subdir string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/services/{service}
CLI pvesh get /nodes/{node}/services/{service}



/nodes/{node}/services/{service}/state


GET
Description: Read service properties
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
service string N/A Service ID

Return:
object

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/services/{service}/state
CLI pvesh get /nodes/{node}/services/{service}/state



/nodes/{node}/services/{service}/start


POST
Description: Start service.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
service string N/A Service ID

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/services/{service}/start
CLI pvesh create /nodes/{node}/services/{service}/start



/nodes/{node}/services/{service}/stop


POST
Description: Stop service.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
service string N/A Service ID

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/services/{service}/stop
CLI pvesh create /nodes/{node}/services/{service}/stop



/nodes/{node}/services/{service}/restart


POST
Description: Restart service.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
service string N/A Service ID

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/services/{service}/restart
CLI pvesh create /nodes/{node}/services/{service}/restart



/nodes/{node}/services/{service}/reload


POST
Description: Reload service.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
service string N/A Service ID

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/services/{service}/reload
CLI pvesh create /nodes/{node}/services/{service}/reload



/nodes/{node}/network


GET
Description: List available networks
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
type string N/A Only list specific interface types.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/network
CLI pvesh get /nodes/{node}/network

POST
Description: Create network device configuration
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
iface string pve-iface Network interface name.
autostart boolean N/A Automatically start interface on boot.
bridge_vlan_aware boolean N/A Enable bridge vlan support.
ovs_bridge string pve-iface The OVS bridge associated with a OVS port. This is required when you create an OVS port.
ovs_bonds string pve-iface-list Specify the interfaces used by the bonding device.
bond_mode string N/A Bonding mode.
ovs_options string N/A OVS interface options.
gateway string ipv4 Default gateway address.
bridge_ports string pve-iface-list Specify the iterfaces you want to add to your bridge.
netmask string ipv4mask Network mask.
ovs_tag integer N/A Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)
comments string N/A Comments
slaves string pve-iface-list Specify the interfaces used by the bonding device.
address string ipv4 IP address.
type string N/A Network interface type
bond_xmit_hash_policy string N/A Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.
ovs_ports string pve-iface-list Specify the iterfaces you want to add to your bridge.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/network
CLI pvesh create /nodes/{node}/network

DELETE
Description: Revert network configuration changes.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/network
CLI pvesh delete /nodes/{node}/network



/nodes/{node}/network/{iface}


GET
Description: Read network device configuration
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
iface string pve-iface Network interface name.

Return:
object

Name Type Format Description Optional
type string N/A N/A
method string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/network/{iface}
CLI pvesh get /nodes/{node}/network/{iface}

PUT
Description: Update network device configuration
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
iface string pve-iface Network interface name.
slaves string pve-iface-list Specify the interfaces used by the bonding device.
bridge_vlan_aware boolean N/A Enable bridge vlan support.
type string N/A Network interface type
ovs_bonds string pve-iface-list Specify the interfaces used by the bonding device.
netmask string ipv4mask Network mask.
ovs_options string N/A OVS interface options.
bond_xmit_hash_policy string N/A Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.
bond_mode string N/A Bonding mode.
ovs_tag integer N/A Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)
comments string N/A Comments
bridge_ports string pve-iface-list Specify the iterfaces you want to add to your bridge.
address string ipv4 IP address.
autostart boolean N/A Automatically start interface on boot.
ovs_bridge string pve-iface The OVS bridge associated with a OVS port. This is required when you create an OVS port.
gateway string ipv4 Default gateway address.
ovs_ports string pve-iface-list Specify the iterfaces you want to add to your bridge.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/network/{iface}
CLI pvesh set /nodes/{node}/network/{iface}

DELETE
Description: Delete network device configuration
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
iface string pve-iface Network interface name.

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/network/{iface}
CLI pvesh delete /nodes/{node}/network/{iface}



/nodes/{node}/tasks


GET
Description: Read task list for one node (finished tasks).
Permissions:

User Permissions Description
all N/A List task associated with the current user, or all task the user has 'Sys.Audit' permissions on /nodes/ (the the task runs on).

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
errors boolean N/A N/A
userfilter string N/A N/A
vmid integer pve-vmid Only list tasks for this VM.
start integer N/A N/A
limit integer N/A N/A

Return:
array

Name Type Format Description Optional
upid string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/tasks
CLI pvesh get /nodes/{node}/tasks



/nodes/{node}/tasks/{upid}


GET
Description:
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
upid string N/A N/A

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/tasks/{upid}
CLI pvesh get /nodes/{node}/tasks/{upid}

DELETE
Description: Stop a task.
Permissions:

User Permissions Description
all N/A The user needs 'Sys.Modify' permissions on '/nodes/' if the task does not belong to him.

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
upid string N/A N/A

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/tasks/{upid}
CLI pvesh delete /nodes/{node}/tasks/{upid}



/nodes/{node}/tasks/{upid}/log


GET
Description: Read task log.
Permissions:

User Permissions Description
all N/A The user needs 'Sys.Audit' permissions on '/nodes/' if the task does not belong to him.

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
start integer N/A N/A
limit integer N/A N/A
upid string N/A N/A

Return:
array

Name Type Format Description Optional
t string N/A Line text
n integer N/A Line number

Usage:
HTTP GET /api2/json/nodes/{node}/tasks/{upid}/log
CLI pvesh get /nodes/{node}/tasks/{upid}/log



/nodes/{node}/tasks/{upid}/status


GET
Description: Read task status.
Permissions:

User Permissions Description
all N/A The user needs 'Sys.Audit' permissions on '/nodes/' if the task does not belong to him.

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
upid string N/A N/A

Return:
object

Name Type Format Description Optional
status string N/A N/A
pid integer N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/tasks/{upid}/status
CLI pvesh get /nodes/{node}/tasks/{upid}/status



/nodes/{node}/scan


GET
Description: Index of available scan methods
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional
method string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/scan
CLI pvesh get /nodes/{node}/scan



/nodes/{node}/scan/zfs


GET
Description: Scan zfs pool list on local node.
Permissions:

User Permissions Description
N/A [u'perm', u'/storage', [u'Datastore.Allocate']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional
pool string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/scan/zfs
CLI pvesh get /nodes/{node}/scan/zfs



/nodes/{node}/scan/nfs


GET
Description: Scan remote NFS server.
Permissions:

User Permissions Description
N/A [u'perm', u'/storage', [u'Datastore.Allocate']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
server string pve-storage-server N/A

Return:
array

Name Type Format Description Optional
path string N/A N/A
options string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/scan/nfs
CLI pvesh get /nodes/{node}/scan/nfs



/nodes/{node}/scan/glusterfs


GET
Description: Scan remote GlusterFS server.
Permissions:

User Permissions Description
N/A [u'perm', u'/storage', [u'Datastore.Allocate']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
server string pve-storage-server N/A

Return:
array

Name Type Format Description Optional
volname string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/scan/glusterfs
CLI pvesh get /nodes/{node}/scan/glusterfs



/nodes/{node}/scan/iscsi


GET
Description: Scan remote iSCSI server.
Permissions:

User Permissions Description
N/A [u'perm', u'/storage', [u'Datastore.Allocate']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
portal string pve-storage-portal-dns N/A

Return:
array

Name Type Format Description Optional
portal string N/A N/A
target string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/scan/iscsi
CLI pvesh get /nodes/{node}/scan/iscsi



/nodes/{node}/scan/lvm


GET
Description: List local LVM volume groups.
Permissions:

User Permissions Description
N/A [u'perm', u'/storage', [u'Datastore.Allocate']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional
vg string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/scan/lvm
CLI pvesh get /nodes/{node}/scan/lvm



/nodes/{node}/scan/usb


GET
Description: List local USB devices.
Permissions:

User Permissions Description
N/A [u'perm', u'/', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional
vendid string N/A N/A
devnum integer N/A N/A
product string N/A N/A
busnum integer N/A N/A
level integer N/A N/A
usbpath string N/A N/A
port integer N/A N/A
serial string N/A N/A
speed string N/A N/A
class integer N/A N/A
prodid string N/A N/A
manufacturer string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/scan/usb
CLI pvesh get /nodes/{node}/scan/usb



/nodes/{node}/storage


GET
Description: Get status for all datastores.
Permissions:

User Permissions Description
all N/A Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/'

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
content string pve-storage-content-list Only list stores which support this content type.
storage string pve-storage-id Only list status for specified storage
target string pve-node If target is different to 'node', we only lists shared storages which content is accessible on this 'node' and the specified 'target' node.
enabled boolean N/A Only list stores which are enabled (not disabled in config).

Return:
array

Name Type Format Description Optional
storage string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/storage
CLI pvesh get /nodes/{node}/storage



/nodes/{node}/storage/{storage}


GET
Description:
Permissions:

User Permissions Description
N/A [u'perm', u'/storage/{storage}', [u'Datastore.Audit', u'Datastore.AllocateSpace'], u'any', 1] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
storage string pve-storage-id The storage identifier.

Return:
array

Name Type Format Description Optional
subdir string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/storage/{storage}
CLI pvesh get /nodes/{node}/storage/{storage}



/nodes/{node}/storage/{storage}/content


GET
Description: List storage content.
Permissions:

User Permissions Description
N/A [u'perm', u'/storage/{storage}', [u'Datastore.Audit', u'Datastore.AllocateSpace'], u'any', 1] N/A

Parameters:

Name Type Format Description Optional
content string pve-storage-content Only list content of this type.
node string pve-node The cluster node name.
vmid integer pve-vmid Only list images for this VM
storage string pve-storage-id The storage identifier.

Return:
array

Name Type Format Description Optional
volid string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/storage/{storage}/content
CLI pvesh get /nodes/{node}/storage/{storage}/content

POST
Description: Allocate disk images.
Permissions:

User Permissions Description
N/A [u'perm', u'/storage/{storage}', [u'Datastore.AllocateSpace']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
format string N/A N/A
storage string pve-storage-id The storage identifier.
vmid integer pve-vmid Specify owner VM
filename string N/A The name of the file to create.
size string N/A Size in kilobyte (1024 bytes). Optional suffixes 'M' (megabyte, 1024K) and 'G' (gigabyte, 1024M)

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/storage/{storage}/content
CLI pvesh create /nodes/{node}/storage/{storage}/content



/nodes/{node}/storage/{storage}/content/{volume}


GET
Description: Get volume attributes
Permissions:

User Permissions Description
all N/A You need read access for the volume.

Parameters:

Name Type Format Description Optional
volume string N/A Volume identifier
node string pve-node The cluster node name.
storage string pve-storage-id The storage identifier.

Return:
object
Usage:
HTTP GET /api2/json/nodes/{node}/storage/{storage}/content/{volume}
CLI pvesh get /nodes/{node}/storage/{storage}/content/{volume}

POST
Description: Copy a volume. This is experimental code - do not use.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
volume string N/A Source volume identifier
storage string pve-storage-id The storage identifier.
target string N/A Target volume identifier
target_node string pve-node Target node. Default is local node.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/storage/{storage}/content/{volume}
CLI pvesh create /nodes/{node}/storage/{storage}/content/{volume}

DELETE
Description: Delete volume
Permissions:

User Permissions Description
all N/A You need 'Datastore.Allocate' privilege on the storage (or 'Datastore.AllocateSpace' for backup volumes if you have VM.Backup privilege on the VM).

Parameters:

Name Type Format Description Optional
volume string N/A Volume identifier
node string pve-node The cluster node name.
storage string pve-storage-id The storage identifier.

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/storage/{storage}/content/{volume}
CLI pvesh delete /nodes/{node}/storage/{storage}/content/{volume}



/nodes/{node}/storage/{storage}/status


GET
Description: Read storage status.
Permissions:

User Permissions Description
N/A [u'perm', u'/storage/{storage}', [u'Datastore.Audit', u'Datastore.AllocateSpace'], u'any', 1] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
storage string pve-storage-id The storage identifier.

Return:
object

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/storage/{storage}/status
CLI pvesh get /nodes/{node}/storage/{storage}/status



/nodes/{node}/storage/{storage}/rrd


GET
Description: Read storage RRD statistics (returns PNG).
Permissions:

User Permissions Description
N/A [u'perm', u'/storage/{storage}', [u'Datastore.Audit', u'Datastore.AllocateSpace'], u'any', 1] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
timeframe string N/A Specify the time frame you are interested in.
storage string pve-storage-id The storage identifier.
cf string N/A The RRD consolidation function
ds string pve-configid-list The list of datasources you want to display.

Return:
object

Name Type Format Description Optional
filename string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/storage/{storage}/rrd
CLI pvesh get /nodes/{node}/storage/{storage}/rrd



/nodes/{node}/storage/{storage}/rrddata


GET
Description: Read storage RRD statistics.
Permissions:

User Permissions Description
N/A [u'perm', u'/storage/{storage}', [u'Datastore.Audit', u'Datastore.AllocateSpace'], u'any', 1] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
storage string pve-storage-id The storage identifier.
cf string N/A The RRD consolidation function
timeframe string N/A Specify the time frame you are interested in.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/storage/{storage}/rrddata
CLI pvesh get /nodes/{node}/storage/{storage}/rrddata



/nodes/{node}/storage/{storage}/upload


POST
Description: Upload templates and ISO images.
Permissions:

User Permissions Description
N/A [u'perm', u'/storage/{storage}', [u'Datastore.AllocateTemplate']] N/A

Parameters:

Name Type Format Description Optional
content string pve-storage-content Content type.
node string pve-node The cluster node name.
filename string N/A The name of the file to create.
storage string pve-storage-id The storage identifier.
tmpfilename string N/A The source file name. This parameter is usually set by the REST handler. You can only overwrite it when connecting to the trustet port on localhost.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/storage/{storage}/upload
CLI pvesh create /nodes/{node}/storage/{storage}/upload



/nodes/{node}/apt


GET
Description: Directory index for apt (Advanced Package Tool).
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional
id string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/apt
CLI pvesh get /nodes/{node}/apt



/nodes/{node}/apt/update


GET
Description: List available updates.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/apt/update
CLI pvesh get /nodes/{node}/apt/update

POST
Description: This is used to resynchronize the package index files from their sources (apt-get update).
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
notify boolean N/A Send notification mail about new packages (to email address specified for user 'root@pam').
quiet boolean N/A Only produces output suitable for logging, omitting progress indicators.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/apt/update
CLI pvesh create /nodes/{node}/apt/update



/nodes/{node}/apt/changelog


GET
Description: Get package changelogs.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
version string N/A Package version.
name string N/A Package name.

Return:
string
Usage:
HTTP GET /api2/json/nodes/{node}/apt/changelog
CLI pvesh get /nodes/{node}/apt/changelog



/nodes/{node}/apt/versions


GET
Description: Get package information for important Proxmox packages.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/apt/versions
CLI pvesh get /nodes/{node}/apt/versions



/nodes/{node}/firewall


GET
Description: Directory index.
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/firewall
CLI pvesh get /nodes/{node}/firewall



/nodes/{node}/firewall/rules


GET
Description: List rules.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional
pos integer N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/firewall/rules
CLI pvesh get /nodes/{node}/firewall/rules

POST
Description: Create new rule.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
comment string N/A N/A
enable integer N/A N/A
dport string pve-fw-port-spec N/A
proto string pve-fw-protocol-spec N/A
dest string pve-fw-addr-spec N/A
macro string N/A N/A
pos integer N/A Update rule at position
.
source string pve-fw-addr-spec N/A
iface string pve-iface Network interface name.
action string N/A Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.
sport string pve-fw-port-spec N/A
type string N/A N/A
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/firewall/rules
CLI pvesh create /nodes/{node}/firewall/rules



/nodes/{node}/firewall/rules/{pos}


GET
Description: Get single rule data.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
pos integer N/A Update rule at position
.

Return:
object

Name Type Format Description Optional
pos integer N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/firewall/rules/{pos}
CLI pvesh get /nodes/{node}/firewall/rules/{pos}

PUT
Description: Modify rule data.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
comment string N/A N/A
moveto integer N/A Move rule to new position . Other arguments are ignored.
iface string pve-iface Network interface name.
proto string pve-fw-protocol-spec N/A
dest string pve-fw-addr-spec N/A
macro string N/A N/A
pos integer N/A Update rule at position
.
source string pve-fw-addr-spec N/A
enable integer N/A N/A
dport string pve-fw-port-spec N/A
sport string pve-fw-port-spec N/A
type string N/A N/A
action string N/A Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/firewall/rules/{pos}
CLI pvesh set /nodes/{node}/firewall/rules/{pos}

DELETE
Description: Delete rule.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
pos integer N/A Update rule at position
.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.

Return:
null
Usage:
HTTP DELETE /api2/json/nodes/{node}/firewall/rules/{pos}
CLI pvesh delete /nodes/{node}/firewall/rules/{pos}



/nodes/{node}/firewall/options


GET
Description: Get host firewall options.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
object

Name Type Format Description Optional
log_level_in string N/A Log level for incoming traffic.
enable boolean N/A Enable host firewall rules.
nosmurfs boolean N/A Enable SMURFS filter.
tcp_flags_log_level string N/A Log level for illegal tcp flags filter.
nf_conntrack_tcp_timeout_established integer N/A Conntrack established timeout.
tcpflags boolean N/A Filter illegal combinations of TCP flags.
nf_conntrack_max integer N/A Maximum number of tracked connections.
log_level_out string N/A Log level for outgoing traffic.
smurf_log_level string N/A Log level for SMURFS filter.

Usage:
HTTP GET /api2/json/nodes/{node}/firewall/options
CLI pvesh get /nodes/{node}/firewall/options

PUT
Description: Set Firewall options.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
log_level_in string N/A Log level for incoming traffic.
enable boolean N/A Enable host firewall rules.
nosmurfs boolean N/A Enable SMURFS filter.
tcp_flags_log_level string N/A Log level for illegal tcp flags filter.
nf_conntrack_tcp_timeout_established integer N/A Conntrack established timeout.
tcpflags boolean N/A Filter illegal combinations of TCP flags.
nf_conntrack_max integer N/A Maximum number of tracked connections.
log_level_out string N/A Log level for outgoing traffic.
smurf_log_level string N/A Log level for SMURFS filter.
digest string N/A Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
delete string pve-configid-list A list of settings you want to delete.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/firewall/options
CLI pvesh set /nodes/{node}/firewall/options



/nodes/{node}/firewall/log


GET
Description: Read firewall log
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Syslog']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
start integer N/A N/A
limit integer N/A N/A

Return:
array

Name Type Format Description Optional
t string N/A Line text
n integer N/A Line number

Usage:
HTTP GET /api2/json/nodes/{node}/firewall/log
CLI pvesh get /nodes/{node}/firewall/log



/nodes/{node}/vzdump


POST
Description: Create backup.
Permissions:

User Permissions Description
all N/A The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage.

Parameters:

Name Type Format Description Optional
all boolean N/A Backup all known VMs on this host.
stdout boolean N/A Write tar to stdout, not to a file.
ionice integer N/A Set CFQ ionice priority.
mailnotification string N/A Specify when to send an email
exclude string pve-vmid-list exclude specified VMs (assumes --all)
bwlimit integer N/A Limit I/O bandwidth (KBytes per second).
tmpdir string N/A Store temporary files to specified directory.
size integer N/A LVM snapshot size in MB.
mailto string string-list
script string N/A Use specified hook script.
storage string pve-storage-id Store resulting file to this storage.
exclude-path string string-alist exclude certain files/directories (shell globs).
mode string N/A Backup mode.
node string pve-node Only run if executed on this node.
maxfiles integer N/A Maximal number of backup files per VM.
stop boolean N/A Stop runnig backup jobs on this host.
compress string N/A Compress dump file.
dumpdir string N/A Store resulting files to specified directory.
pigz integer N/A Uses pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.
vmid string pve-vmid-list The ID of the VM you want to backup.
quiet boolean N/A Be quiet.
remove boolean N/A Remove old backup files if there are more than 'maxfiles' backup files.
lockwait integer N/A Maximal time to wait for the global lock (minutes).
stdexcludes boolean N/A Exclude temorary files and logs.
stopwait integer N/A Maximal time to wait until a VM is stopped (minutes).

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/vzdump
CLI pvesh create /nodes/{node}/vzdump



/nodes/{node}/subscription


GET
Description: Read subscription info.
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
object
Usage:
HTTP GET /api2/json/nodes/{node}/subscription
CLI pvesh get /nodes/{node}/subscription

PUT
Description: Set subscription key.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
key string N/A Proxmox VE subscription key

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/subscription
CLI pvesh set /nodes/{node}/subscription

POST
Description: Update subscription info.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
force boolean N/A Always connect to server, even if we have up to date info inside local cache.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/subscription
CLI pvesh create /nodes/{node}/subscription



/nodes/{node}/version


GET
Description: API version details
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
object

Name Type Format Description Optional
release string N/A N/A
version string N/A N/A
repoid string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/version
CLI pvesh get /nodes/{node}/version



/nodes/{node}/status


GET
Description: Read node status
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
object

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/status
CLI pvesh get /nodes/{node}/status

POST
Description: Reboot or shutdown a node.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.PowerMgmt']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
command string N/A Specify the command.

Return:
null
Usage:
HTTP POST /api2/json/nodes/{node}/status
CLI pvesh create /nodes/{node}/status



/nodes/{node}/netstat


GET
Description: Read tap/vm network device interface counters
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/netstat
CLI pvesh get /nodes/{node}/netstat



/nodes/{node}/execute


POST
Description: Execute multiple commands in order.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
commands string N/A JSON encoded array of commands.

Return:
array

Name Type Format Description Optional

Usage:
HTTP POST /api2/json/nodes/{node}/execute
CLI pvesh create /nodes/{node}/execute



/nodes/{node}/rrd


GET
Description: Read node RRD statistics (returns PNG)
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
timeframe string N/A Specify the time frame you are interested in.
cf string N/A The RRD consolidation function
ds string pve-configid-list The list of datasources you want to display.

Return:
object

Name Type Format Description Optional
filename string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/rrd
CLI pvesh get /nodes/{node}/rrd



/nodes/{node}/rrddata


GET
Description: Read node RRD statistics
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
cf string N/A The RRD consolidation function
timeframe string N/A Specify the time frame you are interested in.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/rrddata
CLI pvesh get /nodes/{node}/rrddata



/nodes/{node}/syslog


GET
Description: Read system log
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Syslog']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
start integer N/A N/A
limit integer N/A N/A

Return:
array

Name Type Format Description Optional
t string N/A Line text
n integer N/A Line number

Usage:
HTTP GET /api2/json/nodes/{node}/syslog
CLI pvesh get /nodes/{node}/syslog



/nodes/{node}/vncshell


POST
Description: Creates a VNC Shell proxy.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Console']] Restricted to users on realm 'pam'

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
upgrade boolean N/A Run 'apt-get dist-upgrade' instead of normal shell.
websocket boolean N/A use websocket instead of standard vnc.

Return:

Name Type Format Description Optional
cert string N/A N/A
ticket string N/A N/A
upid string N/A N/A
port integer N/A N/A
user string N/A N/A

Usage:
HTTP POST /api2/json/nodes/{node}/vncshell
CLI pvesh create /nodes/{node}/vncshell



/nodes/{node}/vncwebsocket


GET
Description: Opens a weksocket for VNC traffic.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Console']] Restricted to users on realm 'pam'. You also need to pass a valid ticket (vncticket).

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
port integer N/A Port number returned by previous vncproxy call.
vncticket string N/A Ticket from previous call to vncproxy.

Return:
object

Name Type Format Description Optional
port string N/A N/A

Usage:
HTTP GET /api2/json/nodes/{node}/vncwebsocket
CLI pvesh get /nodes/{node}/vncwebsocket



/nodes/{node}/spiceshell


POST
Description: Creates a SPICE shell.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Console']] Restricted to users on realm 'pam'

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
upgrade boolean N/A Run 'apt-get dist-upgrade' instead of normal shell.
proxy string address SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).

Return:

Name Type Format Description Optional
host string N/A N/A
password string N/A N/A
type string N/A N/A
proxy string N/A N/A
tls-port integer N/A N/A

Usage:
HTTP POST /api2/json/nodes/{node}/spiceshell
CLI pvesh create /nodes/{node}/spiceshell



/nodes/{node}/dns


GET
Description: Read DNS settings.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
object

Name Type Format Description Optional
dns3 string N/A Third name server IP address.
dns2 string N/A Second name server IP address.
search string N/A Search domain for host-name lookup.
dns1 string N/A First name server IP address.

Usage:
HTTP GET /api2/json/nodes/{node}/dns
CLI pvesh get /nodes/{node}/dns

PUT
Description: Write DNS settings.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
search string N/A Search domain for host-name lookup.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/dns
CLI pvesh set /nodes/{node}/dns



/nodes/{node}/time


GET
Description: Read server time and time zone settings.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Audit']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
object

Name Type Format Description Optional
timezone string N/A Time zone
time integer N/A Seconds since 1970-01-01 00:00:00 UTC.
localtime integer N/A Seconds since 1970-01-01 00:00:00 (local time)

Usage:
HTTP GET /api2/json/nodes/{node}/time
CLI pvesh get /nodes/{node}/time

PUT
Description: Set time zone.
Permissions:

User Permissions Description
N/A [u'perm', u'/nodes/{node}', [u'Sys.Modify']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
timezone string N/A Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.

Return:
null
Usage:
HTTP PUT /api2/json/nodes/{node}/time
CLI pvesh set /nodes/{node}/time



/nodes/{node}/aplinfo


GET
Description: Get list of appliances.
Permissions:

User Permissions Description
all N/A N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
array

Name Type Format Description Optional

Usage:
HTTP GET /api2/json/nodes/{node}/aplinfo
CLI pvesh get /nodes/{node}/aplinfo

POST
Description: Download appliance templates.
Permissions:

User Permissions Description
N/A [u'perm', u'/storage/{storage}', [u'Datastore.AllocateTemplate']] N/A

Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
storage string pve-storage-id The storage identifier.
template string N/A N/A

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/aplinfo
CLI pvesh create /nodes/{node}/aplinfo



/nodes/{node}/startall


POST
Description: Start all VMs and containers (when onboot=1).
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
force boolean N/A force if onboot=0.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/startall
CLI pvesh create /nodes/{node}/startall



/nodes/{node}/stopall


POST
Description: Stop all VMs and Containers.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/stopall
CLI pvesh create /nodes/{node}/stopall



/nodes/{node}/migrateall


POST
Description: Migrate all VMs and Containers.
Parameters:

Name Type Format Description Optional
node string pve-node The cluster node name.
maxworkers integer N/A Max parralel migration job.
target string pve-node Target node.

Return:
string
Usage:
HTTP POST /api2/json/nodes/{node}/migrateall
CLI pvesh create /nodes/{node}/migrateall

Proxmox VE API. Access.
Proxmox VE API. Cluster.
Proxmox VE API. Storage.
Proxmox VE API. Pools.
Proxmox VE API. Versions.

Дата последней правки: 2015-12-25 15:12:43

RSS vasilisc.com   


Разделы

Главная
Новости
Ворох бумаг
Видео Linux
Игры в Linux
Безопасность
Статьи об Astra Linux
Статьи о FreeBSD
Статьи об Ubuntu
Статьи о Snappy
Статьи об Ubuntu Phone
Статьи о Kubuntu
Статьи о Xubuntu
Статьи о Lubuntu
Статьи об Open Source
Карта сайта