Juniper vMX Error: Unsupported machine type

When attempting to install a Juniper vMX router (release 18.3R1-S1.4) on a newly installed Centos 7.2 host I got the following error:

error: Failed to start domain vcp-vmx1
error: internal error: process exited while connecting to monitor:
(process:145502): GLib-WARNING **: 16:39:43.111: gmem.c:489: custom memory allocation vtable not supported
qemu-system-x86_64: -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off,dump-guest-core=off: Unsupported machine type
Use -machine help to list supported machines!

When I checked the supported machine types with /usr/libexec/qemu-kvm -machine help everything looked fine, pc-i440fx-rhel7.0.0 was listed as the default:

[root@vmxhost ~]# /usr/libexec/qemu-kvm  -machine help
Supported machines are:
none                 empty machine
pc                   RHEL 7.0.0 PC (i440FX + PIIX, 1996) (alias of pc-i440fx-rhel7.0.0)
pc-i440fx-rhel7.0.0  RHEL 7.0.0 PC (i440FX + PIIX, 1996) (default)
rhel6.6.0            RHEL 6.6.0 PC
rhel6.5.0            RHEL 6.5.0 PC
rhel6.4.0            RHEL 6.4.0 PC
rhel6.3.0            RHEL 6.3.0 PC
rhel6.2.0            RHEL 6.2.0 PC
rhel6.1.0            RHEL 6.1.0 PC
rhel6.0.0            RHEL 6.0.0 PC

The error gmem.c:489: custom memory allocation vtable not supported was also new to me, I had not come across that on any of my vMX installs.

One of the steps in the vMX deploy guide for CentOS is to create a sym link for the qemu-system-x86_64 binary (step 8 on this page):

ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64

I realised that the /usr/bin/qemu-system-x86_64 binary already existed so the link did not get created.

To fix it, move the file out of the way and create a new sym link:

mv /usr/bin/qemu-system-x86_64 /usr/bin/qemu-system-x86_64.backup
ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64