Xen Hypervisor VM CPU Initialization Failure

On some Xen-based virtualization platforms, such as Oracle VM 3.4, only the first CPU is initialized when the guest VM is started. VM boot is slow, the remaining configured CPUs fail to report an alive state, and the following errors might appear in the VM dmesg output:

...
[   10.190039] CPU1 failed to report alive state
[   20.192038] CPU2 failed to report alive state
...

The issue is related to a problem in the Xen hypervisor's x2apic emulation. The incorrect APIC ID is returned.

To work around the issue, add the nox2apic parameter to the kernel command line and reboot.

  1. In the VM, edit /etc/default/grub to add the nox2apic parameter to the GRUB_CMDLINE_LINUX entry:

    GRUB_CMDLINE_LINUX="...... nox2apic"
  2. Regenerate the /boot/grub2/grub.cfg file:

    sudo grub2-mkconfig -o /boot/grub2/grub.cfg --update-bls-cmdline
  3. Reboot the virtual machine

(Bug 38006792)