检查cobbler:
[iyunv@cobbler ~]# cobbler check
The following are potential configuration items that you may want to fix:
1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work. This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.
2 : For PXE to be functional, the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network.
3 : change 'disable' to 'no' in /etc/xinetd.d/tftp
4 : some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely. Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.
5 : enable and start rsyncd.service with systemctl
6 : debmirror package is not installed, it will be required to manage debian deployments and repositories
7 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
8 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
Restart cobblerd and then run 'cobbler sync' to apply changes.
修改cobbler的配置文件:
1
2
3
4
5
6
7
[iyunv@cobbler ~]# vim /etc/cobbler/settings
# if you do not set this correctly, this will be manifested in TFTP open timeouts.
将“next_server: 127.0.0.1”修改为“next_server: 10.10.10.222”
将“server: 127.0.0.1”修改为“server: 10.10.10.222”
# set to 1 to enable Cobbler's DHCP management features.
# the choice of DHCP management engine is in /etc/cobbler/modules.conf
将“manage_dhcp: 0”修改为“manage_dhcp: 1”
[iyunv@cobbler ~]# cobbler get-loaders
task started: 2017-03-20_110931_get_loaders
task started (id=Download Bootloader Content, time=Mon Mar 20 11:09:31 2017)
downloading https://cobbler.github.io/loaders/README to /var/lib/cobbler/loaders/README
downloading https://cobbler.github.io/loaders/COPYING.elilo to /var/lib/cobbler/loaders/COPYING.elilo
downloading https://cobbler.github.io/loaders/COPYING.yaboot to /var/lib/cobbler/loaders/COPYING.yaboot
downloading https://cobbler.github.io/loaders/COPYING.syslinux to /var/lib/cobbler/loaders/COPYING.syslinux
downloading https://cobbler.github.io/loaders/elilo-3.8-ia64.efi to /var/lib/cobbler/loaders/elilo-ia64.efi
downloading https://cobbler.github.io/loaders/yaboot-1.3.17 to /var/lib/cobbler/loaders/yaboot
downloading https://cobbler.github.io/loaders/pxelinux.0-3.86 to /var/lib/cobbler/loaders/pxelinux.0
downloading https://cobbler.github.io/loaders/menu.c32-3.86 to /var/lib/cobbler/loaders/menu.c32
downloading https://cobbler.github.io/loaders/grub-0.97-x86.efi to /var/lib/cobbler/loaders/grub-x86.efi
downloading https://cobbler.github.io/loaders/grub-0.97-x86_64.efi to /var/lib/cobbler/loaders/grub-x86_64.efi
*** TASK COMPLETE ***
[iyunv@cobbler ~]# systemctl restart cobblerd.service
[iyunv@cobbler ~]# cobbler check
The following are potential configuration items that you may want to fix:
1 : debmirror package is not installed, it will be required to manage debian deployments and repositories
2 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
[iyunv@cobbler ~]# cd /etc/cobbler/
[iyunv@cobbler cobbler]# ls
auth.conf dhcp.template ldap power rsync.template users.conf zone_templates
cheetah_macros dnsmasq.template modules.conf pxe secondary.template users.digest
cobbler_bash import_rsync_whitelist mongodb.conf reporting settings version
completions iso named.template rsync.exclude tftpd.template zone.template
[iyunv@cobbler ~]# cobbler profile edit --help
Usage: cobbler [options]
Options:
-h, --help show this help message and exit
--name=NAME Name (Ex: F10-i386-webserver)
--uid=UID
--owners=OWNERS Owners (Owners list for authz_ownership (space
delimited))
--distro=DISTRO Distribution (Parent distribution)
--parent=PARENT Parent Profile
--enable-gpxe=ENABLE_GPXE
Enable gPXE? (Use gPXE instead of PXELINUX for
advanced booting options)
--enable-menu=ENABLE_MENU
Enable PXE Menu? (Show this profile in the PXE menu?)
--kickstart=KICKSTART
Kickstart (Path to kickstart template)
--kopts=KERNEL_OPTIONS
Kernel Options (Ex: selinux=permissive)
--kopts-post=KERNEL_OPTIONS_POST
Kernel Options (Post Install) (Ex: clocksource=pit
noapic)
--ksmeta=KS_META Kickstart Metadata (Ex: dog=fang agent=86)
--proxy=PROXY Internal proxy (Internal proxy URL)
--repos=REPOS Repos (Repos to auto-assign to this profile)
--comment=COMMENT Comment (Free form text description)
--virt-auto-boot=VIRT_AUTO_BOOT
Virt Auto Boot (Auto boot this VM?)
--virt-cpus=VIRT_CPUS
Virt CPUs (integer)
--virt-file-size=VIRT_FILE_SIZE
Virt File Size(GB)
--virt-disk-driver=VIRT_DISK_DRIVER
Virt Disk Driver Type (The on-disk format for the
virtualization disk)
--virt-ram=VIRT_RAM Virt RAM (MB)
--depth=DEPTH
--virt-type=VIRT_TYPE
Virt Type (Virtualization technology to use) (valid
options: xenpv,xenfv,qemu,kvm,vmware,openvz,SETTINGS:d
efault_virt_type)
--virt-path=VIRT_PATH
Virt Path (Ex: /directory OR VolGroup00)
--virt-bridge=VIRT_BRIDGE
Virt Bridge
--dhcp-tag=DHCP_TAG DHCP Tag (See manpage or leave blank)
--server=SERVER Server Override (See manpage or leave blank)
--ctime=CTIME
--mtime=MTIME
--name-servers=NAME_SERVERS
Name Servers (space delimited)
--name-servers-search=NAME_SERVERS_SEARCH
Name Servers Search Path (space delimited)
--mgmt-classes=MGMT_CLASSES
Management Classes (For external configuration
management)
--mgmt-parameters=MGMT_PARAMETERS
Management Parameters (Parameters which will be handed
to your management application (Must be valid YAML
dictionary))
--boot-files=BOOT_FILES
TFTP Boot Files (Files copied into tftpboot beyond the
kernel/initrd)
--fetchable-files=FETCHABLE_FILES
Fetchable Files (Templates for tftp or wget/curl)
--template-files=TEMPLATE_FILES
Template Files (File mappings for built-in config
management)
--redhat-management-key=REDHAT_MANAGEMENT_KEY
Red Hat Management Key (Registration key for RHN,
Spacewalk, or Satellite)
--redhat-management-server=REDHAT_MANAGEMENT_SERVER
Red Hat Management Server (Address of Spacewalk or
Satellite Server)
--template-remote-kickstarts=TEMPLATE_REMOTE_KICKSTARTS
--clobber allow add to overwrite existing objects
--in-place edit items in kopts or ksmeta without clearing the
other items