Set-PveNodesLxcConfig
Set container options.
API: PUT /nodes/{node}/lxc/{vmid}/config, Proxmox VE API viewer
Aliases: Set-PveLxcConfig
Syntax
Section titled “Syntax”Set-PveNodesLxcConfig [-PveTicket <PveTicket>] [-Arch <string>] [-Cmode <string>] [-Console <bool>] [-Cores <int>] [-Cpulimit <float>] [-Cpuunits <int>] [-Debug_ <bool>] [-Delete <string>] [-Description <string>] [-DevN <hashtable>] [-Digest <string>] [-Entrypoint <string>] [-Env <string>] [-Features <string>] [-Hookscript <string>] [-Hostname <string>] [-Lock <string>] [-Memory <int>] [-MpN <hashtable>] [-Nameserver <string>] [-NetN <hashtable>] -Node <string> [-Onboot <bool>] [-Ostype <string>] [-Protection <bool>] [-Revert <string>] [-Rootfs <string>] [-Searchdomain <string>] [-Startup <string>] [-Swap <int>] [-Tags <string>] [-Template <bool>] [-Timezone <string>] [-Tty <int>] [-Unprivileged <bool>] [-UnusedN <hashtable>] -Vmid <int> [<CommonParameters>]Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
-PveTicket |
PveTicket |
No | Ticket data connection. |
-Arch |
string |
No | OS architecture type. Values: amd64, i386, arm64, armhf, riscv32, riscv64. |
-Cmode |
string |
No | 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). Values: shell, console, tty. |
-Console |
bool |
No | Attach a console device (/dev/console) to the container. |
-Cores |
int |
No | The number of cores assigned to the container. A container can use all available cores by default. |
-Cpulimit |
float |
No | Limit of CPU usage. NOTE: If the computer has 2 CPUs, it has a total of ‘2’ CPU time. Value ‘0’ indicates no CPU limit. |
-Cpuunits |
int |
No | CPU weight for a container, will be clamped to [1, 10000] in cgroup v2. |
-Debug_ |
bool |
No | Try to be more verbose. For now this only enables debug log-level on start. |
-Delete |
string |
No | A list of settings you want to delete. |
-Description |
string |
No | Description for the Container. Shown in the web-interface CT’s summary. This is saved as comment inside the configuration file. |
-DevN |
hashtable |
No | Device to pass through to the container. |
-Digest |
string |
No | Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications. |
-Entrypoint |
string |
No | Command to run as init, optionally with arguments; may start with an absolute path, relative path, or a binary in $PATH. |
-Env |
string |
No | The container runtime environment as NUL-separated list. Replaces any lxc.environment.runtime entries in the config. |
-Features |
string |
No | Allow containers access to advanced features. |
-Hookscript |
string |
No | Script that will be executed during various steps in the containers lifetime. |
-Hostname |
string |
No | Set a host name for the container. |
-Lock |
string |
No | Lock/unlock the container. Values: backup, create, destroyed, disk, fstrim, migrate, mounted, rollback, snapshot, snapshot-delete. |
-Memory |
int |
No | Amount of RAM for the container in MB. |
-MpN |
hashtable |
No | Use volume as container mount point. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. |
-Nameserver |
string |
No | Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver. |
-NetN |
hashtable |
No | Specifies network interfaces for the container. |
-Node |
string |
Yes | The cluster node name. |
-Onboot |
bool |
No | Specifies whether a container will be started during system bootup. |
-Ostype |
string |
No | OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value ‘unmanaged’ can be used to skip and OS specific setup. Values: debian, devuan, ubuntu, centos, fedora, opensuse, archlinux, alpine, gentoo, nixos, unmanaged. |
-Protection |
bool |
No | Sets the protection flag of the container. This will prevent the CT or CT’s disk remove/update operation. |
-Revert |
string |
No | Revert a pending change. |
-Rootfs |
string |
No | Use volume as container root. |
-Searchdomain |
string |
No | Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver. |
-Startup |
string |
No | 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. |
-Swap |
int |
No | Amount of SWAP for the container in MB. |
-Tags |
string |
No | Tags of the Container. This is only meta information. |
-Template |
bool |
No | Enable/disable Template. |
-Timezone |
string |
No | Time zone to use in the container. If option isn’t set, then nothing will be done. Can be set to ‘host’ to match the host time zone, or an arbitrary time zone option from /usr/share/zoneinfo/zone.tab. |
-Tty |
int |
No | Specify the number of tty available to the container. |
-Unprivileged |
bool |
No | Makes the container run as unprivileged user. For creation, the default is 1. For restore, the default is the value from the backup. (Should not be modified manually.) |
-UnusedN |
hashtable |
No | Reference to unused volumes. This is used internally, and should not be modified manually. |
-Vmid |
int |
Yes | The (unique) ID of the VM. |
Every parameter also binds by property name from the pipeline, so an object with node and vmid properties (the output of Get-PveGuest, for one) fills -Node and -Vmid. Without -PveTicket the cmdlet uses the last connection, see Connection.
Output
Section titled “Output”A PveResponse: the data returned by Proxmox VE is in .Response.data, the outcome in .IsSuccessStatusCode. See Results and Errors.