挂载并导入数据:
[root@cobbler ~]# mount /dev/cdrom /mnt
mount: /dev/sr0 is write-protected, mounting read-only
[root@cobbler ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cl-root 50G 9.8G 41G 20% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 144K 1.9G 1% /dev/shm
tmpfs 1.9G 9.0M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/mapper/cl-home 46G 36M 46G 1% /home
/dev/sda1 1014M 175M 840M 18% /boot
tmpfs 378M 12K 378M 1% /run/user/0
/dev/sr0 4.1G 4.1G 0 100% /mnt
[root@cobbler ~]# cobbler import --path=/mnt --name=CentOS-7.3 --arch=x86_64
task started: 2017-03-20_113200_import
task started (id=Media import, time=Mon Mar 20 11:32:00 2017)
Found a candidate signature: breed=redhat, version=rhel6
Found a candidate signature: breed=redhat, version=rhel7
Found a matching signature: breed=redhat, version=rhel7
Adding distros from path /var/www/cobbler/ks_mirror/CentOS-7.3-x86_64:
creating new distro: CentOS-7.3-x86_64
trying symlink: /var/www/cobbler/ks_mirror/CentOS-7.3-x86_64 -> /var/www/cobbler/links/CentOS-7.3-x86_64
creating new profile: CentOS-7.3-x86_64
associating repos
checking for rsync repo(s)
checking for rhn repo(s)
checking for yum repo(s)
starting descent into /var/www/cobbler/ks_mirror/CentOS-7.3-x86_64 for CentOS-7.3-x86_64
processing repo at : /var/www/cobbler/ks_mirror/CentOS-7.3-x86_64
need to process repo/comps: /var/www/cobbler/ks_mirror/CentOS-7.3-x86_64
looking for /var/www/cobbler/ks_mirror/CentOS-7.3-x86_64/repodata/*comps*.xml
Keeping repodata as-is :/var/www/cobbler/ks_mirror/CentOS-7.3-x86_64/repodata
*** TASK COMPLETE ***
说明:cobbler导入的镜像放在:/var/www/cobbler/ks_mirror
[root@cobbler ks_mirror]# pwd
/var/www/cobbler/ks_mirror
[root@cobbler ks_mirror]# ls
CentOS-7.3-x86_64 config
默认kickstart文件存放位置:/var/lib/cobbler/kickstarts/
[root@cobbler ~]# cd /var/lib/cobbler/kickstarts/
[root@cobbler kickstarts]# ll
total 52
-rw-r--r-- 1 root root 115 Nov 17 03:09 default.ks
-rw-r--r-- 1 root root 22 Nov 17 03:09 esxi4-ks.cfg
-rw-r--r-- 1 root root 22 Nov 17 03:09 esxi5-ks.cfg
drwxr-xr-x 2 root root 56 Mar 20 10:39 install_profiles
-rw-r--r-- 1 root root 1424 Nov 17 03:09 legacy.ks
-rw-r--r-- 1 root root 292 Nov 17 03:09 pxerescue.ks
-rw-r--r-- 1 root root 2916 Nov 17 03:09 sample_autoyast.xml
-rw-r--r-- 1 root root 1825 Nov 17 03:09 sample_end.ks
-rw-r--r-- 1 root root 0 Nov 17 03:09 sample_esx4.ks
-rw-r--r-- 1 root root 324 Nov 17 03:09 sample_esxi4.ks
-rw-r--r-- 1 root root 386 Nov 17 03:09 sample_esxi5.ks
-rw-r--r-- 1 root root 1784 Nov 17 03:09 sample.ks
-rw-r--r-- 1 root root 3419 Nov 17 03:09 sample_old.seed
-rw-r--r-- 1 root root 5879 Nov 17 03:09 sample.seed
[root@cobbler ~]# cobbler list
distros:
CentOS-7.3-x86_64
profiles:
CentOS-7.3-x86_64
systems:
repos:
images:
mgmtclasses:
packages:
files:
[root@cobbler ~]# cobbler profile report
Name : CentOS-7.3-x86_64
TFTP Boot Files : {}
Comment :
DHCP Tag : default
Distribution : CentOS-7.3-x86_64
Enable gPXE? : 0
Enable PXE Menu? : 1
Fetchable Files : {}
Kernel Options : {}
Kernel Options (Post Install) : {}
Kickstart : /var/lib/cobbler/kickstarts/sample_end.ks
Kickstart Metadata : {}
Management Classes : []
Management Parameters : <<inherit>>
Name Servers : []
Name Servers Search Path : []
Owners : ['admin']
Parent Profile :
Internal proxy :
Red Hat Management Key : <<inherit>>
Red Hat Management Server : <<inherit>>
Repos : []
Server Override : <<inherit>>
Template Files : {}
Virt Auto Boot : 1
Virt Bridge : xenbr0
Virt CPUs : 1
Virt Disk Driver Type : raw
Virt File Size(GB) : 5
Virt Path :
Virt RAM (MB) : 512
Virt Type : kvm