Insufficient Permission to Start a VM
Symptom
The VM fails to be started, and the following information is displayed:
1 2 |
error: Failed to start domain VM1 error: internal error: qemu unexpectedly closed the monitor: 2020-08-31T04:11:16.783295Z qemu-kvm: -chardev socket,id=charnetO,path=/var/run/openvswitch/tap1,server: Failed to bind socket to /var/run/openvswitch/tap1: Permission denied |

Key Process and Cause Analysis
- The SELinux system prevents the VM from creating the /var/run/openvswitch/tap1 file.
- The QEMU process permission is insufficient.
Conclusion and Solution
- In the QEMU configuration file /etc/libvirt/qemu.conf, ensure that the QEMU process user has adequate permissions on the /var/run/openvswitch directory. The following shows the line numbers of the default configuration file:

Restart libvirtd after the modification.
systemctl restart libvirtd
- Ensure that SELinux does not block processes.
- Disable SELinux.
setenforce 0
- Start the VM.
virsh start VM1
The VM is started successfully, and the fault is rectified.

- Disable SELinux.
Parent topic: Troubleshooting