Configuring the TFTP Server

If you get the “Permission denied” error when trying to connect to the TFTP server from the client server, try running # restorecon -Rv /tftboot/ on the TFTP server.

Configuring TFTP Server for Installation on BIOS-based Client Servers

To configure the TFTP server for installation on BIOS-based client servers, do the following:

  1. Make sure the TFTP server, Xinetd, and SYSLINUX bootloader are installed:

    1
    
    # yum install tftp-server syslinux xinetd
    
  2. Edit the /etc/xinetd.d/tftp file to have the following:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    
    service tftp
    {
    disable         = no
    socket_type     = dgram
    protocol        = udp
    wait            = yes
    user            = root
    server          = /usr/sbin/in.tftpd
    server_args     = -v -s /tftpboot
    per_source      = 11
    cps             = 100 2
    flags           = IPv4
    }
    
  3. Copy the following files to the /tftpboot directory (if this directory does not exist, create it under the root (/) directory):

    • /images/pxeboot/vmlinuz and /images/pxeboot/initrd.img from the Virtuozzo Server distribution,
    • menu.c32 and pxelinux.0 from the syslinux directory (usually /usr/share/syslinux or /usr/lib/syslinux).
  4. In the /tftpboot directory, create the /pxelinux.cfg directory. In it, create the file default.

  5. Add the following lines to /tftpboot/pxelinux.cfg/default:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    
    default menu.c32
    prompt 0
    timeout 60
    ontimeout VZ
    menu title Virtuozzo Server Boot Menu
    label 1
        menu label Install Virtuozzo Server 7 with GUI management
        kernel vmlinuz
        append initrd=initrd.img ui ip=dhcp inst.repo=http://<HTTP_server_IP_address>/vz
    label 2
        menu label Install Virtuozzo Server 7 with CLI management
        kernel vmlinuz
        append initrd=initrd.img ip=dhcp inst.repo=http://<HTTP_server_IP_address>/vz
    
    For more details on the parameters you can specify in /tftpboot/pxelinux.cfg/default, see the documentation for syslinux.
  6. Start the xinetd service:

    1
    
    # systemctl start xinetd.service
    

    Or restart it if already running:

    1
    
    # systemctl restart xinetd.service
    
  7. If necessary, allow incoming connections to the TFTP service in the firewall:

    1
    2
    
    # firewall-cmd --add-service=tftp --permanent
    # systemctl restart firewalld.service
    

Configuring TFTP Server for Installation on EFI-based Client Servers

To configure the TFTP server for installation on EFI-based client servers, do the following:

  1. Make sure the TFTP server and Xinetd are installed:

    1
    
    # yum install tftp-server xinetd
    
  2. Edit the /etc/xinetd.d/tftp file to have the following:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    
    service tftp
    {
    disable         = no
    socket_type     = dgram
    protocol        = udp
    wait            = yes
    user            = root
    server          = /usr/sbin/in.tftpd
    server_args     = -v -s /tftpboot
    per_source      = 11
    cps             = 100 2
    flags           = IPv4
    }
    
  3. Copy the following files from the Virtuozzo Server distribution to the /tftpboot directory (if this directory does not exist, create it under the root (/) directory):

    • /images/pxeboot/vmlinuz,
    • /images/pxeboot/initrd.img,
    • /EFI/BOOT/grubx64.efi.
  4. In the /tftpboot directory, create the grub.cfg file.

  5. Add the following lines to /tftpboot/grub.cfg:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    set timeout=60
        menuentry 'Virtuozzo Server 7 with GUI management' {
        linuxefi vmlinuz ui ip=dhcp inst.repo=http://<HTTP_server_IP_address>/vz
        initrdefi initrd.img
    }
        menuentry 'Virtuozzo Server 7 with CLI management' {
        linuxefi vmlinuz ip=dhcp inst.repo=http://<HTTP_server_IP_address>/vz
        initrdefi initrd.img
    }
    
  6. Start the xinetd service:

    1
    
    # systemctl start xinetd.service
    

    Or restart it if already running:

    1
    
    # systemctl restart xinetd.service
    
  7. If necessary, allow incoming connections to the TFTP service in the firewall:

    1
    2
    
    # firewall-cmd --add-service=tftp --permanent
    # systemctl restart firewalld.service