How to add kernel module easily ?

aljeux

New Member
Sep 10, 2008
7
0
1
Hi,

I need to add some modules on the current kernel. Can you give me some information on how to get the exact kernel sources of your proxmox ve kernel ?

Thanks,
Alain.
 
The module is: vmware ;-) This is for migration mainly.

I've already seen the tar and tried but the readme file is quite obscure to me.
Anyway, I will try again.

Thanks,
Alain.
 
The module is: vmware ;-) This is for migration mainly.

I've already seen the tar and tried but the readme file is quite obscure to me.
Anyway, I will try again.

Thanks,
Alain.

confused also, about what vmware module your are talking here and why do you need this for migration?
 
I would like to install vmware server on the my proxmox ve to add vmware capabilities for my machine. During the installation of vmware, kernel sources are required to build the vmware module.

My need of vmware is mainly for migration, I plan to move to openvz vps but this may require some times so I would like to have both system running during the migration period.

Alain.
 
I would like to install vmware server on the my proxmox ve to add vmware capabilities for my machine. During the installation of vmware, kernel sources are required to build the vmware module.

My need of vmware is mainly for migration, I plan to move to openvz vps but this may require some times so I would like to have both system running during the migration period.

Alain.

Better way: Migrate your vmware to KVM. see http://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE

If you got more time, migrate to OpenVZ. Proxmox VE is aware of resource sharing between KVM and OpenVZ VM´s (not for vmware).
 
Sorry for my late reply.

I can't use kvm, my current server does not have VT.

Can you provide somewhere (on your ftp server for example) a tarball of your /usr/src/linux ?

I'm trying to get the kernel used (from the README in pve-kernel) but it seems no longer available on debian servers.

Thanks again for your help,
Alain.
 
Sorry for my late reply.

I can't use kvm, my current server does not have VT.

Can you provide somewhere (on your ftp server for example) a tarball of your /usr/src/linux ?

I'm trying to get the kernel used (from the README in pve-kernel) but it seems no longer available on debian servers.

Thanks again for your help,
Alain.

You need to compile your own Kernel but we do not support this in this forum - this is a support forum for Proxmox VE using the Proxmox VE Kernel. (All information available is in the readme)

Please note, next week we will publish 1.0 including a new Kernel, maybe this one is usable for you (what do you miss?)
 
Sorry for my late reply.

I can't use kvm, my current server does not have VT.

Can you provide somewhere (on your ftp server for example) a tarball of your /usr/src/linux ?

I'm trying to get the kernel used (from the README in pve-kernel) but it seems no longer available on debian servers.

Thanks again for your help,
Alain.

btw, running vmware on a Proxmox VE host is not possible and makes no sense.
 
I don't want to recompile my own kernel, I just need to add a new module and to add this module I need access to the sources used to build the proxmox kernel (ie: /usr/src/linux).
 
I don't want to recompile my own kernel, I just need to add a new module and to add this module I need access to the sources used to build the proxmox kernel (ie: /usr/src/linux).

Again, if you need the sources you need compile your own Kernel.
 
Last edited:
I don't think this person's request is unreasonable.

You are distributing a kernel licensed under the GPL. You are required to also provide the source. It doesn't matter if it's a vanilla Debian kernel or not. You still have to make available the source whenever you distribute GPLed code.

BTW, Proxmox VE is awesome. Keep up the great work!
 
You are distributing a kernel licensed under the GPL. You are required to also provide the source.
It doesn't matter if it's a vanilla Debian kernel or not. You still have to make available the source whenever you distribute GPLed code.

ftp://pve.proxmox.com/sources/pve-kernel-2.6.24-3.tar.gz

Everything referenced is still available, so I do not see the problem at all?

Did you ever tried to build the kernel?

- Dietmar
 
You do not reference the kernel source at all. Do we need the Debian source for a particular Debian kernel? Or do we need some vanilla kernel from kernel.org?

The README is not at all clear (understatement) and from it I cannot duplicate the exact kernel source used. Also, the binary kernel requires the source be in

/home/dietmar/pve/pve-kernel-2.6.24/linux-2.6.24-openvz

which is probably not the ideal place for those people trying to modify it.

I would suggest you do what other distributors do: either


  1. distribute the exact kernel source tar'ed up
  2. or point people at a particular generic kernel source and provide a one-step process to apply all patches, changes and configuration to turn it into the exact kernel source used by the distributed kernel
or both.

Thanks! I'm not trying to be critical or an annoyance. I'm just pointing out that getting the kernel sources for the Proxmox VE kernel is more opaque than you probably intended.
 
... Also, the binary kernel requires the source be in

/home/dietmar/pve/pve-kernel-2.6.24/linux-2.6.24-openvz

which is probably not the ideal place for those people trying to modify it.

...

Forget I said that part. For some reason I wss thinking the path pointed to by /lib/modules/2.6.24/{build,source} was specified by the running kernel kernel.
 
You do not reference the kernel source at all. Do we need the Debian source for a particular Debian kernel? Or do we need some vanilla kernel from kernel.org?

Everything you need is in the Makefile

The README is not at all clear (understatement) and from it I cannot duplicate the exact kernel source used.

just type 'make' - eveything is downloaded automatically.

Also, the binary kernel requires the source be in

/home/dietmar/pve/pve-kernel-2.6.24/linux-2.6.24-openvz

which is probably not the ideal place for those people trying to modify it.

were do you found that link?

I would suggest you do what other distributors do: either
1.)distribute the exact kernel source tar'ed up

Problem: current sources are about 670MB

2.)or point people at a particular generic kernel source and provide a one-step process to apply all patches, changes and configuration to turn it into the exact kernel source used by the distributed kernel

Thats what the Makefile is for. just type 'make' - isn't that easy enough?

- Dietmar
 
...
were do you found that link?

/lib/modules/2.6.24/{build,source}

However, forget I said anything about that. It's easy enough to change.

Problem: current sources are about 670MB

The linux-2.6.24-openvz directory is only 46MB when cleaned, .git directory removed, tar'ed and bzip'ed.

Thats what the Makefile is for. just type 'make' - isn't that easy enough?

Well that sounds easy enough. If that were the case I would suggest that somewhere in the README it should actually say that. ;-)

However when I type make I get this error:
[root@vm pve-kernel-2.6.24]# make
git clone git://git.openvz.org/pub/linux-2.6.24-openvz linux-2.6.24-openvz.org
remote: Counting objects: 643673, done.
remote: Compressing objects: 100% (114952/114952), done.
Indexing 643673 objects.
remote: Total 643673 (delta 528680), reused 642558 (delta 527814)
100% (643673/643673) done
Resolving 528680 deltas.
100% (528680/528680) done
Checking files out...
100% (23205/23205) done
git checkout -b local 2898400a6c100c60930ac3f0ae54f19e3199a4ab
fatal: Not a git repository
make: *** [linux-2.6.24-openvz.org/README] Error 128
If I run make again it appears to download and build a bunch of stuff, including unnecessary things like busybox. Eventually it bombs out again with this error:
...
make[1]: Leaving directory `/root/pve-kernel-2.6.24/busybox-1.9.1'
tar cpf busybox.tar -C busybox .
dpkg -i /pve/0.10/extra/bootsplash-theme-proxmox_1.0-1.deb
dpkg: error processing /pve/0.10/extra/bootsplash-theme-proxmox_1.0-1.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
/pve/0.10/extra/bootsplash-theme-proxmox_1.0-1.deb
make: *** [proxmox_splash.dat] Error 1
Really, we don't need all that other stuff. We don't even need the kernel to be compiled. We just need the configured kernel source.

However, there is kernel directory downloaded and configured in the middle of all that so that should work, right?

Wrong. Building modules against this kernel source directory works but the resulting modules cannot be loaded into the Proxmox VE kernel because they are incompatible:
[root@vm testmodule]# insmod test.ko
insmod: error inserting 'test.ko': -1 Invalid module format

[root@vm testmodule]# dmesg | tail -1
test: disagrees about version of symbol struct_module
In other words, these are not the same kernel. This kernel source tree is not the tree used to build the kernel you actually ship.

Which brings us back to square one: Where can we find the source code for the kernel you actually ship?
 
We just prepare the 1.0 release, which comes with a new kernel. Cant you wait one or 2 week until the release? Debugging the old kernel is a waste of time IMHO.
 
git checkout -b local 2898400a6c100c60930ac3f0ae54f19e3199a4ab
fatal: Not a git repository

There is a bug in the makefile, should be:

cd linux-2.6.24-openvz.org; git checkout ....

If I run make again it appears to download and build a bunch of stuff, including unnecessary things like busybox. Eventually it bombs out again with this error:

Why is compiling busybox unnecessary??

Which brings us back to square one: Where can we find the source code for the kernel you actually ship?

This is the source - there must be something else wrong.

- Dietmar
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!