4. Cobbler CLI
This page contains a description for commands which can be used from the CLI.
Note
We are currently developing a new CLI which is independent from the server. This document redirects you to the new documentation once the new CLI is ready.
4.1. General Principles
This should just be a brief overview. For the detailed explanations please refer to Readthedocs.
4.1.1. Distros, Profiles and Systems
Cobbler has a system of inheritance when it comes to managing the information you want to apply to a certain system.
4.1.2. Images
4.1.3. Repositories
4.1.4. Management Classes
4.1.5. Deleting configuration entries
If you want to remove a specific object, use the remove command with the name that was used to add it.
cobbler distro|profile|system|repo|image|mgmtclass|package|file|menu remove --name=string
4.1.6. Editing
If you want to change a particular setting without doing an add
again, use the edit
command, using the same name
you gave when you added the item. Anything supplied in the parameter list will overwrite the settings in the existing
object, preserving settings not mentioned.
cobbler distro|profile|system|repo|image|mgmtclass|package|file|menu edit --name=string [parameterlist]
4.1.7. Copying
Objects can also be copied:
cobbler distro|profile|system|repo|image|mgmtclass|package|file|menu copy --name=oldname --newname=newname
4.1.8. Renaming
Objects can also be renamed, as long as other objects don’t reference them.
cobbler distro|profile|system|repo|image|mgmtclass|package|file|menu rename --name=oldname --newname=newname
4.2. CLI-Commands
Short Usage: cobbler command [subcommand] [--arg1=value1] [--arg2=value2]
Long Usage:
cobbler <distro|profile|system|repo|image|mgmtclass|package|file|menu> ... [add|edit|copy|get-autoinstall*|list|remove|rename|report] [options|--help]
cobbler <aclsetup|buildiso|import|list|mkloaders|replicate|report|reposync|sync|validate-autoinstalls|version|signature|hardlink> [options|--help]
4.2.1. Cobbler distro
This first step towards configuring what you want to install is to add a distribution record to Cobbler’s configuration.
If there is an rsync mirror, DVD, NFS, or filesystem tree available that you would rather import
instead, skip down
to the documentation about the import
command. It’s really a lot easier to follow the import workflow – it only
requires waiting for the mirror content to be copied and/or scanned. Imported mirrors also save time during install
since they don’t have to hit external install sources.
If you want to be explicit with distribution definition, however, here’s how it works:
$ cobbler distro add --name=string --kernel=path --initrd=path [--kernel-options=string] [--kernel-options-post=string] [--autoinstall-meta=string] [--arch=i386|x86_64|ppc|ppc64|ppc64le|arm64] [--breed=redhat|debian|suse] [--template-files=string]
Name |
Description |
---|---|
arch |
Sets the architecture for the PXE bootloader and also controls how Koan’s The default setting (
If you perform a |
autoinstall- meta |
This is an advanced feature that sets automatic installation template variables to substitute, thus enabling those files to be treated as templates. Templates are powered using Cheetah and are described further along in this manpage as well as on the Cobbler Wiki. Example: See the section on “Kickstart Templating” for further information. |
boot-files |
TFTP Boot Files (Files copied into tftpboot beyond the kernel/initrd). |
boot-loaders |
Boot loader space delimited list (Network installation boot loaders). Valid options for list items are <<inherit>>, grub, pxe, ipxe. |
breed |
Controls how various physical and virtual parameters, including kernel arguments for automatic
installation, are to be treated. Defaults to There is limited experimental support for specifying “debian”, “ubuntu”, or “suse”, which treats the automatic installation template file as a preseed/autoyast file format and changes the kernel arguments appropriately. Support for other types of distributions is possible in the future. See the Wiki for the latest information about support for these distributions. The file used for the answer file, regardless of the breed setting, is the value used for
|
comment |
Simple attach a description (Free form text) to your distro. |
fetchable-files |
Fetchable Files (Templates for tftp or wget/curl) |
initrd |
An absolute filesystem path to a initrd image. |
kernel |
An absolute filesystem path to a kernel image. |
kernel-options |
Sets kernel command-line arguments that the distro, and profiles/systems depending on it, will use.
To remove a kernel argument that may be added by a higher Cobbler object (or in the global
settings), you can prefix it with a Example: This example passes the arguments |
kernel-options- post |
This is just like Example: |
mgmt-classes |
Management Classes (Management classes for external config management). |
name |
A string identifying the distribution, this should be something like |
os-version |
Generally this field can be ignored. It is intended to alter some hardware setup for virtualized
instances when provisioning guests with Koan. The valid options for |
owners |
Users with small sites and a limited number of admins can probably ignore this option. All Cobbler
objects (distros, profiles, systems, and repos) can take a –owners parameter to specify what
Cobbler users can edit particular objects.This only applies to the Cobbler WebUI and XML-RPC
interface, not the “cobbler” command line tool run from the shell. Furthermore, this is only
respected by the |
redhat- management-key |
Management Classes (Management classes for external config management). |
remote-boot- kernel |
A URL pointing to the installation initrd of a distribution. If the bootloader has this support, it will directly download the kernel from this URL, instead of the directory of the TFTP client. Note: The kernel (or initrd below) will still be copied into the image directory of the TFTP server. The above kernel parameter is still needed (e.g. to build iso images, etc.). The advantage of letting the boot loader retrieve the kernel/initrd directly is the support of changing/updated distributions. E.g. openSUSE Tumbleweed is updated on the fly and if Cobbler would copy/cache the kernel/initrd in the TFTP directory, you would get a “kernel does not match distribution” (or similar) error when trying to install. |
remote-boot- initrd |
See remote-boot-kernel above. |
template-files |
This feature allows Cobbler to be used as a configuration management system. The argument is a space
delimited string of |
4.2.2. Cobbler profile
A profile associates a distribution to additional specialized options, such as a installation automation file. Profiles are the core unit of provisioning and at least one profile must exist for every distribution to be provisioned. A profile might represent, for instance, a web server or desktop configuration. In this way, profiles define a role to be performed.
$ cobbler profile add --name=string --distro=string [--autoinstall=path] [--kernel-options=string] [--autoinstall-meta=string] [--name-servers=string] [--name-servers-search=string] [--virt-file-size=gigabytes] [--virt-ram=megabytes] [--virt-type=string] [--virt-cpus=integer] [--virt-path=string] [--virt-bridge=string] [--server] [--parent=profile] [--filename=string]
Arguments are the same as listed for distributions, save for the removal of “arch” and “breed”, and with the additions listed below:
Name |
Description |
---|---|
autoinstall |
Local filesystem path to a automatic installation file, the file must reside under
|
autoinstall-meta |
Automatic Installation Metadata (Ex: dog=fang agent=86). |
boot-files |
TFTP Boot Files (Files copied into tftpboot beyond the kernel/initrd). |
boot-loaders |
Boot loader space delimited list (Network installation boot loaders). Valid options for list items are <<inherit>>, grub, pxe, ipxe. |
comment |
Simple attach a description (Free form text) to your distro. |
dhcp-tag |
DHCP Tag (see description in system). |
distro |
The name of a previously defined Cobbler distribution. This value is required. |
enable-ipxe |
Enable iPXE? (Use iPXE instead of PXELINUX for advanced booting options) |
enable-menu |
Enable PXE Menu? (Show this profile in the PXE menu?) |
fetchable-files |
Fetchable Files (Templates for tftp or wget/curl) |
filename |
This parameter can be used to select the bootloader for network boot. If specified, this must be a path relative to the TFTP servers root directory. (e.g. grub/grubx64.efi) For most use cases the default bootloader is correct and this can be omitted |
menu |
This is a way of organizing profiles and images in an automatically generated boot menu for
grub, pxe and ipxe boot loaders. Menu created with |
name |
A descriptive name. This could be something like |
name-servers |
If your nameservers are not provided by DHCP, you can specify a space separated list of addresses here to configure each of the installed nodes to use them (provided the automatic installation files used are installed on a per-system basis). Users with DHCP setups should not need to use this option. This is available to set in profiles to avoid having to set it repeatedly for each system record. |
name-servers-search |
You can specify a space separated list of domain names to configure each of the installed nodes to use them as domain search path. This is available to set in profiles to avoid having to set it repeatedly for each system record. |
next-server |
To override the Next server. |
owners |
Users with small sites and a limited number of admins can probably ignore this option. All
objects (distros, profiles, systems, and repos) can take a –owners parameter to specify what
Cobbler users can edit particular objects.This only applies to the Cobbler WebUI and XML-RPC
interface, not the “cobbler” command line tool run from the shell. Furthermore, this is only
respected by the |
parent |
This is an advanced feature. Profiles may inherit from other profiles in lieu of specifying Example: If profile A has Example: If profile B has Example: If profile A has a |
proxy |
Proxy URL. |
redhat- management-key |
Management Classes (Management classes for external config management). |
repos |
This is a space delimited list of all the repos (created with |
server |
This parameter should be useful only in select circumstances. If machines are on a subnet that
cannot access the Cobbler server using the name/IP as configured in the Cobbler settings file,
use this parameter to override that servername. See also |
template-files |
This feature allows Cobbler to be used as a configuration management system. The argument is a
space delimited string of |
virt-auto-boot |
(Virt-only) Virt Auto Boot (Auto boot this VM?). |
virt-bridge |
(Virt-only) This specifies the default bridge to use for all systems defined under this
profile. If not specified, it will assume the default value in the Cobbler settings file, which
as shipped in the RPM is |
virt-cpus |
(Virt-only) How many virtual CPUs should Koan give the virtual machine? The default is 1. This is an integer. |
virt-disk-driver |
(Virt-only) Virt Disk Driver Type (The on-disk format for the virtualization disk). Valid options are <<inherit>>, raw, qcow2, qed, vdi, vmdk |
virt-file-size |
(Virt-only) How large the disk image should be in Gigabytes. The default is 5. This can be a
comma separated list (ex: |
virt-path |
(Virt-only) Where to store the virtual image on the host system. Except for advanced cases,
this parameter can usually be omitted. For disk images, the value is usually an absolute path
to an existing directory with an optional filename component. There is support for specifying
partitions For multiple disks, separate the values with commas such as |
virt-ram |
(Virt-only) How many megabytes of RAM to consume. The default is 512 MB. This should be input as an integer without units. |
virt-type |
(Virt-only) Koan can install images using either Xen paravirt ( |
4.2.3. Cobbler system
System records map a piece of hardware (or a virtual machine) with the Cobbler profile to be assigned to run on it. This may be thought of as choosing a role for a specific system.
Note that if provisioning via Koan and PXE menus alone, it is not required to create system records in Cobbler, though they are useful when system specific customizations are required. One such customization would be defining the MAC address. If there is a specific role intended for a given machine, system records should be created for it.
System commands have a wider variety of control offered over network details. In order to use these to the fullest possible extent, the automatic installation template used by Cobbler must contain certain automatic installation snippets (sections of code specifically written for Cobbler to make these values become reality). Compare your automatic installation templates with the stock ones in /var/lib/cobbler/templates if you have upgraded, to make sure you can take advantage of all options to their fullest potential. If you are a new Cobbler user, base your automatic installation templates off of these templates.
Read more about networking setup at: https://cobbler.readthedocs.io/en/release28/4_advanced/advanced%20networking.html
Example:
$ cobbler system add --name=string --profile=string [--mac=macaddress] [--ip-address=ipaddress] [--hostname=hostname] [--kernel-options=string] [--autoinstall-meta=string] [--autoinstall=path] [--netboot-enabled=Y/N] [--server=string] [--gateway=string] [--dns-name=string] [--static-routes=string] [--power-address=string] [--power-type=string] [--power-user=string] [--power-pass=string] [--power-id=string]
Adds a Cobbler System to the configuration. Arguments are specified as per “profile add” with the following changes:
Name |
Description |
---|---|
autoinstall |
While it is recommended that the |
autoinstall-meta |
Automatic Installation Metadata (Ex: dog=fang agent=86). |
boot-files |
TFTP Boot Files (Files copied into tftpboot beyond the kernel/initrd). |
boot-loaders |
Boot loader space delimited list (Network installation boot loaders). Valid options for list items are <<inherit>>, grub, pxe, ipxe. |
comment |
Simple attach a description (Free form text) to your distro. |
dhcp-tag |
If you are setting up a PXE environment with multiple subnets/gateways, and are using Cobbler to manage a DHCP configuration, you will probably want to use this option. If not, it can be ignored. By default, the dhcp tag for all systems is “default” and means that in the DHCP template
files the systems will expand out where $insert_cobbler_systems_definitions is found in the
DHCP template. However, you may want certain systems to expand out in other places in the DHCP
config file. Setting This is described further on the Cobbler Wiki. |
dns-name |
If using the DNS management feature (see advanced section – Cobbler supports auto-setup of BIND and dnsmasq), use this to define a hostname for the system to receive from DNS. Example: This is a per-interface parameter. If you have multiple interfaces, it may be different for each interface, for example, assume a DMZ / dual-homed setup. |
enable-ipxe |
Enable iPXE? (Use iPXE instead of PXELINUX for advanced booting options) |
fetchable-files |
Fetchable Files (Templates for tftp or wget/curl) |
filename |
This parameter can be used to select the bootloader for network boot. If specified, this must be a path relative to the TFTP servers root directory. (e.g. grub/grubx64.efi) For most use cases the default bootloader is correct and this can be omitted |
gateway and netmask |
If you are using static IP configurations and the interface is flagged Netmask is a per-interface parameter. Because of the way gateway is stored on the installed OS,
gateway is a global parameter. You may use |
hostname |
This field corresponds to the hostname set in a systems This parameter is assigned once per system, it is not a per-interface setting. |
interface |
By default flags like Interface naming notes: Additional interfaces can be specified (for example: eth1, or any name you like, as long as it does not conflict with any reserved names such as kernel module names) for use with the edit command. Defining VLANs this way is also supported, of you want to add VLAN 5 on interface eth0, simply name your interface eth0.5. Example: cobbler system edit –name=foo –ip-address=192.168.1.50 –mac=AA:BB:CC:DD:EE:A0 cobbler system edit –name=foo –interface=eth0 –ip-address=10.1.1.51 –mac=AA:BB:CC:DD:EE:A1 cobbler system report foo Interfaces can be deleted using the –delete-interface option. Example: cobbler system edit –name=foo –interface=eth2 –delete-interface |
interface-type, interface-master, bonding-opts, bridge-opts |
One of the other advanced networking features supported by Cobbler is NIC bonding, bridging
and BMC. You can use this to bond multiple physical network interfaces to one single logical
interface to reduce single points of failure in your network, to create bridged interfaces for
things like tunnels and virtual machine networks, or to manage BMC interface by DHCP.
Supported values for the Example:
More information about networking setup is available at https://github.com/cobbler/cobbler/wiki/Advanced-networking To review what networking configuration you have for any object, run “cobbler system report” at any time: Example: cobbler system report –name=foo |
if-gateway |
If you are using static IP configurations and have multiple interfaces, use this to define different gateway for each interface. This is a per-interface setting. |
ip-address, ipv6-address |
If Cobbler is configured to generate a DHCP configuration (see advanced section), use this setting to define a specific IP for this system in DHCP. Leaving off this parameter will result in no DHCP management for this particular system. Example: If DHCP management is disabled and the interface is labelled Special feature: To control the default PXE behavior for an entire subnet, this field can also
be passed in using CIDR notation. If When using the CIDR notation trick, don’t specify any arguments other than |
kernel-options |
Sets kernel command-line arguments that the distro, and profiles/systems depending on it, will
use. To remove a kernel argument that may be added by a higher Cobbler object (or in the global
settings), you can prefix it with a Example: This example passes the arguments |
kernel-options-post |
This is just like Example: |
mac, mac-address |
Specifying a mac address via MAC addresses have the format AA:BB:CC:DD:EE:FF. It’s highly recommended to register your MAC addresses in Cobbler if you’re using static addressing with multiple interfaces, or if you are using any of the advanced networking features like bonding, bridges or VLANs. Cobbler does contain a feature (enabled in /etc/cobbler/settings.yaml) that can automatically add new system records when it finds profiles being provisioned on hardware it has seen before. This may help if you do not have a report of all the MAC addresses in your datacenter/lab configuration. |
mgmt-classes |
Management Classes (Management classes for external config management). |
mgmt-parameters |
Management Parameters which will be handed to your management application. (Must be valid YAML dictionary) |
name |
The system name works like the name option for other commands. If the name looks like a MAC address or an IP, the name will implicitly be used for either
A system created with name “default” has special semantics. If a default system object exists, it sets all undefined systems to PXE to a specific profile. Without a “default” system name created, PXE will fall through to local boot for unconfigured systems. When using “default” name, don’t specify any other arguments than |
name-servers |
If your nameservers are not provided by DHCP, you can specify a space separated list of addresses here to configure each of the installed nodes to use them (provided the automatic installation files used are installed on a per-system basis). Users with DHCP setups should not need to use this option. This is available to set in profiles to avoid having to set it repeatedly for each system record. |
name-servers-search |
You can specify a space separated list of domain names to configure each of the installed nodes to use them as domain search path. This is available to set in profiles to avoid having to set it repeatedly for each system record. |
netboot-enabled |
If set false, the system will be provisionable through Koan but not through standard PXE. This will allow the system to fall back to default PXE boot behavior without deleting the Cobbler system object. The default value allows PXE. Cobbler contains a PXE boot loop prevention feature (pxe_just_once, can be enabled in /etc/cobbler/settings.yaml) that can automatically trip off this value after a system gets done installing. This can prevent installs from appearing in an endless loop when the system is set to PXE first in the BIOS order. |
next-server |
To override the Next server. |
owners |
Users with small sites and a limited number of admins can probably ignore this option. All
objects (distros, profiles, systems, and repos) can take a –owners parameter to specify what
Cobbler users can edit particular objects.This only applies to the Cobbler WebUI and XML-RPC
interface, not the “cobbler” command line tool run from the shell. Furthermore, this is only
respected by the |
power-address, power-type, power-user, power-pass, power-id, power-options, power-identity-file |
Cobbler contains features that enable integration with power management for easier installation, reinstallation, and management of machines in a datacenter environment. These parameters are described online at power-management. If you have a power-managed datacenter/lab setup, usage of these features may be something you are interested in. |
profile |
The name of Cobbler profile the system will inherite its properties. |
proxy |
Proxy URL. |
redhat- management-key |
Management Classes (Management classes for external config management). |
repos-enabled |
If set true, Koan can reconfigure repositories after installation. This is described further on the Cobbler Wiki,https://github.com/cobbler/cobbler/wiki/Manage-yum-repos. |
static |
Indicates that this interface is statically configured. Many fields (such as gateway/netmask) will not be used unless this field is enabled. This is a per-interface setting. |
static-routes |
This is a space delimited list of ip/mask:gateway routing information in that format. Most systems will not need this information. This is a per-interface setting. |
virt-auto-boot |
(Virt-only) Virt Auto Boot (Auto boot this VM?). |
virt-bridge |
(Virt-only) This specifies the default bridge to use for all systems defined under this
profile. If not specified, it will assume the default value in the Cobbler settings file, which
as shipped in the RPM is |
virt-cpus |
(Virt-only) How many virtual CPUs should Koan give the virtual machine? The default is 1. This is an integer. |
virt-disk-driver |
(Virt-only) Virt Disk Driver Type (The on-disk format for the virtualization disk). Valid options are <<inherit>>, raw, qcow2, qed, vdi, vmdk |
virt-file-size |
(Virt-only) How large the disk image should be in Gigabytes. The default is 5. This can be a
comma separated list (ex: |
virt-path |
(Virt-only) Where to store the virtual image on the host system. Except for advanced cases,
this parameter can usually be omitted. For disk images, the value is usually an absolute path
to an existing directory with an optional filename component. There is support for specifying
partitions For multiple disks, separate the values with commas such as |
virt-ram |
(Virt-only) How many megabytes of RAM to consume. The default is 512 MB. This should be input as an integer without units. |
virt-type |
(Virt-only) Koan can install images using either Xen paravirt ( |
4.2.4. Cobbler repo
Repository mirroring allows Cobbler to mirror not only install trees (“cobbler import” does this for you) but also optional packages, 3rd party content, and even updates. Mirroring all of this content locally on your network will result in faster, more up-to-date installations and faster updates. If you are only provisioning a home setup, this will probably be overkill, though it can be very useful for larger setups (labs, datacenters, etc).
$ cobbler repo add --mirror=url --name=string [--rpmlist=list] [--creatrepo-flags=string] [--keep-updated=Y/N] [--priority=number] [--arch=string] [--mirror-locally=Y/N] [--breed=yum|rsync|rhn] [--mirror_type=baseurl|mirrorlist|metalink]
Name |
Description |
|
---|---|---|
apt-components |
Apt Components (apt only) (ex: main restricted universe) |
|
apt-dists |
Apt Dist Names (apt only) (ex: precise precise-updates) |
|
arch |
Specifies what architecture the repository should use. By default the current system arch (of the
server) is used,which may not be desirable. Using this to override the default arch allows
mirroring of source repositories(using |
|
breed |
Ordinarily Cobbler’s repo system will understand what you mean without supplying this parameter, though you can set it explicitly if needed. |
|
comment |
Simple attach a description (Free form text) to your distro. |
|
createrepo-flags |
Specifies optional flags to feed into the createrepo tool, which is called when
|
|
keep-updated |
Specifies that the named repository should not be updated during a normal “cobbler reposync”. The repo may still be updated by name. The repo should be synced at least once before disabling this feature. See “cobbler reposync” below. |
|
mirror |
The address of the yum mirror. This can be an The mirror address should specify an exact repository to mirror – just one architecture and just one distribution. If you have a separate repo to mirror for a different arch, add that repo separately. Here’s an example of what looks like a good URL:
Experimental support is also provided for mirroring RHN content when you need a fast local mirror.
The mirror syntax for this is |
|
mirror-locally |
When set to |
|
name |
This name is used as the save location for the mirror. If the mirror represented, say, Fedora
Core 6 i386 updates, a good name would be This name corresponds with values given to the Distros that can make use of yum repositories during automatic installation include FC6 and later, RHEL 5 and later, and derivative distributions. See the documentation on |
|
|
||
|
||
proxy | Proxy URL. |
||
|
||
yumopts |
Sets values for additional yum options that the repo should use on installed systems. For instance
if a yum plugin takes a certain parameter “alpha” and “beta”, use something like
|
$ cobbler repo autoadd
Add enabled yum repositories from dnf repolist --enabled
list. The repository names are generated using the
<repo id>-<releasever>-<arch> pattern (ex: fedora-32-x86_64). Existing repositories with such names are not overwritten.
4.2.5. Cobbler image
Example:
$ cobbler image
4.2.6. Cobbler mgmtclass
Management classes allows Cobbler to function as an configuration management system. Cobbler currently supports the following resource types:
Packages
Files
Resources are executed in the order listed above.
$ cobbler mgmtclass add --name=string --comment=string [--packages=list] [--files=list]
Name |
Description |
---|---|
class-name |
Class Name (Actual Class Name (leave blank to use the name field)). |
comment |
A comment that describes the functions of the management class. |
files |
Specifies a list of file resources required by the management class. |
name |
The name of the mgmtclass. Use this name when adding a management class to a system, profile, or distro.
To add a mgmtclass to an existing system use something like
( |
packages |
Specifies a list of package resources required by the management class. |
4.2.7. Cobbler package
Package resources are managed using cobbler package add
Actions:
Name |
Description |
---|---|
install |
Install the package. [Default] |
uninstall |
Uninstall the package. |
Attributes:
Name |
Description |
---|---|
installer |
Which package manager to use, valid options [rpm|yum]. |
name |
Cobbler object name. |
version |
Which version of the package to install. |
Example:
$ cobbler package add --name=string --comment=string [--action=install|uninstall] --installer=string [--version=string]
4.2.8. Cobbler file
Actions:
Name |
Description |
---|---|
create |
Create the file. [Default] |
remove |
Remove the file. |
Attributes:
Name |
Description |
---|---|
group |
The group owner of the file. |
mode |
Permission mode (as in chmod). |
name |
Name of the cobbler file object |
path |
The path for the file. |
template |
The template for the file. |
user |
The user for the file. |
Example:
$ cobbler file add --name=string --comment=string [--action=string] --mode=string --group=string --owner=string --path=string [--template=string]
4.2.10. Cobbler aclsetup
Example:
$ cobbler aclsetup
4.2.11. Cobbler buildiso
This command may not behave like you expect it without installing additional dependencies and configuration. The in depth explanation can be found at Building ISOs.
Note
Systems refers to systems that are profile based. Systems with a parent image based systems will be skipped.
Name |
Description |
iso |
Output ISO to this file. If the file exists it will be truncated to zero before. |
profiles |
Use these profiles only for information collection. |
systems |
(net-only) Use these systems only for information collection. |
tempdir |
Working directory for building the ISO. The default value is set in the settings file. |
distro |
Used to detect the architecture of the ISO you are building. Specifies also the used Kernel and Initrd. |
standalone |
(offline-only) Creates a standalone ISO with all required distribution files but without any added repositories. |
airgapped |
(offline-only) Implies –standalone but additionally includes repo files for disconnected system installations. |
source |
(offline-only) Used with –standalone or –airgapped to specify a source for the distribution files. |
exclude-dns |
(net-only) Prevents addition of name server addresses to the kernel boot options. |
xorriso-opts |
Extra options for xorriso. |
Example: The following command builds a single ISO file for all profiles and systems present under the distro test.
$ cobbler buildiso --distro=test
4.2.12. Cobbler import
Note
When running Cobbler via systemd, you cannot mount the ISO to /tmp
or a sub-folder of it because we are using the
option Private Temporary Directory, to enhance the security of our application.
Example:
$ cobbler import
4.2.13. Cobbler list
This list all the names grouped by type. Identically to cobbler report
there are subcommands for most of the other
Cobbler commands. (Currently: distro, profile, system, repo, image, mgmtclass, package, file)
$ cobbler list
4.2.14. Cobbler replicate
Cobbler can replicate configurations from a master Cobbler server. Each Cobbler server is still expected to have a
locally relevant /etc/cobbler/cobbler.conf
and modules.conf
, as these files are not synced.
This feature is intended for load-balancing, disaster-recovery, backup, or multiple geography support.
Cobbler can replicate data from a central server.
Objects that need to be replicated should be specified with a pattern, such as --profiles="webservers* dbservers*"
or --systems="*.example.org"
. All objects matched by the pattern, and all dependencies of those objects matched by
the pattern (recursively) will be transferred from the remote server to the central server. This is to say if you intend
to transfer *.example.org
and the definition of the systems have not changed, but a profile above them has changed,
the changes to that profile will also be transferred.
In the case where objects are more recent on the local server, those changes will not be overridden locally.
Common data locations will be rsync’ed from the master server unless --omit-data
is specified.
To delete objects that are no longer present on the master server, use --prune
.
Warning: This will delete all object types not present on the remote server from the local server, and is recursive. If you use prune, it is best to manage Cobbler centrally and not expect changes made on the slave servers to be preserved. It is not currently possible to just prune objects of a specific type.
Example:
$ cobbler replicate --master=cobbler.example.org [--distros=pattern] [--profiles=pattern] [--systems=pattern] [--repos-pattern] [--images=pattern] [--prune] [--omit-data]
4.2.15. Cobbler report
This lists all configuration which Cobbler can obtain from the saved data. There are also report
subcommands for
most of the other Cobbler commands (currently: distro, profile, system, repo, image, mgmtclass, package, file, menu).
$ cobbler report --name=[object-name]
–name=[object-name]
Optional parameter which filters for object with the given name.
4.2.16. Cobbler reposync
Example:
$ cobbler reposync [--only=ONLY] [--tries=TRIES] [--no-fail]
Cobbler reposync is the command to use to update repos as configured with cobbler repo add
. Mirroring can
take a long time, and usage of cobbler reposync prior to usage is needed to ensure provisioned systems have the
files they need to actually use the mirrored repositories. If you just add repos and never run cobbler reposync
,
the repos will never be mirrored. This is probably a command you would want to put on a crontab, though the
frequency of that crontab and where the output goes is left up to the systems administrator.
For those familiar with dnf’s reposync, cobbler’s reposync is (in most uses) a wrapper around the dnf reposync
command. Please use cobbler reposync
to update cobbler mirrors, as dnf’s reposync does not perform all required steps.
Also cobbler adds support for rsync and SSH locations, where as dnf’s reposync only supports what dnf supports
(http/ftp).
If you ever want to update a certain repository you can run:
cobbler reposync --only="reponame1" ...
When updating repos by name, a repo will be updated even if it is set to be not updated during a regular reposync
operation (ex: cobbler repo edit –name=reponame1 –keep-updated=0
).
Note that if a cobbler import provides enough information to use the boot server as a yum mirror for core packages,
cobbler can set up automatic installation files to use the cobbler server as a mirror instead of the outside world. If
this feature is desirable, it can be turned on by setting yum_post_install_mirror
to True
in
/etc/cobbler/settings.yaml
(and running cobbler sync
). You should not use this feature if machines are
provisioned on a different VLAN/network than production, or if you are provisioning laptops that will want to acquire
updates on multiple networks.
The flags --tries=N
(for example, --tries=3
) and --no-fail
should likely be used when putting re-posync on a
crontab. They ensure network glitches in one repo can be retried and also that a failure to synchronize one repo does
not stop other repositories from being synchronized.
4.2.17. Cobbler sync
The sync command is very important, though very often unnecessary for most situations. It’s primary purpose is to force a rewrite of all configuration files, distribution files in the TFTP root, and to restart managed services. So why is it unnecessary? Because in most common situations (after an object is edited, for example), Cobbler executes what is known as a “lite sync” which rewrites most critical files.
When is a full sync required? When you are using manage_dhcpd
(Managing DHCP) with systems that use static leases.
In that case, a full sync is required to rewrite the dhcpd.conf
file and to restart the dhcpd service.
Cobbler sync is used to repair or rebuild the contents /tftpboot
or /var/www/cobbler
when something has changed
behind the scenes. It brings the filesystem up to date with the configuration as understood by Cobbler.
Sync should be run whenever files in /var/lib/cobbler
are manually edited (which is not recommended except for the
settings file) or when making changes to automatic installation files. In practice, this should not happen often, though
running sync too many times does not cause any adverse effects.
If using Cobbler to manage a DHCP and/or DNS server (see the advanced section of this manpage), sync does need to be run
after systems are added to regenerate and reload the DHCP/DNS configurations. If you want to trigger the DHCP/DNS
regeneration only and do not want a complete sync, you can use cobbler sync --dhcp
or cobbler sync --dns
or the
combination of both.
cobbler sync --systems
is used to only write specific systems (must exists in backend storage) to the TFTP folder.
The expected pattern is a comma separated list of systems e.g. sys1.internal,sys2.internal,sys3.internal
.
Note
Please note that at least once a full sync has to be run beforehand.
The sync process can also be kicked off from the web interface.
Example:
$ cobbler sync
$ cobbler sync [--systems=sys1.internal,sys2.internal,sys3.internal]
$ cobbler sync [--dns]
$ cobbler sync [--dhcp]
$ cobbler sync [--dns --dhcp]
4.2.18. Cobbler validate-autoinstalls
Example:
$ cobbler validate-autoinstalls
4.2.19. Cobbler version
Example:
$ cobbler version
4.2.20. Cobbler signature
Example:
$ cobbler signature
4.2.21. Cobbler hardlink
Example:
$ cobbler hardlink
4.2.22. Cobbler mkloaders
This command is used for generating UEFI bootable GRUB 2 bootloaders. This command has no options and is configured via the settings file of Cobbler. If available on the operating system Cobbler is running on, then this also generates bootloaders for different architectures then the one of the system.
Note
This command should be executed every time the bootloader modules are being updated, running it more frequently does not help, running it less frequently will cause the bootloader to be possibly vulnerable.
Example:
$ cobbler mkloaders
4.3. EXIT_STATUS
Cobbler’s command line returns a zero for success and non-zero for failure.
4.4. Additional Help
We have a Gitter Channel and you also can ask questions as GitHub issues. The IRC Channel on Freenode (#cobbler) is not that active but sometimes there are people who can help you.
The way we would prefer are GitHub issues as they are easily searchable.