Permission denied when using pty type serial device with stdio_handler = "file"
Issue
-
Below error occurs during start VM when using pty type serial device with
stdio_handler = "file"
-
Confirm qemu.conf whether stdio_handler is setting to file
# cat /etc/libvirt/qemu.conf ... stdio_handler = 'file'
-
Check if pty serial type is in use
#virsh dumpxml <vm> ... <serial type='pty'> <log file='/var/lib/libvirt/console.log1'/>
-
Check owership of /var/lib/libvirt/console.log1 is root:root
-
Start Virtual Machine
# virsh start <vm> internal error: qemu unexpectedly closed the monitor: qemu-kvm -chardev pty,id=charserial0,logfile=/var/lib/libvirt/<vm>/console.log: Unable to open logfile var/lib/libvirt/<vm>/console.log Permission Denied.
-
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8.0-8.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.