This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1287716 - IPv6 boot support in SLOF
IPv6 boot support in SLOF
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: SLOF (Show other bugs)
7.3
ppc64 Unspecified
low Severity low
: rc
: ---
Assigned To: Thomas Huth
Virtualization Bugs
: FutureFeature
Depends On: 1279954 1301081
Blocks: 1305606 1313485
  Show dependency treegraph
 
Reported: 2015-12-02 09:19 EST by Thomas Huth
Modified: 2016-11-04 00:33 EDT (History)
10 users (show)

See Also:
Fixed In Version: SLOF-20160223-3.gitdbbfda4.el7
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-04 00:33:11 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)
ipv6 net boot -1 (78.38 KB, image/png)
2016-06-02 06:13 EDT, Qunfang Zhang
no flags Details
ipv6 net boot -2 (126.38 KB, image/png)
2016-06-02 06:18 EDT, Qunfang Zhang
no flags Details
ipv6 net boot -3 (78.84 KB, image/png)
2016-06-02 06:18 EDT, Qunfang Zhang
no flags Details
ipv6 net boot -4 (128.23 KB, image/png)
2016-06-02 06:19 EDT, Qunfang Zhang
no flags Details
ipv6 net boot -5 (79.04 KB, image/png)
2016-06-02 06:21 EDT, Qunfang Zhang
no flags Details
ipv6 net boot -6 (128.11 KB, image/png)
2016-06-02 06:22 EDT, Qunfang Zhang
no flags Details

  None (edit)
Description Thomas Huth 2015-12-02 09:19:58 EST
There are plans to enable IPv6 support in iPXE for booting KVM guests on x86 via IPv6. So we should also make sure that the KVM guests on powerpc can boot via IPv6, too. Basic IPv6 support is already available in SLOF, but I've been told that it is pretty much untested so far, so we need to make sure that it works. This ticket will be used to verify that these features work:

- Loading the kernel / secondary boot loader via TFTP over IPv6

- Manually specifying the IPv6 addresses for the server and client

- "Automatic" boot via DHCPv6
Comment 1 Thomas Huth 2015-12-02 09:22:22 EST
TODO: Check whether we need "stateless address" configuration (via NDP), too, since this seems not to be supported by SLOF yet.
Comment 2 Thomas Huth 2016-01-22 09:46:30 EST
The following two commits should fix the issue with the stateless address autoconfiguration:

https://github.com/aik/SLOF/commit/7dc047e600063e13915a81d05713769d96fdcf7c
https://github.com/aik/SLOF/commit/a9aa48d28ab32ccf6820d01aa58ac9c9fdc857fb
Comment 3 Thomas Huth 2016-01-22 09:48:51 EST
Booting does not work yet if the TFTP server is behind a router. I opened a separate BZ to track this: 1301081
Comment 4 Thomas Huth 2016-04-28 07:43:13 EDT
Beside the problem with the router (BZ 1301081), there are two other issues left in the IPv6 code of SLOF, fixed by the following upstream commits:

http://git.qemu.org/?p=SLOF.git;a=commitdiff;h=c006b3827032e9f5a8
http://git.qemu.org/?p=SLOF.git;a=commitdiff;h=02facda6a5078b2f28
Comment 5 Thomas Huth 2016-04-28 15:47:20 EDT
Posted the two patches that I've mentioned in comment 4.
Comment 6 Thomas Huth 2016-04-29 09:23:52 EDT
Andrew discovered that there are some more things to be fixed here, so moving this ticket back to ASSIGNED instead of POST.
Comment 9 Qunfang Zhang 2016-06-02 05:08:34 EDT
Hi, Thomas

I tested this bug with the following version but hit a problem, could you help check?  Thanks.

Test version:
[root@ibm-p8-kvm-02-qe ~]# uname -r
3.10.0-421.el7.ppc64le
[root@ibm-p8-kvm-02-qe ~]# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-2.6.0-4.el7.ppc64le
[root@ibm-p8-kvm-02-qe ~]# rpm -q SLOF
SLOF-20160223-3.gitdbbfda4.el7.noarch

Steps:

1. Boot up a vm on host to be the TFTP server and DHCPv6 server:

/usr/libexec/qemu-kvm -enable-kvm -nographic -vga none -device virtio-net-pci,netdev=ipv6net1,mac=02:ca:fe:00:02:02 -netdev socket,id=ipv6net1,listen=:11122 -drive file=dhcpv6server.qcow2,if=none,format=qcow2,id=block-1 -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=block-1,id=block-1

2. Configuration o this vm:
#yum install dhcp
#nmcli c add type ethernet ifname eth0 con-name eth0 ip6 fc00:1::1
#ifup eth0
#ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fc00:1::1  prefixlen 128  scopeid 0x0<global>
        inet6 fe80::ca:feff:fe00:202  prefixlen 64  scopeid 0x20<link>
        ether 02:ca:fe:00:02:02  txqueuelen 1000  (Ethernet)
        RX packets 88070  bytes 5819948 (5.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 88126  bytes 98306870 (93.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

#systemctl stop firewalld
#echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
#echo "net.ipv6.conf.all.forwarding = 1" >> /etc/sysctl.conf

#cat /etc/dhcp/dhcpd6.conf :
 default-lease-time 2592000;
 preferred-lifetime 604800;
 dhcpv6-lease-file-name "/var/lib/dhcpd/dhcpd6.leases";
 log-facility local7;
 subnet6 fc00:1::/64 {
        interface enp0s0;
        range6 fc00:1::1000 fc00:1::2000;
        option dhcp6.bootfile-url "tftp://[fc00:2::ca:feff:fe00:302]/zImage";
        option dhcp6.name-servers fc00:1::1;
 }

systemctl enable dhcpd6
systemctl start dhcpd6

#yum install tftp-server
#systemctl enable tftp.socket
#systemctl start tftp.socket
#cp /boot/vmlinuz-3.10.0-* /var/lib/tftpboot/zImage

3. I boot up another vm with pre-installed os to check whether the tftp server works:

/usr/libexec/qemu-kvm -enable-kvm -nographic -vga none -device virtio-net-pci,netdev=ipv6net,mac=02:ca:fe:00:01:02 -netdev socket,id=ipv6net,connect=:11122 -drive file=rhel72-ppc64le-virtio.qcow2,if=none,format=qcow2,id=block-2 -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=block-2,id=block-2

After guest bootup:
[root@dhcp71-196 ~]#  systemctl stop firewalld
[root@dhcp71-196 ~]# tftp -6 fc00:1::1 -c get zImage
[root@dhcp71-196 ~]# ls -lrth 
-rw-r--r--. 1 root root  18M Jun  2 16:41 zImage
...

4. Shutdown this vm and boot a empty guest image to test the net boot function:

/usr/libexec/qemu-kvm -enable-kvm -nographic -vga none -device virtio-net-pci,netdev=ipv6net,mac=02:ca:fe:00:01:02 -netdev socket,id=ipv6net,connect=:11122 -drive file=dhcpv6client.qcow2,if=none,format=qcow2,id=block-2 -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=block-2,id=block-2

At the early stage of boot, press "s" to enter the SLOF firmware. 

And then I tried "manual boot", "semi-manual boot" and "automatic boot", all can not work well, client could get the zImage on the TFTP server but failed to proceed:

(1)
...
Ready! 
0 > boot net:ipv6,fc00:1::1,zImage,fc00:1::ca:feff:fe00:102  
Trying to load:  from: /pci@800000020000000/ethernet@0:ipv6,fc00:1::1,zImage,fc00:1::ca:feff:fe00:102 ... 
 Initializing NIC
  Reading MAC address from device: 02:ca:fe:00:01:02
  Using IPv6 address: fc00:1::ca:feff:fe00:102
  Requesting file "zImage" via TFTP from fc00:1::1
  Receiving data:  18051 KBytes
  TFTP: Received zImage (18051 KBytes)
ELF64: VirtAddr(c000000000000000) != PhysAddr(0) not supported, aborting

E3403: Bad executable:   

E3406: Client application returned an error.

        ..`. ..     .......  ..           ......      .......
    ..`...`''.`'. .''``````..''.       .`''```''`.  `''``````
       .`` .:' ': `''.....  .''.       ''`     .''..''.......
         ``.':.';. ``````''`.''.      .''.      ''``''`````'`
         ``.':':`   .....`''.`'`...... `'`.....`''.`'`       
        .`.`'``   .'`'`````.  ``''''''  ``''`'''`. `'`       
  Type 'boot'  and press return  to  continue  booting  the system.
  Type 'reset-all'  and  press  return  to   reboot   the   system.

 ok
0 > 

(2)
...
Ready! 
0 > boot net:ipv6,fc00:1::1,zImage  
Trying to load:  from: /pci@800000020000000/ethernet@0:ipv6,fc00:1::1,zImage ... 
 Initializing NIC
  Reading MAC address from device: 02:ca:fe:00:01:02
  Using IPv6 address: fc00:1::2ca:feff:fe00:102
  Requesting file "zImage" via TFTP from fc00:1::1
  Receiving data:  18051 KBytes
  TFTP: Received zImage (18051 KBytes)
ELF64: VirtAddr(c000000000000000) != PhysAddr(0) not supported, aborting

E3403: Bad executable:   

E3406: Client application returned an error.

        ..`. ..     .......  ..           ......      .......
    ..`...`''.`'. .''``````..''.       .`''```''`.  `''``````
       .`` .:' ': `''.....  .''.       ''`     .''..''.......
         ``.':.';. ``````''`.''.      .''.      ''``''`````'`
         ``.':':`   .....`''.`'`...... `'`.....`''.`'`       
        .`.`'``   .'`'`````.  ``''''''  ``''`'''`. `'`       
  Type 'boot'  and press return  to  continue  booting  the system.
  Type 'reset-all'  and  press  return  to   reboot   the   system.

 ok
0 > 


(3)
...
0 > boot net:ipv6  
Trying to load:  from: /pci@800000020000000/ethernet@0:ipv6 ... 
 Initializing NIC
  Reading MAC address from device: 02:ca:fe:00:01:02
  Requesting information via DHCPv6: done
  Using IPv6 address: fc00:1::2ca:feff:fe00:102
  Requesting file "zImage" via TFTP from fc00:1::1
  Receiving data:  18051 KBytes
  TFTP: Received zImage (18051 KBytes)
ELF64: VirtAddr(c000000000000000) != PhysAddr(0) not supported, aborting

E3403: Bad executable:   

E3406: Client application returned an error.

        ..`. ..     .......  ..           ......      .......
    ..`...`''.`'. .''``````..''.       .`''```''`.  `''``````
       .`` .:' ': `''.....  .''.       ''`     .''..''.......
         ``.':.';. ``````''`.''.      .''.      ''``''`````'`
         ``.':':`   .....`''.`'`...... `'`.....`''.`'`       
        .`.`'``   .'`'`````.  ``''''''  ``''`'''`. `'`       
  Type 'boot'  and press return  to  continue  booting  the system.
  Type 'reset-all'  and  press  return  to   reboot   the   system.

 ok
0 >
Comment 10 Qunfang Zhang 2016-06-02 05:13:26 EDT
I installed the dhcp, tftp-server, tftp packages previously with external network. And when I did the above testing, only attach the nic device with ipv6 address.
Comment 11 Thomas Huth 2016-06-02 05:34:08 EDT
(In reply to Qunfang Zhang from comment #9)
[...]
> #yum install tftp-server
> #systemctl enable tftp.socket
> #systemctl start tftp.socket
> #cp /boot/vmlinuz-3.10.0-* /var/lib/tftpboot/zImage
[...]
> 0 > boot net:ipv6,fc00:1::1,zImage,fc00:1::ca:feff:fe00:102  
> Trying to load:  from:
> /pci@800000020000000/ethernet@0:ipv6,fc00:1::1,zImage,fc00:1::ca:feff:fe00:
> 102 ... 
>  Initializing NIC
>   Reading MAC address from device: 02:ca:fe:00:01:02
>   Using IPv6 address: fc00:1::ca:feff:fe00:102
>   Requesting file "zImage" via TFTP from fc00:1::1
>   Receiving data:  18051 KBytes
>   TFTP: Received zImage (18051 KBytes)
> ELF64: VirtAddr(c000000000000000) != PhysAddr(0) not supported, aborting
> 
> E3403: Bad executable:   
> 
> E3406: Client application returned an error.

Ah, sorry, that was a bad idea of mine to suggest to use a file from /boot/vmlinuz* to be used as network booting kernel ... the kernels from /boot can not be used to be started from the SLOF firmware directly, you need a special kernel for this instead.
Comment 14 Qunfang Zhang 2016-06-02 06:10:29 EDT
After replaced the kernel to boot, now IPV6 boot succeeds for all the following boot methods:

(1)manual boot, like:
0 > boot net:ipv6,fc00:1::1,ppc64.img,fc00:1::ca:feff:fe00:102  

(2)semi-manual boot, like:
0 > boot net:ipv6,fc00:1::1,zImage  

(3)automatic boot, like:
0 > boot net:ipv6

Test version and test steps are the same as comment 9, so not paste duplicate comment here.  Will attach some screenshots.
Comment 15 Qunfang Zhang 2016-06-02 06:13 EDT
Created attachment 1164018 [details]
ipv6 net boot -1
Comment 16 Qunfang Zhang 2016-06-02 06:18 EDT
Created attachment 1164019 [details]
ipv6 net boot -2
Comment 17 Qunfang Zhang 2016-06-02 06:18 EDT
Created attachment 1164020 [details]
ipv6 net boot -3
Comment 18 Qunfang Zhang 2016-06-02 06:19 EDT
Created attachment 1164021 [details]
ipv6 net boot -4
Comment 19 Qunfang Zhang 2016-06-02 06:21 EDT
Created attachment 1164022 [details]
ipv6 net boot -5
Comment 20 Qunfang Zhang 2016-06-02 06:22 EDT
Created attachment 1164023 [details]
ipv6 net boot -6
Comment 21 Qunfang Zhang 2016-06-02 06:22:56 EDT
Setting to VERIFIED according to comment 9, comment 10 and comment 14.
Comment 23 errata-xmlrpc 2016-11-04 00:33:11 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2355.html

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