---
name: "vserver-build"
section: "8"
platform: "linux"
package: "util-vserver"
version: "0.30.216-pre3120-1.4+b11"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/vserver-build"
---

# vserver-build(8)

initializes a vserver

## NAME

vserver-build - initializes a vserver

## SYNTAX

**vserver-build** **-m** *method* **-n** *name* \[**--force**\] \[**--keep**\] \[**--rootdir** *dir*\] \[**--pkgbase** *dir*\] *config options\** \[**--**\] *method arguments\**

- **-m** *method*

  Use build *method*; see below for possible values.

- **-n** *name*

  Name of vserver you are building.

- **--force**

  Remove/rename already existing vservers with the same name.

- **--keep**

  Do not delete generated files and directories if vserver build fails.

- **--rootdir** *dir*

  Root vserver directory \[default: /etc/vservers/.defaults/vdirbase\].

- **--pkgbase** *dir*

  Package base directory \[default: /var/lib/vservers/.pkg\].

## CONFIG OPTIONS

- **--context** *num*

  -

  The static context of the vserver \[default: none; one will be generated for you\]. The valid range is 2 through 49151.

- **--confdir** *dir*

  -

  The vserver configuration directory to use \[default: /etc/vservers/\<name\>\].

- **--lockfile** *filename*

  -

  The lockfile to use \[default: /var/run/vservers/\<name\>\].

- **--hostname** *hostname*

  -

  Hostname of the vserver.

- **--netdev** *device*

  -

  The default interface to use for **--interface**.

- **--netbcast** *broadcast*

  -

  Broadcast address to associate with the vserver.

- **--netmask** *netmask*\|**--netprefix** *prefixlen*

  -

  Sets the default netmask (a.b.c.d quadruple) or prefixlen (length of the network).

- **--interface** \[*name-suffix*=\]\[*device*:\]*ip*\[/*mask\|prefixlen*\]

  -

  Declares a network-interface name and associated IP/netmask; this option can be specified multiple times.

- **--flags** *flags+*

  -

  Sets comma-separated list of flags; see lib/cflags-v13.c for a list.

- **--cpuset** *name*

  -

  Declares the CPUSET this vserver will run in \[default: none\]

- **--cpusetcpus** *number\[-number\]\[:exclusive\]*

  -

  Sets which CPUs belong to the CPUSET, *:exclusive* is a flag (0\|1) prohibiting any other cpuset from using those CPUs.

- **--cpusetmems** *number\[-number\]\[:exclusive\]*

  -

  Sets which memory pools belong to the CPUSET, *:exclusive* is a flag (0\|1) prohibiting any other cpuset from using those memory pools.

- **--cpusetvirt**

  -

  Virtualize the cpuset (the vserver will see only CPUs defined in the cpuset). Requires kernel patch from http://www.bullopensource.org/cpuset/

- **--initstyle** *style*

  -

  Configures the initstyle (e.g. minit, sysv, plain, gentoo)

## METHODS

- **apt-rpm**

  -

   **--** **-d** *distribution*

  Installs the base-packages of the given distribution with the help of **vapt-get**

- **yum**

  -

  **--** **-d** *distribution*

  Installs the base-packages of the given distribution with help of **vyum**

- **rpm**

  -

  **--** \[**-d** *distribution*\] **--empty**\|(\[**--force**\] \[**--nodeps**\] *manifest*)+

  Installs lists of rpm-packages

- **skeleton**

  -

  **--** \[*cmd args\**\]

  Installs a minimal skeleton filesystem, creates the configuration file and calls an optional command

- **debootstrap**

  -

  **--** **-d** *distribution* \[**-m** *mirror*\] \[**-s** *script*\] \[**--** *debootstrap-options\**\]

  Bootstraps the vserver with Debian's 'debootstrap' package

- **template**

  -

  **--** (**-t** *tarball*)+ \[**-d** *distribution*\]

  Installs a vserver using tarball(s)

- **fai**

  -

  **--** \[**-f** *fai\_vserver*\] \[**-n** *nfsroot*\] \[**-d** *fai\_dir*\] \[**-a**\]

  Bootstraps the vserver with the Debian Fully Automatic Installation

  **-f** means use the nfsroot and profile in the vserver *fai\_vserver*

  **-n** *nfsroot* specifies the 'NFS' root explicitly

  **-d** *fai\_dir* specifies the location of the FAI profile

  the **-f** option implies **-n** and **-d** are relative to the *fai\_vserver*

- **rsync**

  -

  **--** \[**-d** *distribution*\] **--source** *source* \[**-o** *rsync option*\]\*

  Installs a vserver by rsyncing from *source* to the guest root

- **clone**

  -

  **--** \[**-d** *distribution*\] **--source** *source*

  Clones a vserver by linking unified files and copying the rest

## EXAMPLES

\# vserver kea build -m debootstrap --context 10 --hostname kea --interface eth0:192.168.0.44/32 -- -d etch

## BUGS

Please report bugs to vserver@list.linux-vserver.org

## AUTHORS

This man page was written by Micah Anderson \<micah@debian.org\> and based upon the helpful output from the program itself.

## SEE ALSO

 [chbind(8)](/chbind/8.md) [chcontext(8)](/chcontext/8.md)\
  [rebootmgr(8)](/rebootmgr/8.md) [reducecap(8)](/reducecap/8.md)\
  [vps(8)](/vps/8.md) [vpstree(8)](/vpstree/8.md)\
  [vrpm(8)](/vrpm/8.md)\
  [vserver-stat(8)](/vserver-stat/8.md)\
  [vtop(8)](/vtop/8.md)
