Re: tftp config for virt-manager or virt-install

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gianluca Cecchi wrote:
> And we come to my initial attempts.
> In fact I initially tried to do that, and configured tftpd in xinetd
> but I got the same result, so I asked myself if I had to use tftpboot
> embedded in Qemu or not.
> So, resuming.
> - Configured a default bridged nertwork named virbr0 on the host (that
> gives ip addresses from 192.168.122.2 - 192.168.122.100), so that
> [root@virtfed ~]# ifconfig virbr0
> virbr0    Link encap:Ethernet  HWaddr 5E:31:5B:33:F9:5A
>           inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> 

If you can't get this all to work, maybe try using a physical bridge
device as opposed to libvirt virtual networking:

http://wiki.libvirt.org/page/Networking#Bridged_networking_.28aka_.22shared_physical_device.22.29

People have had issues with virtual networking in the past, so it might
be good to eliminate that factor.

> - Configured tftpserver on the host.
> - From a guest that has its virtual network device on virbr0 I can do
> [root@mindy ~]# tftp 192.168.122.1
> tftp> get pxelinux.0
> tftp> quit
> [root@mindy ~]# ll pxelinux.0
> -rw-r--r-- 1 root root 15702 Jun 18 12:05 pxelinux.0
> 
> So tftp works on the host. In its messages I get:
> Jun 18 11:59:10 virtfed xinetd[2962]: START: tftp pid=3033 from=192.168.122.102
> 
> - Trying to create a guest from virt-manager with these steps:
> first window I specify guest name and select the option "Network Boot (PXE)
> (I can select also Local install media, while the option "Network
> install" is greyed out.... is this correct?)
> second window I select OS Type=Linux and Version=generic2.6 kernel
> third window memory and cpu
> fourth window I specify a pre-existing storage (LV on a dedicated VG)
> fifth window I do not change anything (I see that are selected virtual
> network default virt_type=kvm and os type x86_64, that are ok for me)
> I select finish and I get the console window for the guest
> The network boot begins and I get this loop
> Searching for a  Server (DHCP)....
> Me: 192.168.122.35, DHCP: 192.168.122.1, TFTP: 192.168.122.1, Gateway
> 192.168.122.1
> No filename
> <sleep>
> <abort>
> probing pci nic...
> Probing isa nic...
> <sleep>
> Boot from (N)etwork or (Q)uit?
> 
> probing pci nic...
> [rtl8139] - ioaddr 0XC100, irq 11, addr 54:52:00:45:F8:17 100Mbps half-duplex
> 
> And no tftp request in /var/log/messages on the host....
> So I now notice that dhcpd service is provided by dnsmasq on the
> host... that probably is started by libvirtd?
> because
> [root@virtfed ~]# chkconfig --list dnsmasq
> dnsmasq        	0:off	1:off	2:off	3:off	4:off	5:off	6:off
> 

Correct, libvirtd starts dnsmasq for virtual networks.

> And probably the missing part is telling dnsmasq to enable its
> embedded tftp-server (or anyway tell it to use an external one...)
> So the question is: can I configure this instance of dnsmasq to enable
> its tftp server?
> I can do it in /etc/dnsmasq.conf, but it seems that dnsmasq is started
> without a config file:
> 
> nobody    2428     1  0 13:14 ?        00:00:00 /usr/sbin/dnsmasq
> --strict-order --bind-interfaces
> --pid-file=/var/run/libvirt/network/default.pid --conf-file=
> --listen-address 192.168.122.1 --except-interface lo --dhcp-range
> 192.168.122.2,192.168.122.100
>

Libvirt doesn't support any tftp options for dnsmasq.

> How to glue the several components...?
> 

I've never set up my own pxe server so I can't provide much help. I have
though booted many VMs via PXE, with both virtual networking and bridged
networking, and it required no extra options.

Maybe try and verify your tftp setup is working with a physical machine
(if you have the means)? Because there shouldn't need to be much
tweaking necessary to get the VM to see it.

HTH,
Cole

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux