1

On Ubuntu 18.04, the default installation of qemu is something like version 3, and I needed virtiofs which has built-in support in later versions. So I uninstalled the qemu and related packages, downloaded the qemu 5.0 sources and complied it locally.

All worked well, including make install, which put the binaries in /usr/local/ which I guess is the correct default unless told otherwise.

Most things are working OK, but I'm now trying to get graceful shutdown / restart of guests working when the host is restarted, and have hit 2 snags so far.

  1. On host startup, I would see /usr/local/libexec/libvirt-guests.sh: 29: .: Can't open /usr/local/bin/gettext.sh. Of course, that's not where getttext.sh normally lives, but I can get round that by ln -s /usr/bin/gettext.sh /usr/local/bin/gettext.sh
  2. No failure message there now, but later in the host boot logs I see libvirt-guests.sh[2166]: touch: cannot touch '/usr/local/var/lock/subsys/libvirt-guests': No such file or directory

I could go on symlinking things so they appear accessible to libvirt, but I'm wondering if the correct fix is actually to install qemu where it expects to be.

So, first question, is reinstalling the right approach, or have I just missed some basic configuration which would leave the local package where it is, but allow everything to work as expected?

If not, I guess I will have to run ./configure --prefix=/usr and rebuild, but how could I remove the currently installed version in /usr/local/ cleanly first? And, I'd ideally like to keep my current VM configurations. Searching for an XML file for a particular domain, I see 2 versions:

# find / -name 07x2.xml
/usr/local/var/run/libvirt/qemu/07x2.xml
/usr/local/etc/libvirt/qemu/07x2.xml

I'm not sure why there are 2, but I guess I could just virsh dumpxml before removing anything.

3
  • 1
    Well, the correct way is to build it into a Debian package so you can manage it and don't have a bunch of stuff lying around your filesystem to cause conflicts later. Aug 20, 2020 at 16:46
  • Well, I guess that would address how to install it properly. But what about unpicking the current local installation from make install? Is that just something to do by hand? Any way to get a definitive list of exactly what got installed where?
    – dsl101
    Aug 21, 2020 at 16:05
  • Not really. That's why we don't do that. Aug 21, 2020 at 16:10

1 Answer 1

0

As of August 2020, qemu 5 is in Debian Unstable and will be in (note future tense) Ubuntu 20.10.

Consider adopting these distro versions where you need qemu. Reproducible builds are an advantage: put things where you expect, and do not conflict with software installed external to apt. Realize this does not have long term support, more frequent upgrades increases your maintenance.

If you are not changing your OS, consider backporting the proposed package to what you are running, and rebuild. Your own Launchpad PPA repo or similar enables package management of custom builds.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .