Most of the error reporting the QEMU daemon is focused on sending errors
wrt to RPC ops to the client. There is no provision currently for getting
info about the QEMU vm itself when problems occur. The most common problem
is some mis-configurable in the XML causes qemu to fail to start up. This
results in the completely accurate & completely useless (mea-culpa) error
message
libvirt.libvirtError: virDomainCreateLinux() failed internal error
End-of-file while reading PTY startup output'
What this means is that qemu crashed/exited at startup. Now this patch
does not (yet) directly address that stupid error message, but what it
does do is provide a way to diagnose the real problem.
For every VM we start it will create a logfile
/etc/libvirt/qemu/logs/[vmname].log
Or
$HOME/.libvirt/qemu/logs/[vmname].log
And all output from QEMU's stderr/stdout will get written to this file.
So
# virsh --connect qemu:///system start wizz
libvir: QEMU error : internal error End-of-file while reading PTY startup output
error: Failed to start domain wizz
# cat /etc/libvirt/qemu/logs/wizz.log
qemu: could not open hard disk image
'/home/berrange/src/xen/virtinst--devel/demo'
Next up I'm going to work on
a) Improving the error message
b) Adding validation that disk images actually exist before
launching QEMU since that's the most common error we're seeing
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules:
http://search.cpan.org/~danberr/ -=|
|=- Projects:
http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|