Bug 508335 - virt-install creates PXE guest with virtual networking (even when it may not work)
virt-install creates PXE guest with virtual networking (even when it may not ...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: Virtualization_Guide (Show other bugs)
5.4
All Linux
medium Severity high
: rc
: ---
Assigned To: Scott Radvan
ecs-bugs
: Documentation, Reopened
Depends On:
Blocks: 644762
  Show dependency treegraph
 
Reported: 2009-06-26 12:22 EDT by Paolo Bonzini
Modified: 2015-04-06 23:19 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 644762 (view as bug list)
Environment:
Last Closed: 2011-07-09 02:56:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Contents of .virtinst/virt-install.log (3.36 KB, text/plain)
2009-06-26 16:07 EDT, Paolo Bonzini
no flags Details
Output of 'virsh dumpxml'. (1.11 KB, text/plain)
2009-06-26 16:07 EDT, Paolo Bonzini
no flags Details

  None (edit)
Description Paolo Bonzini 2009-06-26 12:22:15 EDT
Description of problem:
Despite trying twice, KVM guests do not have network access.

How reproducible:
When creating a new virtual machine with "virt-install --pxe --prompt", the PXE boot is not able to get a DHCP address.

Steps to Reproduce:
1. Boot into a non-Xen kernel with KVM installed (see attached anaconda.log).
2. "virt-install --pxe --prompt"
3. Answer the defaults.
  
Actual results:
DHCP fails at PXE boot.  The output is repeatedly

Probing pci nic...
[rtl8139] - ioaddr 0XC100, irq 11, addr 54:52:00:55:43:2C 100Mbs half-duplex
Searching for server (DHCP).....
Me: 192.168.122.154, 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>

Expected results:
DHCP should succeed and PXE boot should come up, like it does with Xen.
Comment 1 Paolo Bonzini 2009-06-26 13:07:41 EDT
changing component from kvm to libvirt.
Comment 2 Daniel Berrange 2009-06-26 13:41:43 EDT
Please attach $HOME/.virtinst/virt-install.log, output of 'virsh dumpxml GUESTNAME' when it is running, /var/log/libvirt/qemu/$GUESTNAME.log, and from the host OS output of 'brctl show', 'ifconfig -a' and 'sysctl -a | grep bridge'
Comment 3 Paolo Bonzini 2009-06-26 16:05:45 EDT
# brctl show
bridge name     bridge id               STP enabled     interfaces
virbr0          8000.4e3d8f5d0d5e       yes             vnet0

# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:22:64:B5:2D:B5  
          inet addr:10.34.33.204  Bcast:10.34.35.255  Mask:255.255.252.0
          inet6 addr: fec0::f101:222:64ff:feb5:2db5/64 Scope:Site
          inet6 addr: fe80::222:64ff:feb5:2db5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4756 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1749 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2183928 (2.0 MiB)  TX bytes:231951 (226.5 KiB)
          Interrupt:66 Memory:e3000000-e3010000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8631 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8631 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:9757294 (9.3 MiB)  TX bytes:9757294 (9.3 MiB)

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

virbr0    Link encap:Ethernet  HWaddr 4E:3D:8F:5D:0D:5E  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:326 errors:0 dropped:0 overruns:0 frame:0
          TX packets:330 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:53776 (52.5 KiB)  TX bytes:48897 (47.7 KiB)

vnet0     Link encap:Ethernet  HWaddr 4E:3D:8F:5D:0D:5E  
          inet6 addr: fe80::4c3d:8fff:fe5d:d5e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26 errors:0 dropped:0 overruns:0 frame:0
          TX packets:94 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:15340 (14.9 KiB)  TX bytes:16980 (16.5 KiB)

# sysctl -a | grep bridge
net.bridge.bridge-nf-filter-vlan-tagged = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-arptables = 1
Comment 4 Paolo Bonzini 2009-06-26 16:07:15 EDT
Created attachment 349599 [details]
Contents of .virtinst/virt-install.log
Comment 5 Paolo Bonzini 2009-06-26 16:07:48 EDT
Created attachment 349600 [details]
Output of 'virsh dumpxml'.
Comment 6 Daniel Berrange 2009-07-10 08:29:47 EDT
Your guest is configured for virtual networking configuration

    <interface type='network'>
      <mac address='54:52:00:1b:e2:67'/>
      <source network='default'/>
      <target dev='vnet0'/>
    </interface>


The virtual networking configuration does not support PXE, thus your failure to PXE is expected behaviour. To do PXE you want to setup your host to use bridging on its primary device (eth0), and attach the guest to the bridge instead.
Comment 7 Paolo Bonzini 2009-07-10 09:17:34 EDT
The guest was created automatically by virt-install.  Reopening and reassigning to virt-manager.
Comment 10 Cole Robinson 2009-10-19 11:50:40 EDT
Not sure exactly what it would take to determine that PXE _wont_ work if you are using virtual networking (since there are some times when it will, if there are tftp options in the network XML AFAIK). I'll have to investigate.
Comment 11 Paolo Bonzini 2009-10-20 04:44:22 EDT
Yeah, the main problem is that Xen uses bridging by default while KVM uses NAT+dnsmasq.  You can look at the bootp option instead of the tftp option, since it's possible to run a TFTP server different from dnsmasq's integrated one.

Alternatively, libvirt could look at the host's DHCP lease and set the BOOTP options the same way.  For example in my /var/lib/dhclient/dhclient-eth0.leases I have

  filename "linux-install/pxelinux.0";
  option dhcp-server-identifier 10.34.32.1;

and that could be mapped to a <bootp> tag (almost---the server field is not yet present, but I have a patch for that).
Comment 12 Paolo Bonzini 2009-10-22 15:10:49 EDT
Shall I clone this bug for libvirt (which would mean backporting the <bootp> and <tftp> tags) in RHEL?
Comment 13 Cole Robinson 2010-01-20 17:08:53 EST
Not sure if we need to backport those libvirt changes: there hasn't been any customer request for it AFAIK, and they aren't supported in virt-manager UI at least.

It would be nice to find some way for libvirt to auto determine a PXE server like you recommend in Comment #11. Until then we should probably fix virt-install/virt-manager to warn about PXE attempts from virtual networks. Deferring to 5.6 since this isn't upstream yet.
Comment 16 RHEL Product and Program Management 2010-08-09 14:51:54 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 17 Paolo Bonzini 2010-10-20 04:20:03 EDT
*** Bug 644521 has been marked as a duplicate of this bug. ***
Comment 18 Cole Robinson 2010-12-07 10:01:43 EST
This now shows a warning upstream in virt-manager and virt-install:

http://hg.fedorahosted.org/hg/virt-manager/rev/10888fb57332
http://hg.fedorahosted.org/hg/python-virtinst/rev/6b3550d354cf
Comment 19 Cole Robinson 2011-03-10 16:44:02 EST
Re-evaluating this, I think this is a WONTFIX. I don't really think it's worth the effort of a custom backport to the old code which has enough rough edges as it is.

Maybe we should just make sure it's properly documented in the virt guide. Reassigning.

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