From: Dietmar Maurer Date: Sat, 7 May 2016 09:16:32 +0000 (+0200) Subject: pct: add auto-generated network options X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=commitdiff_plain;h=bac8c3856f615ec0753fc64246c1dbda6c6a456a pct: add auto-generated network options --- diff --git a/Makefile b/Makefile index ee2150a..f876cd9 100644 --- a/Makefile +++ b/Makefile @@ -86,6 +86,7 @@ GEN_DEB_SOURCES= \ GEN_SCRIPTS= \ gen-datacenter.cfg.5-opts.pl \ gen-pct.conf.5-opts.pl \ + gen-pct-network-opts.pl \ gen-qm.conf.5-opts.pl \ gen-vzdump.conf.5-opts.pl \ gen-pve-firewall-cluster-opts.pl \ @@ -270,7 +271,7 @@ upload: ${GEN_DEB} ${DOC_DEB} update: clean rm -f *.5-opts.adoc *.1-synopsis.adoc *.8-synopsis.adoc rm -f api-viewer/apidata.js - rm -f pve-firewall-macros.adoc + rm -f pve-firewall-macros.adoc pct-network-opts.adoc make all clean: diff --git a/gen-pct-network-opts.pl b/gen-pct-network-opts.pl new file mode 100755 index 0000000..5f3f5cc --- /dev/null +++ b/gen-pct-network-opts.pl @@ -0,0 +1,19 @@ +#!/usr/bin/perl + +use lib '.'; +use strict; +use warnings; +use PVE::RESTHandler; +use PVE::LXC::Config; + +my $prop = PVE::LXC::Config->json_config_properties(); + +my $phash = $prop->{net0}; + +my $format = $phash->{format}; + +my $typetext = PVE::PodParser::schema_get_type_text($phash); + +print "`net[n]`: `$typetext`\n\n"; + +print PVE::RESTHandler::dump_properties($format); diff --git a/pct-network-opts.adoc b/pct-network-opts.adoc new file mode 100644 index 0000000..571ea54 --- /dev/null +++ b/pct-network-opts.adoc @@ -0,0 +1,57 @@ +`net[n]`: `name= [,bridge=>] [,firewall=<[1|0]>] [,gw=] [,gw6=] [,hwaddr=] [,ip=] [,ip6=] [,mtu=] [,rate=] [,tag=] [,trunks=] [,type=]` + +`bridge`: `>` :: + +Bridge to attach the network device to. + +`firewall`: `<[1|0]>` :: + +Controls whether this interface's firewall rules should be used. + +`gw`: `` :: + +Default gateway for IPv4 traffic. + +`gw6`: `` :: + +Default gateway for IPv6 traffic. + +`hwaddr`: `` :: + +The interface MAC address. This is dynamically allocated by default, but +you can set that statically if needed, for example to always have the same +link-local IPv6 address. (lxc.network.hwaddr) + +`ip`: `` :: + +IPv4 address in CIDR format. + +`ip6`: `` :: + +IPv6 address in CIDR format. + +`mtu`: `` :: + +Maximum transfer unit of the interface. (lxc.network.mtu) + +`name`: `` :: + +Name of the network device as seen from inside the container. +(lxc.network.name) + +`rate`: `` :: + +Apply rate limiting to the interface + +`tag`: `` :: + +VLAN tag for this interface. + +`trunks`: `` :: + +VLAN ids to pass through the interface + +`type`: `(veth)` :: + +Network interface type. + diff --git a/pct.adoc b/pct.adoc index 2d52ad2..0b69db1 100644 --- a/pct.adoc +++ b/pct.adoc @@ -391,7 +391,11 @@ group/others model. Container Network ----------------- -TODO +You can configure up to 10 network interfaces for a single +container. The corresponding options are called 'net0' to 'net9', and +they can contain the following setting: + +include::pct-network-opts.adoc[] Managing Containers with 'pct' diff --git a/pve-doc-generator.mk b/pve-doc-generator.mk index 066ff43..98bf3e7 100644 --- a/pve-doc-generator.mk +++ b/pve-doc-generator.mk @@ -57,6 +57,7 @@ PVECEPH_MAN1_SOURCES= \ PCT_MAN1_SOURCES= \ pct.adoc \ pct.1-synopsis.adoc \ + pct-network-opts.adoc \ ${PVE_COMMON_DOC_SOURCES} PCT_CONF_MAN5_SOURCES= \