Bug 809723 - Can't install an OS via PXE on a VM with NIC defined to work in NAT mode.
Summary: Can't install an OS via PXE on a VM with NIC defined to work in NAT mode.
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Laine Stump
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-04 08:11 UTC by Alexander Chuzhoy
Modified: 2016-04-26 17:06 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-23 21:44:41 UTC
Embargoed:


Attachments (Terms of Use)

Description Alexander Chuzhoy 2012-04-04 08:11:24 UTC
Description of problem:

Tried to install an OS via PXE.
For networking I use "Virtual Network 'default': NAT".
the ip forwarding is enabled on the hypervisor.
Flushed everything in the filter table and added only the following to the nat table:
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/16 -j MASQUERADE

the following modules were loaded:
nf_nat_tftp              987  0
nf_conntrack_tftp       4878  1 nf_nat_tftp
nf_nat                 22726  3 nf_nat_tftp,ipt_MASQUERADE,iptable_nat
nf_conntrack           79453  7 nf_nat_tftp,nf_conntrack_tftp,ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4,xt_state


WHen I boot a VM and point to some PXE server - I reach the server, but here's what I get in the tcpdump on the server:

20:12:34.542503 IP <hypervisor FQDN>.1024 > <PXE FQDN>.tftp:  40 RRQ "pxelinux.0" octet blksize 1432 tsize 0
20:12:34.543396 IP <PXE FQDN>.54289 > <hypervisor FQDN>.1024: UDP, length 27
20:12:34.543672 IP <hypervisor FQDN>.1024 > <PXE FQDN>.54289: UDP, length 4
20:12:34.543746 IP <PXE FQDN>.54289 > <hypervisor FQDN>.1024: UDP, length 1436
20:12:34.544096 IP <hypervisor FQDN>.1024 > <PXE FQDN>.54289: UDP, length 4
20:12:34.544142 IP <PXE FQDN>.54289 > <hypervisor FQDN>.1024: UDP, length 1436
20:12:34.544432 IP <hypervisor FQDN>.1024 > <PXE FQDN>.54289: UDP, length 4
20:12:34.544467 IP <PXE FQDN>.54289 > <hypervisor FQDN>.1024: UDP, length 1436
20:12:34.544799 IP <hypervisor FQDN>.1024 > <PXE FQDN>.54289: UDP, length 4
20:12:34.544899 IP <PXE FQDN>.54289 > <hypervisor FQDN>.1024: UDP, length 1436
20:12:34.545307 IP <hypervisor FQDN>.1024 > <PXE FQDN>.54289: UDP, length 4
20:12:34.545342 IP <PXE FQDN>.54289 > <hypervisor FQDN>.1024: UDP, length 1436
20:12:34.545648 IP <hypervisor FQDN>.1024 > <PXE FQDN>.54289: UDP, length 4
20:12:34.545682 IP <PXE FQDN>.54289 > <hypervisor FQDN>.1024: UDP, length 1436
20:12:34.545967 IP <hypervisor FQDN>.1024 > <PXE FQDN>.54289: UDP, length 4
20:12:34.546002 IP <PXE FQDN>.54289 > <hypervisor FQDN>.1024: UDP, length 1436
20:12:34.546293 IP <hypervisor FQDN>.1024 > <PXE FQDN>.54289: UDP, length 4
20:12:34.546328 IP <PXE FQDN>.54289 > <hypervisor FQDN>.1024: UDP, length 1436
20:12:34.546605 IP <hypervisor FQDN>.1024 > <PXE FQDN>.54289: UDP, length 4
20:12:34.546639 IP <PXE FQDN>.54289 > <hypervisor FQDN>.1024: UDP, length 1436
20:12:34.547025 IP <hypervisor FQDN>.1024 > <PXE FQDN>.54289: UDP, length 4
20:12:34.547060 IP <PXE FQDN>.54289 > <hypervisor FQDN>.1024: UDP, length 264
20:12:34.547274 IP <hypervisor FQDN>.1024 > <PXE FQDN>.54289: UDP, length 4

The output above is NOT truncated - that's all I get on the PXE server.

On the client I see that I reach the server, but instead of getting a menu of available OS (works fine on regular machines), after some time I'm prompted that the boot via pxe has failed.



Version-Release number of selected component (if applicable):


How reproducible:
RHEL6.2, Create a VM, Configure the new VM to communicate via NAT. Try to install an OS from a PXE server that resides on another subnet (reachable from the hypervisor).

Steps to Reproduce:
1. Create a VM and define its network interface to operate in NAT mode.
2. Boot the VM, Click on Ctrl+ B, type config
3. In the menu, set the next server and the bootfile to something that matches your setup. 
4. Click on Ctrl+x. Type autoboot 
  
Actual results:
The PXE boot starts (actually reaches the PXE server) , but then fails.

Expected results:
Get a list of available PXE installations.

Additional info:
I also tried switching many possible drivers. e1000,virtio,rtl8139... Nothing helps.

Comment 2 dyuan 2012-04-11 10:02:30 UTC
I cannot reach the pxe server if it's in the different subnet from guest.

I can only install guest successfully when the pxe server is in the same subnet as guest.

Comment 5 Dave Allan 2012-07-11 20:04:53 UTC
Laine, is this a valid use case?

Comment 7 Cole Robinson 2016-03-23 21:44:41 UTC
Reporter is gone, and given the esoteric nature of this request, just closing


Note You need to log in before you can comment on or make changes to this bug.