[SOLVED] How to update QEMU version

Becod

Member
Feb 11, 2020
26
0
6
25
I have some special needs to modify QEMU source code
But I don't know how to install to Proxmox VE.
There are no relevant examples on the Internet.
So I'm going to ask if anyone in the forum can install new QEMU on Proxmox VE.
Thanks.
 
The packaging is over at: https://git.proxmox.com/?p=pve-qemu.git;a=summary
With the real qemu as git submodule, you can either do changes in there or in the packagings debian/patches/ folder (don't forget to add patches to the series file).
There're are various resources about Debian packaging out there, if you run into trouble regarding this.
 
Thank you. I found it before and it's under compiling
But compilation is very slow. Is there any solution
Compile parameters
Code:
make -j32
L9tVJc3Uy6B8kDF.png
 
Thank you. I found it before and it's under compiling
But compilation is very slow. Is there any solution
Compile parameters
Code:
make -j32
L9tVJc3Uy6B8kDF.png

wait or buy faster cpu ? (do you have already 32cores ? -j should be max the number of core you have)

Don't remember, but it shouldn't take more than 15-20min with a very old 4cores cpu)
 
Thank you. I found it before and it's under compiling
But compilation is very slow. Is there any solution

If you compile from the pve-qemu directory with the make deb target the buildsystem should already default to use as many cores as you have available, it cannot be faster than that.

I need < 1 minute with a i9-9900K (16 threads) here, pretty fast for a complex project IMO; ceph for example needs about an hour (and 20x more memory)..
 
If you compile from the pve-qemu directory with the make deb target the buildsystem should already default to use as many cores as you have available, it cannot be faster than that.

I need < 1 minute with a i9-9900K (16 threads) here, pretty fast for a complex project IMO; ceph for example needs about an hour (and 20x more memory)..
L5640 * 2 of 24 threads + 16g ECC memory
I've spent more than two hours to compiling
I think I must move it to my laptop and compile it
 
Did you finished? As else you could be in a compile loop, i.e., where the buildsystem never finishes and just starts over again..
No, I'm now moving it to my laptop to compile
Now I am missing a package named libproxmox-backup-qemu0-dev, do you have it?
OS: Kali 2019
FqXRT27uJbEznIW.png

This was not prompted on previous Debian
I only have Kali system on my laptop

I found the package on the mirror and installed it
Now compiling
 
Last edited:
@Becod how did you get on? I'm getting the following error when trying to compile in a Debian Buster container:

Code:
In file included from /root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/timer.h:4,
                 from /root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/timed-average.h:29,
                 from /root/pve-qemu/pve-qemu-kvm-5.0.0/include/block/accounting.h:28,
                 from /root/pve-qemu/pve-qemu-kvm-5.0.0/include/block/block_int.h:27,
                 from block/file-posix.c:30:
/usr/include/linux/swab.h: In function ‘__swab’:
/root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/bitops.h:20:34: error: "sizeof" is not defined, evaluates to 0 [-Werror=undef]
#define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)
                                  ^~~~~~
/root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/bitops.h:20:41: error: missing binary operator before token "("
#define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)

EDIT: apt install pve-kernel-libc-dev did the trick.
 
Last edited:
from block/file-posix.c:30: /usr/include/linux/swab.h: In function ‘__swab’: /root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/bitops.h:20:34: error: "sizeof" is not defined, evaluates to 0 [-Werror=undef] #define BITS_PER_LONG (sizeof (unsigned long) * BITS_PER_BYTE) ^~~~~~ /root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/bitops.h:20:41: error: missing binary operator before token "(" #define BITS_PER_LONG (sizeof (unsigned long) * BITS_PER_BYTE)

See https://forum.proxmox.com/threads/help-for-patching-pve-qemu.70936/#post-318279
 
If this is a Debian Buster Container and you do not can have the Proxmox VE apt sources there you can also downgrade the linux-libc-dev package as alternative to installing pve-kernel-libc-dev:

apt install linux-libc-dev=4.19.98-1+deb10u1
 
@Becod how did you get on? I'm getting the following error when trying to compile in a Debian Buster container:

Code:
In file included from /root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/timer.h:4,
                 from /root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/timed-average.h:29,
                 from /root/pve-qemu/pve-qemu-kvm-5.0.0/include/block/accounting.h:28,
                 from /root/pve-qemu/pve-qemu-kvm-5.0.0/include/block/block_int.h:27,
                 from block/file-posix.c:30:
/usr/include/linux/swab.h: In function ‘__swab’:
/root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/bitops.h:20:34: error: "sizeof" is not defined, evaluates to 0 [-Werror=undef]
#define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)
                                  ^~~~~~
/root/pve-qemu/pve-qemu-kvm-5.0.0/include/qemu/bitops.h:20:41: error: missing binary operator before token "("
#define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)

EDIT: apt install pve-kernel-libc-dev did the trick.
Wish you success, the relevant RPMs can be found on the apt sources.
 

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!