koan是kickstart-over-a-network的縮寫,它是cobbler的客戶端幫助程序,koan容許你經過網絡提供虛擬機,也容許你重裝已經存在的客戶端。當運行時,koan會從遠端的cobbler server獲取安裝信息,而後根據獲取的安裝信息進行安裝。 linux
koan --server=cobbler-server [--list=type] [--virt|--replace-self|--display] [--profile=name] [--system=name] [--image=name] [--add-reinstall-entry] [--virt-name=name] [--virt-path=path] [--virt-type=type] [--nogfx] [--static-interface=name] [--kexec]
--nogfx do not use VNC graphics shell
實驗環境仍是上一章的環境,就把ubuntu12.04客戶機使用koan一遍,能夠在客戶機上先安裝koan客戶端看看: ubuntu
apt-get install koanA 查看服務端有哪些profiles ( koan --server=10.1.6.234 --list=profiles )
root@ubuntu12:~# koan --server=10.1.6.234 --list=profiles debian6 CentOS6.3-i386 ubuntu12.04-x86_64 CentOS6.3-x86_64 ubuntu12.10-x86_64B 查看具體的信息 ( koan --server=10.1.6.234 --display --profile=ubuntu12.04-x86_64)
root@ubuntu12:~#koan --server=10.1.6.234 --display --profile=ubuntu12.04-x86_64 install_tree: http://10.1.6.234/cblr/ks_mirror/ubuntu12.04 name : ubuntu12.04-x86_64 distro : ubuntu12.04-x86_64 kickstart : http://10.1.6.234/cblr/svc/op/ks/profile/ubuntu12.04-x86_64 ks_meta : tree=http://@@http_server@@/cblr/ks_mirror/ubuntu12.04 install_tree : http://10.1.6.234/cblr/ks_mirror/ubuntu12.04 kernel : /var/www/cobbler/ks_mirror/ubuntu12.04/install/netboot/ubuntu-installer/amd64/linux initrd : /var/www/cobbler/ks_mirror/ubuntu12.04/install/netboot/ubuntu-installer/amd64/initrd.gz kernel_options : ksdevice=link lang= url=http://10.1.6.234/cblr/svc/op/ks/profile/ubuntu12.04-x86_64 auto priority=critical locale=en_US text repos : virt_ram : 512 virt_disk_driver : raw virt_type : qemu virt_path : virt_auto_boot : 1C 設置在下次重啓後安裝
root@ubuntu12:~#koan --server=10.1.6.234 --replace-self --profile=ubuntu12.04-x86_64 install_tree: http://10.1.6.234/cblr/ks_mirror/ubuntu12.04 downloading initrd initrd.gz to /boot/initrd.gz url=http://10.1.6.234/cobbler/images/ubuntu12.04-x86_64/initrd.gz - reading URL: http://10.1.6.234/cobbler/images/ubuntu12.04-x86_64/initrd.gz downloading kernel linux to /boot/linux url=http://10.1.6.234/cobbler/images/ubuntu12.04-x86_64/linux - reading URL: http://10.1.6.234/cobbler/images/ubuntu12.04-x86_64/linux - setting grub2 default entry - ['update-grub'] Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.2.0-23-generic Found initrd image: /boot/initrd.img-3.2.0-23-generic Found memtest86+ image: /boot/memtest86+.bin done - reboot to apply changesD reboot客戶機,則在啓動後回自動根據profile指定的配置重裝該客戶機。