Hello Michael,

Michael Tokarev [2020-05-26 12:10 +0300]:
> > | $ admin@debian:~$ qemu-system-x86_64 -nographic
> > | Could not allocate dynamic translator buffer
> 
> This is something.. wrong.

Heh, yes -- it also doesn't have much Google juice; there are some existing
bugzilla.redhat.com reports from 2011, but that doesn't seem relevant any more.

> This happens during early init state, before qemu tries to run
> any guest code, before even initializing virtual CPUs.
> 
> By default the command above definitely works just fine here.
> Do you have some init/conf file which is read by qemu at
> startup, something in /etc/qemu/qemu.conf maybe?

No, we don't do any config file customization. This is essentially a
dist-upgraded buster cloud image with installing some packages:
https://github.com/cockpit-project/bots/blob/master/images/scripts/debian.setup

However, the difference may be that I tested this already within a VM, i. e.
the command above would use nested virtualization (although not nested virt --
but curiously it *does* succeed with -enable-kvm, i. e. nested KVM works fine).

I reproduced this directly on a minimal VM:

   curl -O 
https://cloud.debian.org/images/cloud/bullseye/daily/20200526-275/debian-11-nocloud-amd64-daily-20200526-275.qcow2
   qemu-system-x86_64 -enable-kvm -nographic -m 1024 -drive 
file=debian-11-nocloud-amd64-daily-20200526-275.qcow2,if=virtio -snapshot -net 
nic,model=virtio -net user,hostfwd=tcp::22000-:22

then log in as root (no password):

    # apt update && apt install -y --no-install-recommends qemu-system-x86

(skipping recomends as otherwise it pulls in half of a desktop)

    # qemu-system-x86_64 -nographic
    Could not allocate dynamic translator buffer

This seems to be related to memory -- if I launch the (outside) VM with `-m 
2048`, it works.
Our default VMs in CI have 1 GiB RAM, which may explain why you don't see this
on real iron.

The memory of the inner VM doesn't seem to matter:

# free -h
              total        used        free      shared  buff/cache   available
Mem:          985Mi        53Mi       537Mi       0.0Ki       394Mi       792Mi

# qemu-system-x86_64 -nographic -m 256
Could not allocate dynamic translator buffer

> > libvirt version did not change (6.0.0-6), but QEMU updated from 4.2 to 5.0.
> > I'll send a bug against libvirt, [...]
> 
> I don't think this has anything to do with libvirt. As long
> as qemu fails at startup libvirt obviously can't run it
> properly.

Right, but I was thinking that maybe QEMU 5.0 has some deliberate change and
libvirt now needs to call its detection scripts with -enable-kvm or so -- just
pure speculation, and mentioning how I got here.

Thanks,

Martin

Reply via email to