Linux uses PXE to install virtual machines

  
                

I chatted with friends before, knowing that I can use PXE to install virtual machines. I believe that many users are not very clear with Xiaobian. In this small series, I will share the learned methods.

as follows:

1.1 dnsmasq

apt-get install dnsmasq

vim /etc/dnsmasq.conf

Bogus-priv

filterwin2k

interface=eth0

dhcp-range=192.168.100.172,192.168.100.180,12h

dhcp-host=52: 54:00:ed:00:f7,192.168.100.178

dhcp-boot=pxelinux.0

enable-tftp

tftp-root=/var/ftpd< Br>

dhcp-authoritative

/etc/init.d/dnsmasq restart

Note: If you want to assign a fixed IP to the pxe client, you can use the dhcp-host parameter. The advantage of this way is that you can avoid messing up the IP of the network already.

If you use the virtual machine provided by KVM as the pxe client to test, you should create a new virtual machine every test (do not repeat the test).

1.2 PXE

mkdir /var/www/ubuntu

mount -o loop/bak//kvmimages/ubuntu-11.10-server-amd64.iso /mnt

cp /mnt/preseed/ubuntu-server.seed /var/www/ubuntu

cp -a /mnt/* /var/www/ubuntu

cp -r /Mnt/install/netboot/* /var/ftpd/

vim /var/ftpd/pxelinux.cfg/default

default linux

label linux

kernel ubuntu-installer/amd64/linux

append ks=http://192.168.100.171/ubuntu/ks.cfg preseed/url=http://192.168.100.171/ubuntu/ubuntu-server.seed Vga=normal initrd=ubuntu-installer/amd64/initrd.gz --

Note: The above ks, with preseed should be configured with a web server pointing to the /var/www/ubuntu directory. Previous123Next page Total 3 pages

Copyright © Windows knowledge All Rights Reserved