[libvirt] Two issues regarding TFTP support in virtual networks...

The first is just a wiki fix: the wiki says this functionality is available as of 0.7.1 of libvirt. The code though is only in the 0.7.2 tag and later. So the wiki should say 0.7.2 instead. The second regards how I'm using it and what I'm doing wrong. I'm creating a virtual network and pointing it to a temporary directory where I've run livecd-iso-to-pxeboot to setup an ISO file for PXE booting. So the network XML looks like this: (mcpierce@mcpierce-desktop:node-image)$ sudo virsh net-dumpxml testbr541 <network> <name>testbr541</name> <uuid>f389317f-8420-7516-df9d-756b7deb3d37</uuid> <forward mode='nat'/> <bridge name='testbr541' stp='on' delay='0' /> <ip address='192.168.31.1' netmask='255.255.255.0'> <tftp root='/tmp/tmp.3B8opJfBXw/tftpboot/' /> <dhcp> <range start='192.168.31.100' end='192.168.31.199' /> </dhcp> </ip> </network> When I start up the VM, I see it get an IP address within the range specified, but it never pxeboots the ISO image. To what directory should the root attribute be pointed? -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/

On Thu, Dec 17, 2009 at 09:35:55AM -0500, Darryl L. Pierce wrote:
The first is just a wiki fix: the wiki says this functionality is available as of 0.7.1 of libvirt. The code though is only in the 0.7.2 tag and later. So the wiki should say 0.7.2 instead.
The second regards how I'm using it and what I'm doing wrong. I'm creating a virtual network and pointing it to a temporary directory where I've run livecd-iso-to-pxeboot to setup an ISO file for PXE booting. So the network XML looks like this:
(mcpierce@mcpierce-desktop:node-image)$ sudo virsh net-dumpxml testbr541 <network> <name>testbr541</name> <uuid>f389317f-8420-7516-df9d-756b7deb3d37</uuid> <forward mode='nat'/> <bridge name='testbr541' stp='on' delay='0' /> <ip address='192.168.31.1' netmask='255.255.255.0'> <tftp root='/tmp/tmp.3B8opJfBXw/tftpboot/' /> <dhcp> <range start='192.168.31.100' end='192.168.31.199' /> </dhcp> </ip> </network>
When I start up the VM, I see it get an IP address within the range specified, but it never pxeboots the ISO image.
To what directory should the root attribute be pointed?
If someone has a moment, could you please take a look and help me with this situation? I've tried several scenarios and nothing seems to work for pointing libvirt to the directory I've created. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/

(mcpierce@mcpierce-desktop:node-image)$ sudo virsh net-dumpxml testbr541 <network> <name>testbr541</name> <uuid>f389317f-8420-7516-df9d-756b7deb3d37</uuid> <forward mode='nat'/> <bridge name='testbr541' stp='on' delay='0' /> <ip address='192.168.31.1' netmask='255.255.255.0'> <tftp root='/tmp/tmp.3B8opJfBXw/tftpboot/' /> <dhcp> <range start='192.168.31.100' end='192.168.31.199' /> </dhcp> </ip> </network>
When I start up the VM, I see it get an IP address within the range specified, but it never pxeboots the ISO image.
To what directory should the root attribute be pointed?
If someone has a moment, could you please take a look and help me with this situation? I've tried several scenarios and nothing seems to work for pointing libvirt to the directory I've created.
You are not giving BOOTP info (you are missing the <bootp> tag, which goes inside <dhcp>). Paolo

On Mon, Jan 11, 2010 at 04:48:54PM +0100, Paolo Bonzini wrote:
(mcpierce@mcpierce-desktop:node-image)$ sudo virsh net-dumpxml testbr541 <network> <name>testbr541</name> <uuid>f389317f-8420-7516-df9d-756b7deb3d37</uuid> <forward mode='nat'/> <bridge name='testbr541' stp='on' delay='0' /> <ip address='192.168.31.1' netmask='255.255.255.0'> <tftp root='/tmp/tmp.3B8opJfBXw/tftpboot/' /> <dhcp> <range start='192.168.31.100' end='192.168.31.199' /> </dhcp> </ip> </network>
When I start up the VM, I see it get an IP address within the range specified, but it never pxeboots the ISO image.
To what directory should the root attribute be pointed?
If someone has a moment, could you please take a look and help me with this situation? I've tried several scenarios and nothing seems to work for pointing libvirt to the directory I've created.
You are not giving BOOTP info (you are missing the <bootp> tag, which goes inside <dhcp>).
Hrm. Thanks for that. I'll give it a try. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/

On Mon, Jan 11, 2010 at 04:48:54PM +0100, Paolo Bonzini wrote:
(mcpierce@mcpierce-desktop:node-image)$ sudo virsh net-dumpxml testbr541 <network> <name>testbr541</name> <uuid>f389317f-8420-7516-df9d-756b7deb3d37</uuid> <forward mode='nat'/> <bridge name='testbr541' stp='on' delay='0' /> <ip address='192.168.31.1' netmask='255.255.255.0'> <tftp root='/tmp/tmp.3B8opJfBXw/tftpboot/' /> <dhcp> <range start='192.168.31.100' end='192.168.31.199' /> </dhcp> </ip> </network>
When I start up the VM, I see it get an IP address within the range specified, but it never pxeboots the ISO image.
To what directory should the root attribute be pointed?
If someone has a moment, could you please take a look and help me with this situation? I've tried several scenarios and nothing seems to work for pointing libvirt to the directory I've created.
You are not giving BOOTP info (you are missing the <bootp> tag, which goes inside <dhcp>).
Okay, here's the XML that's now being generated by my test script: <network> <name>testbr6253</name> <forward mode='nat' /> <bridge name='testbr6253' stp='on' forwardDelay='0' /> <ip address='192.168.133.1' netmask='255.255.255.0'> <tftp root='/tmp/tmp.dEf7FPCaKm/tftpboot' /> <bootp file='pxelinux.0' /> <dhcp> <range start='192.168.133.100' end='192.168.133.199' /> </dhcp> </ip> </network> However, I still get the message "No filename or root path specified" within the VM and it does not boot from the above directory. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/

You are not giving BOOTP info (you are missing the<bootp> tag, which goes inside<dhcp>).
Okay, here's the XML that's now being generated by my test script:
<network> <name>testbr6253</name> <forward mode='nat' /> <bridge name='testbr6253' stp='on' forwardDelay='0' /> <ip address='192.168.133.1' netmask='255.255.255.0'> <tftp root='/tmp/tmp.dEf7FPCaKm/tftpboot' /> <bootp file='pxelinux.0' /> <dhcp> <range start='192.168.133.100' end='192.168.133.199' /> </dhcp> </ip> </network>
However, I still get the message "No filename or root path specified" within the VM and it does not boot from the above directory.
<bootp> must be within <dhcp> (think of elements within <ip> as services that run, such as TFTP or DHCP; <bootp> is just additional data that is passed via DHCP). Paolo

On Wed, Jan 13, 2010 at 10:17:01AM +0100, Paolo Bonzini wrote:
You are not giving BOOTP info (you are missing the<bootp> tag, which goes inside<dhcp>).
Okay, here's the XML that's now being generated by my test script:
<network> <name>testbr6253</name> <forward mode='nat' /> <bridge name='testbr6253' stp='on' forwardDelay='0' /> <ip address='192.168.133.1' netmask='255.255.255.0'> <tftp root='/tmp/tmp.dEf7FPCaKm/tftpboot' /> <bootp file='pxelinux.0' /> <dhcp> <range start='192.168.133.100' end='192.168.133.199' /> </dhcp> </ip> </network>
However, I still get the message "No filename or root path specified" within the VM and it does not boot from the above directory.
<bootp> must be within <dhcp> (think of elements within <ip> as services that run, such as TFTP or DHCP; <bootp> is just additional data that is passed via DHCP).
Ah, okay. That wasn't clear to me in the wiki page on the network XML. I'll give that a shot then. (tries) Okay, still the same error. Here's the new XML being generated: <network> <name>testbr31018</name> <forward mode='nat' /> <bridge name='testbr31018' stp='on' forwardDelay='0' /> <ip address='192.168.163.1' netmask='255.255.255.0'> <tftp root='/tmp/tmp.6LUTF06Gkm/tftpboot' /> <dhcp> <bootp file='pxelinux.0' /> <range start='192.168.163.100' end='192.168.163.199' /> </dhcp> </ip> </network> Are there any relative pathing values that should be used by the tftp and bootp tags? Should the tftp->root attribute point to the work directory and then bootp->file refer to tftpboot/pxelinux.0? -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/

<network> <name>testbr31018</name> <forward mode='nat' /> <bridge name='testbr31018' stp='on' forwardDelay='0' /> <ip address='192.168.163.1' netmask='255.255.255.0'> <tftp root='/tmp/tmp.6LUTF06Gkm/tftpboot' /> <dhcp> <bootp file='pxelinux.0' /> <range start='192.168.163.100' end='192.168.163.199' /> </dhcp> </ip> </network>
Are there any relative pathing values that should be used by the tftp and bootp tags? Should the tftp->root attribute point to the work directory and then bootp->file refer to tftpboot/pxelinux.0?
No, the above seems fine (I should have pointed you to tests/networkxml2xmlin/netboot-network.xml before). Can you post the generated dnsmasq command line? Also, have you tried using wireshark to see what's going on? Paolo

On Wed, Jan 13, 2010 at 05:03:59PM +0100, Paolo Bonzini wrote:
<network> <name>testbr31018</name> <forward mode='nat' /> <bridge name='testbr31018' stp='on' forwardDelay='0' /> <ip address='192.168.163.1' netmask='255.255.255.0'> <tftp root='/tmp/tmp.6LUTF06Gkm/tftpboot' /> <dhcp> <bootp file='pxelinux.0' /> <range start='192.168.163.100' end='192.168.163.199' /> </dhcp> </ip> </network>
Are there any relative pathing values that should be used by the tftp and bootp tags? Should the tftp->root attribute point to the work directory and then bootp->file refer to tftpboot/pxelinux.0?
No, the above seems fine (I should have pointed you to tests/networkxml2xmlin/netboot-network.xml before). Can you post the generated dnsmasq command line?
Here is what's output by libvirtd: 11:36:57.608: debug : virRun:809 : /usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/testbr6762.pid --conf-file= --listen-address 192.168.132.1 --except-interface lo --dhcp-range 192.168.132.100,192.168.132.199 --dhcp-lease-max=100 --enable-tftp --tftp-root /tmp/tmp.HRG19a7Udi --dhcp-boot tftpboot/pxelinux.0 Now, this command line matches, WRT the pxe booting elements, our pre-0.7 libvirtd test script that worked just fine. And I do see in the vm getting an address via dhcp. But i'm still getting the error "No filename or root path specified."
Also, have you tried using wireshark to see what's going on?
No, I haven't. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/

On Wed, Jan 13, 2010 at 11:48:05AM -0500, Darryl L. Pierce wrote:
On Wed, Jan 13, 2010 at 05:03:59PM +0100, Paolo Bonzini wrote:
<network> <name>testbr31018</name> <forward mode='nat' /> <bridge name='testbr31018' stp='on' forwardDelay='0' /> <ip address='192.168.163.1' netmask='255.255.255.0'> <tftp root='/tmp/tmp.6LUTF06Gkm/tftpboot' /> <dhcp> <bootp file='pxelinux.0' /> <range start='192.168.163.100' end='192.168.163.199' /> </dhcp> </ip> </network>
Are there any relative pathing values that should be used by the tftp and bootp tags? Should the tftp->root attribute point to the work directory and then bootp->file refer to tftpboot/pxelinux.0?
No, the above seems fine (I should have pointed you to tests/networkxml2xmlin/netboot-network.xml before). Can you post the generated dnsmasq command line?
Here is what's output by libvirtd:
11:36:57.608: debug : virRun:809 : /usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/testbr6762.pid --conf-file= --listen-address 192.168.132.1 --except-interface lo --dhcp-range 192.168.132.100,192.168.132.199 --dhcp-lease-max=100 --enable-tftp --tftp-root /tmp/tmp.HRG19a7Udi --dhcp-boot tftpboot/pxelinux.0
Now, this command line matches, WRT the pxe booting elements, our pre-0.7 libvirtd test script that worked just fine. And I do see in the vm getting an address via dhcp. But i'm still getting the error "No filename or root path specified."
Also, have you tried using wireshark to see what's going on?
No, I haven't.
Following up on this: I'm still unable to get the tftp element for this to work with our autotesting script. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/

On Thu, Mar 11, 2010 at 04:10:24PM -0500, Darryl L. Pierce wrote:
Here is what's output by libvirtd:
11:36:57.608: debug : virRun:809 : /usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/testbr6762.pid --conf-file= --listen-address 192.168.132.1 --except-interface lo --dhcp-range 192.168.132.100,192.168.132.199 --dhcp-lease-max=100 --enable-tftp --tftp-root /tmp/tmp.HRG19a7Udi --dhcp-boot tftpboot/pxelinux.0
Now, this command line matches, WRT the pxe booting elements, our pre-0.7 libvirtd test script that worked just fine. And I do see in the vm getting an address via dhcp. But i'm still getting the error "No filename or root path specified."
Also, have you tried using wireshark to see what's going on?
No, I haven't.
Following up on this: I'm still unable to get the tftp element for this to work with our autotesting script.
I'm still in the same state here. Shall I open a bug against libvirt regarding it not recognizing the --tftp-root argument? -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/

On 03/24/2010 01:08 PM, Darryl L. Pierce wrote:
On Thu, Mar 11, 2010 at 04:10:24PM -0500, Darryl L. Pierce wrote:
Here is what's output by libvirtd:
11:36:57.608: debug : virRun:809 : /usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/testbr6762.pid --conf-file= --listen-address 192.168.132.1 --except-interface lo --dhcp-range 192.168.132.100,192.168.132.199 --dhcp-lease-max=100 --enable-tftp --tftp-root /tmp/tmp.HRG19a7Udi --dhcp-boot tftpboot/pxelinux.0
Now, this command line matches, WRT the pxe booting elements, our pre-0.7 libvirtd test script that worked just fine. And I do see in the vm getting an address via dhcp. But i'm still getting the error "No filename or root path specified."
Also, have you tried using wireshark to see what's going on?
No, I haven't.
Following up on this: I'm still unable to get the tftp element for this to work with our autotesting script.
I'm still in the same state here. Shall I open a bug against libvirt regarding it not recognizing the --tftp-root argument?
That would be against dnsmasq? Paolo

On Wed, Mar 24, 2010 at 03:34:04PM +0100, Paolo Bonzini wrote:
I'm still in the same state here. Shall I open a bug against libvirt regarding it not recognizing the --tftp-root argument?
That would be against dnsmasq?
I'm not sure it is. When I use dnsmasq then it honors tftp-root just fine. It's only when I tell libvirt to use a specific directory as the root that it fails. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/

On 03/24/2010 04:24 PM, Darryl L. Pierce wrote:
On Wed, Mar 24, 2010 at 03:34:04PM +0100, Paolo Bonzini wrote:
I'm still in the same state here. Shall I open a bug against libvirt regarding it not recognizing the --tftp-root argument?
That would be against dnsmasq?
I'm not sure it is. When I use dnsmasq then it honors tftp-root just fine. It's only when I tell libvirt to use a specific directory as the root that it fails.
I see. Is there anything SELinux-related and suspicious? Paolo

On Wed, Mar 24, 2010 at 04:41:23PM +0100, Paolo Bonzini wrote:
On 03/24/2010 04:24 PM, Darryl L. Pierce wrote:
On Wed, Mar 24, 2010 at 03:34:04PM +0100, Paolo Bonzini wrote:
I'm still in the same state here. Shall I open a bug against libvirt regarding it not recognizing the --tftp-root argument?
That would be against dnsmasq?
I'm not sure it is. When I use dnsmasq then it honors tftp-root just fine. It's only when I tell libvirt to use a specific directory as the root that it fails.
I see. Is there anything SELinux-related and suspicious?
No, nothing comes up from SELinux that I've seen. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/
participants (2)
-
Darryl L. Pierce
-
Paolo Bonzini