e moved this page to our Documentation Portal. You can find the latest updates here. |
Question
How to add customer drivers into Cloudboot image?
Answer
In order to add drivers to the cloudboot image, the following steps are to be taken:
- Boot up a liveCD on the same version of CentOS as the cloudboot image and ensure the kernel version is the same.
- Compile driver that you want to incorporate into the cloudboot image and extract the <module>.ko file.
- Copy the file to the control panel server in the following location:
/tftpboot/images/centos5/diskless/snapshot/<HV MAC ADDRESS>/overlay/
You will probably need to create the overlay folder. You will also need to copy the file separately for each hypervisor.
Note: Even for CentOS 6 images, you should still use the Centos5 directory! - Make a file called 'earlyboot.sh' and set permissions - 'chmod +x earlyboot.sh'. The file should look similar to the following:
#!/bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH
modprobe ptp
modprobe configfs
insmod /i40e.ko
If you wanted it in /home/onapp, then you would change the insmod command to /home/onapp/<module>.ko and you would also need to create the /home/onapp directories inside the overlay folder for each hypervisor. - Some modules will need dependencies installed first, hence, the modprobe commands should go prior to the insmod. You can check the dependencies of the module as follows:
[root@172.17.0.20 ~]# modinfo /i40e.ko
filename: /i40e.ko
version: 1.2.38
license: GPL
description: Intel(R) Ethernet Connection XL710 Network Driver
author: Intel Corporation, <e1000-devel@lists.sourceforge.net>
srcversion: 2DD4F2DA0C801BE6DFE8ECB
alias: pci:v00008086d00001586sv*sd*bc*sc*i*
alias: pci:v00008086d00001585sv*sd*bc*sc*i*
alias: pci:v00008086d00001584sv*sd*bc*sc*i*
alias: pci:v00008086d00001583sv*sd*bc*sc*i*
alias: pci:v00008086d00001581sv*sd*bc*sc*i*
alias: pci:v00008086d00001580sv*sd*bc*sc*i*
alias: pci:v00008086d0000157Fsv*sd*bc*sc*i*
alias: pci:v00008086d00001574sv*sd*bc*sc*i*
alias: pci:v00008086d00001572sv*sd*bc*sc*i*
depends: configfs,ptp
vermagic: 2.6.32-358.6.2.el6.x86_64 SMP mod_unload modversions
parm: max_vfs:Number of Virtual Functions: 0 = disable (default), 1-128 = enable this many VFs (array of int)
parm: debug:Debug level (0=none,...,16=all) (int)