Bug 809723 - Can't install an OS via PXE on a VM with NIC defined to work in NAT mode.
Can't install an OS via PXE on a VM with NIC defined to work in NAT mode.
Status: CLOSED DEFERRED
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Laine Stump
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-04 04:11 EDT by Alexander Chuzhoy
Modified: 2016-04-26 13:06 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-23 17:44:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alexander Chuzhoy 2012-04-04 04:11:24 EDT
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 06:02:30 EDT
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 16:04:53 EDT
Laine, is this a valid use case?
Comment 7 Cole Robinson 2016-03-23 17:44:41 EDT
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.