Re: [et-mgmt-tools] tftp config for virt-manager or virt-install
On Thu, Jun 18, 2009 at 2:50 PM, Cole Robinsoncrobi...@redhat.com wrote: 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. OK, I was able to configure a physical bridge and to install with pxe+dhcp+tftp a slackware 64bit virtual machine attached to that interface (br0). thanks Correct, libvirtd starts dnsmasq for virtual networks. Libvirt doesn't support any tftp options for dnsmasq. OK, thanks. So I was able to configure another system controlled dnsmasq process providing dhcp+tftp and deploy a VM as described above, with these options in /etc/dnsmasq.conf: interface=br0 bind-interfaces dhcp-range=net:qemu,10.4.5.153,10.4.5.155,12h dhcp-mac=qemu,54:52:00:*:*:* dhcp-boot=/var/lib/tftpboot/slackware64/pxelinux.0,virtfed,10.4.5.152 enable-tftp tftp-root=/var/lib/tftpboot/slackware64 And now what is the best approach to provide redundancy for network of this kind (physical bridge on host) for the configured virtual machines? Can I create a bonding device bond0 and then create a bridge based on bond0 as interface to achieve redundancy? Is this doable/reccomended? Any particular config requests to ask to the network men in order to not create network problems? Just that we are here, if the host has multiple network interfaces, where to check which is the one bridged with virbr0? Is it the one bound to the hostname of the host itself or is it configurable? Is it possible to have the virtual bridge virbr0 itself redundant ? Gianluca ___ et-mgmt-tools mailing list et-mgmt-tools@redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools
Re: [et-mgmt-tools] tftp config for virt-manager or virt-install
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 [r...@virtfed ~]# ifconfig virbr0 virbr0Link 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 - Configured tftpserver on the host. - From a guest that has its virtual network device on virbr0 I can do [r...@mindy ~]# tftp 192.168.122.1 tftp get pxelinux.0 tftp quit [r...@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 [r...@virtfed ~]# chkconfig --list dnsmasq dnsmasq 0:off 1:off 2:off 3:off 4:off 5:off 6:off 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: nobody2428 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 How to glue the several components...? Thanks, Gianluca On Wed, Jun 17, 2009 at 2:37 PM, Cole Robinsoncrobi...@redhat.com wrote: You should be able to use a regular PXE server on your network. Thanks, Cole ___ et-mgmt-tools mailing list et-mgmt-tools@redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools
Re: [et-mgmt-tools] tftp config for virt-manager or virt-install
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 [r...@virtfed ~]# ifconfig virbr0 virbr0Link 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 [r...@mindy ~]# tftp 192.168.122.1 tftp get pxelinux.0 tftp quit [r...@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 [r...@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: nobody2428 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@redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools