Description of problem:
bug 1328898 comment 19 is a good example of unhelpful error reporting by virt-manager - instead of providing full error by libvirt when starting domain, virt-manager truncates this useful output and print irrelevant python trackebacks instead. A good reproducer for this can be attempt to start domain with nfs-backed disk with virt_use_nfs SELinux boolean set to off.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. make VM unstartable, e.g. by using file on nfs to back it's disk and set 'virt_use_nfs' SELinux boolean to off
2. start domain in virt-manager
virt-manager produces unintelligible python traceback (for people not familiar with virt-manager/python/qemu stack)
virt-manager says that VM failed to start because of error in uderlying layers and it should print at least the same error as 'virsh start $DOMAIN' would
Virt-manager prints exactly what it receive from libvirt, we don't truncate anything. There is only a bug in libvirt, in case that qemu fails without any error we will print qemu command line instead of same sane error message.
So after some testing I've found out that we for a long time doesn't print command line to user if qemu fails without any error.
If there is no error we prints only the libvirt part without any explanation:
"error: internal error: process exited while connecting to monitor:"
The only fix that should improve the error message is in this case to print some generic error explaining what happened.
Author: Pavel Hrdina <email@example.com>
Date: Wed Jun 8 12:03:38 2016 +0200
qemu_process: don't print empty line if qemu exits without any error
verify the bug
1.prepare a guest with nfs disk
2.set virt_use_nfs as off
[root@localhost ~]# setsebool virt_use_nfs off
3.start the guest
[root@localhost ~]# virsh start bios
error: Failed to start domain bios
error: internal error: qemu unexpectedly closed the monitor: 2016-07-18T07:45:34.842844Z qemu-kvm: -drive file=/opt/test/admin.qcow2,format=qcow2,if=none,id=drive-ide0-0-0: Could not open '/opt/test/admin.qcow2': Permission denied
4.use virt-manager to start the guest
the error info is the same as step 3
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.