2014年8月28日 星期四

dnsmasq with gpxe can not get the filename

Recently I used dnsmasq for pxeboot my virtual machine.
The virtual machine was boot with gPXE.
And it can fetch the IP address, but can't fetch the filename.
Then I captured the network package.
The server did send the filename operation to client.
But the client did not use it.
I can't figure out what happened.
After I added the option "dhcp-no-override" and everything just fine.

kickstart include file

Recently I have to setup multiple server.
Most of them have the same content.
So I tried to separate the same part into a file
And include them if I need it.

install
skipx
text
#cmdline

## install source
url --url=http://{{server}}/distro/centos/6.5/x86_64

## include common install setting
%include http://{{server}}/kickstart/install.ks

## disk operation
zerombr yes
bootloader --location=mbr --append="rhgb quiet"
clearpart --all --initlabel
autopart


%packages
## include common package list
%include http://{{server}}/kickstart/packages.ks


%post
## include commom post script
%include http://{{server}}/kickstart/post.ks

## include some category post script
%include http://{{server}}/kickstart/post-some-category.ks

## write your special script here
echo "done!!"

%end


pxelinux boot menu with include file

The default configuration
default menu.c32
timeout 100
totaltimeout 600
ontimeout LOCAL_BOOT
prompt 0

menu title PXE menu

label LOCAL_BOOT
    menu default
    menu label ^Local Boot
    localboot 0

menu include pxelinux.cfg/basic.menu


The "basic.menu" content
label BASIC_SERVER
    menu label Basic CentOS 6.5 ^Server
    kernel centos/6.5/x86_64/isolinux/vmlinuz
    append initrd=centos/6.5/x86_64/isolinux/initrd.img ksdevice=bootif ks=http://server.ip/centos_6_5_kickstart_server
    ipappend 2

label BASIC_DESKTOP
    menu label Basic CentOS 6.5 ^Desktop
    kernel centos/6.5/x86_64/isolinux/vmlinuz
    append initrd=centos/6.5/x86_64/isolinux/initrd.img ksdevice=bootif ks=http://server.ip/centos_6_5_kickstart_desktop
    ipappend 2

Disable vncserver authentication

Add the option "-SecurityTypes none" to the VNC command
Suggest to listen on localhost connection if you do not want to have any authentication.
To listen on localhost connection only, add the option "-localhost" to the VNC command

Remove KVM default nat network

Execute command at the KVM server

virsh net-destroy default
virsh net-undefine default

Detail command please reference to the command
virsh help