CentOS 7 upgrade to Qemu 4.2

General support questions
Post Reply
speedyrazor
Posts: 5
Joined: 2019/12/19 14:29:04

CentOS 7 upgrade to Qemu 4.2

Post by speedyrazor » 2019/12/19 14:48:14

Hi, I have a fresh CentOS 7 server basic install. which I believe comes with Qemu version 1.5.3, I can update this to something like 2.12 easily, but wanted the latest releaser which is 4.2. I have read of a few posts of how to compile it, which I have followed, but I am unsure fo how I make this my default Qemu package to use. I have used this guide:

$ git clone git://git.qemu-project.org/qemu.git
$ cd qemu
$ ./configure --target-list=x86_64-softmmu --enable-debug
$ make

This completes successfully.
When I run 'yum info qemu-kvm', it still shows version 1.5.3. How can I get 4.2 to be my system version and only use that by default (or is it already and I don't know?).
I know Im doing something silly, (sorry I'm a bit new to CentOS and KVM, as you can tell).

Kind regards.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7 upgrade to Qemu 4.2

Post by TrevorH » 2019/12/19 17:11:04

If you do sourcebuilds then you are replacing things behind the package manager's back and it knows nothing of them. To get it to see your updates - and by the way the correct way to update it - would be to package the newer version yourself. Use mock and the existing qemu-kvm SRPM/spec file to create your newer versions of the packages involved and keep them in your own repo.

The way you've done this now will break next time there is a qemu update via yum. All the files that you manually overwrote with your sourcebuild will now in turn be overwritten by the ones provided by the yum update and whatever you wanted the newer version for will stop working.

Even CentOS 8 only uses qemu 2.12.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

speedyrazor
Posts: 5
Joined: 2019/12/19 14:29:04

Re: CentOS 7 upgrade to Qemu 4.2

Post by speedyrazor » 2019/12/19 17:19:05

Thanks for your reply, and you can see I am new to this. Now we have established everything I did was wrong, you touched on the 'correct' way to do this, could you elaborate, or is there any how to, or tutorial please?

Kind regards.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7 upgrade to Qemu 4.2

Post by TrevorH » 2019/12/19 18:18:46

Is there a reason other than versionitis that you need a newer version than we supply? Have you read the RHEL Backporting information on https://access.redhat.com/security/updates/backporting about how Red Hat backport security fixes and enhancements to their versions?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

speedyrazor
Posts: 5
Joined: 2019/12/19 14:29:04

Re: CentOS 7 upgrade to Qemu 4.2

Post by speedyrazor » 2019/12/19 19:29:47

I must admit 'versionitis', does play some part, but, Im switching over from a long running ESXi instal for my home lab, and would like to start on the current version, if nothing else, for newer features.
Could you explain "package the newer version yourself. Use mock and the existing qemu-kvm SRPM/spec file to create your newer versions of the packages involved and keep them in your own repo", please?

Kind regards.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7 upgrade to Qemu 4.2

Post by TrevorH » 2019/12/19 19:50:57

Im switching over from a long running ESXi instal for my home lab, and would like to start on the current version, if nothing else, for newer features.
I think you may be using the wrong distro if those are your priorities. RHEL/CentOS concentrates mostly on stability and long term reliability and support. Each major version is supported for 10 years from initial release so that you can deploy it on new hardware and let it die off with the hardware. If you start replacing bits like qemu-kvm (which by the way is a Red Hat product) then you will also need to be subscribing to the security mailing list for each package you replace as you will no longer get updates from CentOS.

Mock is a utility for building packages in a chroot so that you do not pollute your running system with all the e.g. -devel packages needed to build the thing you want and nor do any pre-reqs it requires need to be installed on your build system. It produces reproducable builds that can be installed on other systems without needing to install a development environment on them.

The binary rpms that you install with yum/dnf are produced from source rpms (SRPMs). You feed an SRPM to mock and it builds the binary rpms for you. So you would need to grab the current SRPM for qemu-kvm for RHEL/CentOS and install that as a normal user (it gets installed under /home/user/rpmbuild) where you can edit the .spec file it installs in rpmbuild/SPECS and amend the version number, download the newer tarball and put it under rpmbuild/SOURCES then use rpmbuild -bs to build a new SRPM that you feed into mock to produce binary rpms.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

speedyrazor
Posts: 5
Joined: 2019/12/19 14:29:04

Re: CentOS 7 upgrade to Qemu 4.2

Post by speedyrazor » 2019/12/19 20:25:30

Thanks for the info TrevorH, I really appreciate your reply. My linux skills are not too bad, but Perhaps this approach is a bit much for me to take onboard. With that in mind, what distro would you recommend please?

Kind regards.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7 upgrade to Qemu 4.2

Post by TrevorH » 2019/12/19 20:30:47

Fedora is the bleeding edge Redhat-rpm distro but each version is only supported for 13 months from release. However there are methods to upgrade between that and the next version and I hear they work at least some of the time!
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

speedyrazor
Posts: 5
Joined: 2019/12/19 14:29:04

Re: CentOS 7 upgrade to Qemu 4.2

Post by speedyrazor » 2019/12/19 20:42:44

That sounds like exactly what I'm looking for, thanks for the excellent tip.

Kind regards.

denibuhe
Posts: 2
Joined: 2020/07/02 21:00:10

Re: CentOS 7 upgrade to Qemu 4.2

Post by denibuhe » 2020/07/02 21:03:17

I have found "advanced-virtualization" in the packages/mirror of CentOS8. Here you can get e.g. Qemu 4.2. Can I use it here without hesitation?

http://mirror.centos.org/centos/8/virt/ ... ualization
http://mirror.centos.org/centos/8/virt/ ... ackages/q/

Post Reply