how to get domain name into the logs - ?

Hi guys. I have libvirt/qemu setup with pretty vanilla settings and my logs, a snippet, look like this: ... migration successfully aborted internal error: qemu unexpectedly closed the monitor: 2023-05-08T07:56:37.785886Z qemu-kvm: Failed to load virtio_pci/modern_queue_state:desc 2023-05-08T07:56:37.786024Z qemu-kvm: Failed to load virtio_pci/modern_state:vqs 2023-05-08T07:56:37.786029Z qemu-kvm: Failed to load virtio/extra_state:extra_state 2023-05-08T07:56:37.786033Z qemu-kvm: Failed to load virtio-rng:virtio 2023-05-08T07:56:37.786036Z qemu-kvm: error while loading state for instance 0x0 of device '0000:00:02.5:00.0/virtio-rng' 2023-05-08T07:56:37.786279Z qemu-kvm: load of migration failed: Input/output error Would you know how to make libvirt/qemu to get domains/guests names into the logs? (ideally without going into debug/similar level) many thanks, L.

On Mon, May 08, 2023 at 10:02:17 +0200, lejeczek wrote:
Hi guys.
I have libvirt/qemu setup with pretty vanilla settings and my logs, a snippet, look like this:
... migration successfully aborted internal error: qemu unexpectedly closed the monitor: 2023-05-08T07:56:37.785886Z qemu-kvm: Failed to load virtio_pci/modern_queue_state:desc 2023-05-08T07:56:37.786024Z qemu-kvm: Failed to load virtio_pci/modern_state:vqs 2023-05-08T07:56:37.786029Z qemu-kvm: Failed to load virtio/extra_state:extra_state 2023-05-08T07:56:37.786033Z qemu-kvm: Failed to load virtio-rng:virtio 2023-05-08T07:56:37.786036Z qemu-kvm: error while loading state for instance 0x0 of device '0000:00:02.5:00.0/virtio-rng' 2023-05-08T07:56:37.786279Z qemu-kvm: load of migration failed: Input/output error
Would you know how to make libvirt/qemu to get domains/guests names into the logs? (ideally without going into debug/similar level)
The above snippet looks like it's from the VM log file (/var/log/libvirt/qemu/*.log). The VM name is the name of the file.

On 5/8/23 11:02, lejeczek wrote:
Hi guys.
I have libvirt/qemu setup with pretty vanilla settings and my logs, a snippet, look like this:
... migration successfully aborted internal error: qemu unexpectedly closed the monitor:
This ^^^ is error message produced by libvirt and as such it could include domain name (I'll post a patch soon), but ...
2023-05-08T07:56:37.785886Z qemu-kvm: Failed to load virtio_pci/modern_queue_state:desc 2023-05-08T07:56:37.786024Z qemu-kvm: Failed to load virtio_pci/modern_state:vqs 2023-05-08T07:56:37.786029Z qemu-kvm: Failed to load virtio/extra_state:extra_state 2023-05-08T07:56:37.786033Z qemu-kvm: Failed to load virtio-rng:virtio 2023-05-08T07:56:37.786036Z qemu-kvm: error while loading state for instance 0x0 of device '0000:00:02.5:00.0/virtio-rng' 2023-05-08T07:56:37.786279Z qemu-kvm: load of migration failed: Input/output error
... these come from QEMU itself. And for that we would need to patch QEMU. I mean, libvirt passes: -name guest=${VM_NAME} onto the cmd line, so it should be possible. But I guess specifying the name in the first line is good enough, isn't it? Michal

On 09/05/2023 09:47, Michal Prívozník wrote:
On 5/8/23 11:02, lejeczek wrote:
Hi guys.
I have libvirt/qemu setup with pretty vanilla settings and my logs, a snippet, look like this:
... migration successfully aborted internal error: qemu unexpectedly closed the monitor: This ^^^ is error message produced by libvirt and as such it could include domain name (I'll post a patch soon), but ... Yes, in my case specifically it's virtqemud's logs.
2023-05-08T07:56:37.785886Z qemu-kvm: Failed to load virtio_pci/modern_queue_state:desc 2023-05-08T07:56:37.786024Z qemu-kvm: Failed to load virtio_pci/modern_state:vqs 2023-05-08T07:56:37.786029Z qemu-kvm: Failed to load virtio/extra_state:extra_state 2023-05-08T07:56:37.786033Z qemu-kvm: Failed to load virtio-rng:virtio 2023-05-08T07:56:37.786036Z qemu-kvm: error while loading state for instance 0x0 of device '0000:00:02.5:00.0/virtio-rng' 2023-05-08T07:56:37.786279Z qemu-kvm: load of migration failed: Input/output error ... these come from QEMU itself. And for that we would need to patch QEMU. I mean, libvirt passes:
-name guest=${VM_NAME}
onto the cmd line, so it should be possible. But I guess specifying the name in the first line is good enough, isn't it?
Michal
Every operation logged on VM, tagged with its name would be ideal - if that's what you meant - but if it's just a line, one line with VM denoting some group/section of subsequent operations until next VM comes in play, that will be better than how it's now, with VMs names absent. thanks, L.
participants (3)
-
lejeczek
-
Michal Prívozník
-
Peter Krempa