Difference between revisions of "VETH device"
(formatting, typos) |
(improve the description) |
||
Line 1: | Line 1: | ||
− | + | == Checkpoint == | |
− | + | VETH is an interconnected pair of devices in two different network namespace. Checkpointing a network namespace with an VETH device in it doesn't require any special options for CRIU. Upon checkpoint, information about one end of VETH pair is saved to [[images]], when this device dies (together with the containing namespace), and the other end dies instantly, too, as it has no peer. | |
− | + | == Restore == | |
+ | |||
+ | When you restore a net namespace with a VETH device end in it, CRIU creates a VETH pair automatically. By default, the "outer" device name is autogenerated by the kernel, which is not convenient. Option <code>--external</code> ([[RPC]] equivalent is <code>opts.external</code> field) can be used to set that name explicitly. | ||
+ | |||
+ | The syntax is <code>--external veth[''NAME'']:''HOSTNAME''@''BRIDGE''</code>, with the <code>@''BRIDGE''</code> part being optional. Here ''NAME'' is an "inner" VETH device name, and ''HOSTNAME'' is the "outer" VETH device name. If <code>@''BRIDGE''</code> is specified, the ''HOSTNAME'' device is added to the appropriate bridge device. | ||
+ | |||
+ | == Obsoleted option == | ||
+ | |||
+ | Option <code>--veth-pair NAME=HOSTNAME[@BRIDGE]</code> (or corresponding [[RPC]] field <code>opts.veths</code>) was used in old versions of CRIU for the same effect as <code>--external veth</code>. This option is now obsolete and will be [[deprecation|deprecated]] soon. | ||
[[Category: HOWTO]] | [[Category: HOWTO]] | ||
[[Category: API]] | [[Category: API]] | ||
[[Category: Network]] | [[Category: Network]] |
Revision as of 00:07, 2 November 2016
Checkpoint
VETH is an interconnected pair of devices in two different network namespace. Checkpointing a network namespace with an VETH device in it doesn't require any special options for CRIU. Upon checkpoint, information about one end of VETH pair is saved to images, when this device dies (together with the containing namespace), and the other end dies instantly, too, as it has no peer.
Restore
When you restore a net namespace with a VETH device end in it, CRIU creates a VETH pair automatically. By default, the "outer" device name is autogenerated by the kernel, which is not convenient. Option --external
(RPC equivalent is opts.external
field) can be used to set that name explicitly.
The syntax is --external veth[NAME]:HOSTNAME@BRIDGE
, with the @BRIDGE
part being optional. Here NAME is an "inner" VETH device name, and HOSTNAME is the "outer" VETH device name. If @BRIDGE
is specified, the HOSTNAME device is added to the appropriate bridge device.
Obsoleted option
Option --veth-pair NAME=HOSTNAME[@BRIDGE]
(or corresponding RPC field opts.veths
) was used in old versions of CRIU for the same effect as --external veth
. This option is now obsolete and will be deprecated soon.