Citrix 6.1 CNA card Qlogic Driver installation
Citrix allows one to build any custom kernel module or hardware driver for XenServer, by offering Driver DevelopmentKit (DDK). A DDK is essentially a virtual machine with all the kernel headersand development tools needed to extend the XenServer kernel. The followingguide is onhow to use DDK tocompile a custom kernel module or hardware driver for XenServer.
In this example, I am going to use theDDK downloadable from Citrix for XenServer 6.0 with Hotfix XS60E003. So youwill need to have a XenServer host of the same version. If you just haveinstalled fresh XenServer 6.0, you first need to apply Hotfix XS60E003 to yourXenServer in order to use the DDK. Note that the Hotfix XE60E003 has two Hotfixdependencies: XS60E001 and XS60E001. Therefore, apply three Hotfixes one by onein sequence to fresh XenServer 6.0: XS60E001, XS60E002 and XS60E003. Here arethe steps.
Installing the Hotfix
Customers should use either XenCenter or the XenServer Command LineInterface (CLI) to install this update. Once the update has installed, theserver must be restarted for it to take effect. As with any software update,please back up your data before applying this hotfix. Citrix recommendsupdating all hosts within a pool sequentially. Upgrading of hosts should bescheduled to minimize the amount of time the pool runs in a "mixedstate" where some hosts have been upgraded and some have not. Running amixed pool of updated and non-updated hosts for general operation is notsupported.
Note: The p_w_upload tothis article is a zip file. It contains both the hotfix update package, and thesource code for any modified open source components. The source code is notnecessary for hotfix installation: it is provided to fulfil licensingobligations.
Installing the update usingXenCenter
1.Download the update to a known location on acomputer that has XenCenter installed.
2.In XenCenter, on the Tools menu, select InstallUpdate. This displays the Install Update wizard.
3.Click Next to startthe Wizard.
4.Click Add to upload anew update.
5.Browse to the location where you downloaded thehotfix, select it, and then click Open.
6.From the list of updates select XS61E014.xsupdate and then click Next.
7.Select the hosts you wish to apply the hotfix to,and then click Next.
8.Follow the recommendations to resolve any upgradeprechecks and then click Next.
9.Choose how to perform post-update tasks. Inthe Post update options section, select automaticallyor manually, and then clickInstall update.
10.When theinstallation process is complete, click Finish to exitthe wizard.
NOTES:
·Customers whoselect to manually perform thepost-update tasks must ensure to do so after installing the hotfix.
·Customers whoselect to automatically perform thepost-update tasks should note that XenCenter reboots each host sequentiallystarting with the Pool Master, where possible VMs will be migrated to otherrunning hosts to avoid VM downtime. When the Pool Master is being rebooted,XenCenter will be unable to monitor the pool.
Installing the update using the xeCommand Line Interface
1.Download the update file to a known location.
2.Extract the xsupdate file from the zip.
3.Upload the xsupdate file to the Pool Master byentering the following commands:
(Where hostname is the PoolMaster's IP address or DNS name.)
xe patch-upload -s <hostname> -uroot -pw <password> file-name=<path_to_update_file>\XS61E014.xsupdate
XenServer assigns theupdate file a UUID which this command prints. Note the UUID.
b285594e-85d2-4dcc-abe5-7dcce8b000b5
4.Apply the hotfix to all hosts in the pool,specifying the UUID of the hotfix:
xe -s <hostname> -uroot -pw <password> patch-pool-apply uuid=b285594e-85d2-4dcc-abe5-7dcce8b000b5
5.Verify that the update was applied by usingthe patch-list command.
xe patch-list -s <hostname> -uroot -pw <password> name-label=XS61E014
If the update has beensuccessful, the hosts field will containthe UUIDs of the hosts this patch was successfully applied to. This should be acomplete list of all hosts in the pool.
6.To verify in XenCenter that the update has beenapplied correctly, select the Pool, and then click the General tab. This displays the Pool properties. Inthe Updates section, ensure that the update is listedas Fully Applied.
7.The hotfix is applied to all hosts in the pool, butit will not take effect until each host has been rebooted. For each host,migrate the VMs that you wish to keep running, and shutdown the remaining VMsbefore rebooting the host.
Importing the DDK VM through XenCenter
8.You can also import theDDK directly on the host using the xe Command Line Interface (CLI).
9. Insert the DDK CD intothe CD-ROM drive of the machine running XenCenter.
10. Select the VM > Import menu option. The VM Import Wizard is displayed:
11. Click Browse and changethe Files of type dropdown from the default of XenServer VirtualAppliance
12.(*.xva) to XenServer Virtual Appliance Version 1 (ova.xml).
13. Navigate to the DDK CD-ROM and select the ova.xml file within the DDKdirectory.
14. Click Next to use thedefaults on the Home Server and Storage pages.
15. On the Network page, add a virtual network interface to the VM.
16. Finish the VM Import Wizard.
4.5 Building the Driver for XenServer 6.x.
1. Install theXenServer host software on the server(s).
2. InstallXenCenter on the workstation(s).
3. ConnectXenCenter to the XenServer host(s).
4. Compiling thedriver inside DDK VM.
# DDK VM comesin "ddk.iso" format, extract it.
# This creats adirectory which contain ova.xml file.
# Click onimport VM & point out "ova.xml" file. Import process takes morethan 15 minutes.
# Power on DDKVM.
# Make sure youcan access DDK VM through virtual NIC.
5. Installing thedriver inside DDK VM.
# Copy qla2xxxsources inside DDK VM.
# Run/extras/build_rpm.sh or /extras/build.sh.
# Dependingupon rpm or kernel module build perform following
# In caseof qla2xxx.ko kernel module built, run command "modinfo qla2xxx | grep/lib/" to find out the path where qla2xxx.ko to be
copied.Replace the qla2xxx.ko at the path obtained.
# In caseof rpm built, install rpm using --force command. (e.g rpm -ivh qla2xxx...*.rpm--force)
# RebootXenServer. XenServer will come up with latest driver.
Note: Each XenServer build comes with specific DDK VM anddriver needs to be built on this specific DDK VM.
4.9 Updating Driver on Citrix Xenserver 6.x from RPM.
On CitrixXenserver 6.x in a boot-from-SAN environment, to upgrade the driver
from a rpm driverpackage, a manual rebuild of the RAMDISK is required.
1. Install theqla2xxx driver rpm:
# rpm -ihvqla2xxx-modules-[kernel version]-[driver version].i386.rpm
2. Create a backupcopy of the RAMDISK p_w_picpath:
# cd /boot
# cpinitrd-[kernel version].img initrd-[kernel version].img.bak
3. Rebuild theRAMDISK and reboot:
# mkinitrd -finitrd-[kernel version].img `uname -r`
# reboot
NOTE: In order build drivers, a kernel with fulldevelopment package is needed.
转载于:https://blog.51cto.com/leezreal/1369633