The first post was evaluated somewhat critically, but a sound thought sounded to lay out the entire cycle of articles at once.
Unfortunately, it’s impossible to arrange everything at once simply physically. And do not want to do a tyap-lyap.
This article is about adding drivers to XCP, using the example of installing a network card.
To solve the set tasks of 2x network cards, I didn’t have enough, in our region it is quite difficult to get something needed, so I have to be content with what we have. Strolling through the shops were purchased network card D-Link DGE-560T (PCI Express v. 1.1, gigabit, low-profile, with interchangeable mounting plates).
Having inserted the network card into the case, with fingers crossed, I started the car, in the BIOS the card is visible - it is already good. We are waiting for the XCP start and see the first disappointment, in the NIC tab we see only 2 of our embedded cards
')
So we do not have firewood, we will search. Check whether our axis sees the piece of hardware itself (XCP is based on Centos 5.7 (Linux kernel v2.6.32.43)) the command will help us with this:
lspci
> 07:00.0 Ethernet controller: D-Link System Inc DGE-528T Gigabit Ethernet Adapter (rev 06)
Already well, the axis sees our piece of iron (although not quite correctly).
Here, a small digression, the comments indicated that installing a hypervisor is not such a thorny path, even if it is so for some - but when you follow someone's instructions, you don’t think what was behind this instruction, and the author rarely talks about those actions that led to errors or gave an incorrect result. For example, when installing a network card, I, like any reasonable person, went to the manufacturer’s website, found the device, downloaded the latest drivers, and suffered for 2 days trying to make friends with the system, I could write it off on my little experience with unix-like systems, but Attraction of familiar experts from the side did not help, Google said that for these drivers this is a common problem and no one described a solution for it. On one foreign resource, it was suggested to try older drivers and they really came up and earned a miracle. As you can see, even such a short description takes up a whole paragraph (imkho not very necessary) text, therefore, take for granted that there were problems and I post the optimal, in my not sophisticated way, solution.
So, it will be necessary to install drivers, but everything is not as simple as it seems, therefore I offer you a sequence of actions. To install firewood, you will need to install libraries to build
gcc gcc44 glibc-devel dkms
. But first you need to edit several repository configuration files so that our Yum can download and install what you need.
Open the files and change all the keys in enable = 0 to 1:
nano /etc/yum.repos.d/CentOS-Base.repo
nano /etc/yum.repos.d/CentOS-Vault.repo
For convenience, I recommend to put several useful utilities
MC, HTOP, MTR
.
yum install mc
You will also need the make utility to build.
yum install make
Next you have to connect an additional repository, because Something in the base repository can not be found (including htop and dkms) I use the RPM Forge repository.
Here is the list of repositories for Centos.
And
here is the instruction for connecting the repository we need specifically.
To begin with we will be defined with the version of Centos and type of system:
uname -a
Linux XenSecond 2.6.32.43-0.4.1.xs1.6.10.734.170748xen
rpm -q centos-release
centos-release-5-7.el5.centos
Well, we decided what we are dealing with and now we know exactly which version of the repository we need to connect, which we actually do. Download the link above the rpm package and install it with the command (do not forget to go to the folder with the downloaded package - I poured it over SSH into the / home daddy).
yum --nogpgcheck localinstall rpmforge-release-0.5.3-1.el5.rf.i386.rpm
Install the repository key.
rpm --import apt.sw.be/RPM-GPG-KEY.dag.txt
Now we are installing everything that we need when installing the drivers:
yum install gcc gcc44 glibc-devel dkms htop
It remains just a little to install kernel packages for XCP - it was necessary to tinker with to look for its
2.6.32.43-0.4.1.xs1.6.10.734.170748xe
version - because if you just enter
yum install kernel-xen-devel - so do not do this !!!
Then we will be offered to install the package
2.6.18-371.1.2.el5.centos.plus
, which for some reason really does not like the installer driver.
Google and download
kernel-xen-devel-2.6.32.43-0.4.1.xs1.6.10.734.170748.i686.rpm
and
kernel-xen-devel-2.6.32.43-0.4.1.xs1.6.10.734.170748.i686.rpm
it
rpm -i kernel-xen-devel-2.6.32.43-0.4.1.xs1.6.10.734.170748.i686.rpm
Then we download firewood for our Dlink card DGE-560T. I will tell you a secret, the firewood downloaded from the site turned out to be very capricious, because I copied the drivers from the included disk, then, going to the drivers folder, I started the installation with the command
sh autorun.sh
If we now log into XenCenter and click the Rescan button in the NICs tab, we will see a new network adapter. If you think that this finish is not in a hurry, as it turned out, XCP after a reboot can easily change the interface names in some places, and then sit and guess why the VLAN does not rise. To solve this problem, go
here and read to full enlightenment or just do it :
1. we do
ifconfig and we remember
HWaddr
all our interfaces.
2. do
nano /etc/sysconfig/network-scripts/interface-rename-data/static-rules.conf and add entries of this kind to this file
eth0: mac ="E4:11:5B:A9:BE:F0"
eth2: mac ="AC:F1:DF:3F:EF:FB"
eth1: mac ="E4:11:5B:A9:BE:F1"
as values for
mac
insert previously remembered
HWaddr
.
3. run such a terrible team
etc / sysconfig / network-scripts / interface-rename.py -r
4. To calm our conscience, we can see in the log whether we are doing well:
cat /var/log/interface-rename.log.
5. Now we will make Ksenserver reskan network interfaces:
xe pif-scan host-uuid =
6. And now be sure to overload the machine.
7. If as a result of your actions there are dead interfaces, which can not be removed, you need to do this:
but.
xe network-list (look for the extra network and remember its UUID)
b.
xe network-destroy uuid = 60afcf0e-668f-02ad-5110-84408c41fd9 (we get the error
The network contains active PIFs and cannot be deleted. pifs: 60679ca5-9f06-9847-b5d2-d1bcffb6e2fe
and tell us the UIF to delete)
at. do
xe pif-forget uuid = 60679ca5-9f06-9847-b5d2-d1bcffb6e2fe
and again do
xe network-destroy uuid = 60afcf0e-668f-02ad-5110-84408c41fd9
As a result, peace of mind and tranquility will return to your XCP.
For more convenient work install utilities
yum install htop mtr
Don't forget, after all this, edit all repository configuration files again and return 0 instead of 1.
nano /etc/yum.repos.d/CentOS-Base.repo
nano /etc/yum.repos.d/CentOS-Vault.repo
For a good sound sleep, you should also disable the RPM repository - but I did not do this, as the experiments continue.
In the next article I will try to lay out a comparative analysis and explain why I chose XCP to deploy virtualization technologies.
Thank you all, I am waiting for your questions.