Closed dupremathieu closed 9 months ago
Description Some libvirtd hardening rules block libvirt to do memory locking and configure the PCI passthrough.
Step to reproduce Steps to reproduce the behavior:
Expected behavior The VM should be run without error.
Example If applicable, add screenshots to help explain your problem.
sudo virsh start --console myVM error: Failed to start domain 'myVM' error: internal error: qemu unexpectedly closed the monitor: 2024-02-07T09:02:08.234524Z qemu-system-x86_64: -device vfio-pci,host=0000:07:00.0,id=hostdev0,bus=pci.2,addr=0x0: VFIO_MAP_DMA failed: Cannot allocate memory 2024-02-07T09:02:08.235671Z qemu-system-x86_64: -device vfio-pci,host=0000:07:00.0,id=hostdev0,bus=pci.2,addr=0x0: VFIO_MAP_DMA failed: Cannot allocate memory 2024-02-07T09:02:08.235790Z qemu-system-x86_64: -device vfio-pci,host=0000:07:00.0,id=hostdev0,bus=pci.2,addr=0x0: vfio 0000:07:00.0: failed to setup container for group 49: memory listener initialization failed: Region pc.ram: vfio_dma_map(0x648f08f946c0, 0x0, 0x80000000, 0x715dc0000000) = -12 (Cannot allocate memory)
Workaround Without hardening rules in libvirtd service, the VM can be started.
Description Some libvirtd hardening rules block libvirt to do memory locking and configure the PCI passthrough.
Step to reproduce Steps to reproduce the behavior:
Expected behavior The VM should be run without error.
Example If applicable, add screenshots to help explain your problem.
Workaround Without hardening rules in libvirtd service, the VM can be started.