Thank you for your answer.
The version of libvirt I’m using:
$ virsh --version
8.0.0
$ libvirtd --version
libvirtd (libvirt) 8.0.0
$ virsh --version
8.0.0
Example of a test with VM and libvirt logs:
//Begin - example
18:40 - Pressing the Resume button in the VM
18:41 - checking the VM log:
Mon Sep 4 16:50:21 2023 [Z0][VM][I]: New LCM state is LCM_INIT
Mon Sep 4 18:41:04 2023 [Z0][VM][I]: New state is ACTIVE
Mon Sep 4 18:41:04 2023 [Z0][VM][I]: New LCM state is BOOT_POWEROFF
Mon Sep 4 18:41:04 2023 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/3/deployment.83
Mon Sep 4 18:41:05 2023 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Mon Sep 4 18:41:05 2023 [Z0][VMM][I]: ExitCode: 0
Mon Sep 4 18:41:05 2023 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Mon Sep 4 18:41:05 2023 [Z0][VMM][I]: ExitCode: 0
Mon Sep 4 18:41:05 2023 [Z0][VMM][I]: Successfully execute virtualization driver operation: /bin/mkdir -p.
Mon Sep 4 18:41:05 2023 [Z0][VMM][I]: ExitCode: 0
Mon Sep 4 18:41:05 2023 [Z0][VMM][I]: Successfully execute virtualization driver operation: /bin/cat - >/var/lib/one//datastores/0/3/vm.xml.
Mon Sep 4 18:41:05 2023 [Z0][VMM][I]: ExitCode: 0
Mon Sep 4 18:41:06 2023 [Z0][VMM][I]: Successfully execute virtualization driver operation: /bin/cat - >/var/lib/one//datastores/0/3/ds.xml.
Mon Sep 4 18:41:07 2023 [Z0][LCM][I]: VM reported RUNNING by the drivers
Mon Sep 4 18:41:07 2023 [Z0][VM][I]: New LCM state is RUNNING
Mon Sep 4 18:41:08 2023 [Z0][VMM][I]: ExitCode: 0
Mon Sep 4 18:41:08 2023 [Z0][VMM][I]: Successfully execute virtualization driver operation: deploy.
Mon Sep 4 18:41:08 2023 [Z0][VMM][I]: ExitCode: 0
Mon Sep 4 18:41:08 2023 [Z0][VMM][I]: Successfully execute network driver operation: post.
18:43 - check log /var/log/libvirt/qemu/ :
last line:
2023-09-04T16:41:07.366117Z qemu-kvm-one: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
18:47 - VM status - “Running”. Network in the VM is working, i can ping and log in to the VM.
18:47 - PC reboot:
sudo reboot
18:52 - login to the system
VM check :
- VM status - “Running”. Network in VM does not work. Can’t login to the VM.
20:01 - checking the VM log:
Mon Sep 4 18:41:08 2023 [Z0][VMM][I]: Successfully execute network driver operation: post.
Mon Sep 4 18:53:29 2023 [Z0][LCM][I]: VM running but monitor state is POWEROFF
Mon Sep 4 18:53:29 2023 [Z0][VM][I]: New LCM state is SHUTDOWN_POWEROFF
Mon Sep 4 18:53:29 2023 [Z0][VM][I]: New state is POWEROFF
Mon Sep 4 18:53:29 2023 [Z0][VM][I]: New LCM state is LCM_INIT
20:02 - check log /var/log/libvirt/qemu/ :
2023-09-04T16:41:07.366117Z qemu-kvm-one: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
2023-09-04T16:48:01.817773Z qemu-kvm-one: terminating on signal 15 from pid 798 (/usr/sbin/libvirtd)
2023-09-04 16:48:02.134+0000: shutting down, reason=shutdown
20:07 - check the libvirt log:
$ grep libvirt /var/log/syslog
Sep 4 16:46:43 fil-Lenovo dnsmasq-dhcp[989]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Sep 4 18:41:06 fil-Lenovo kernel: [ 6874.419215] audit: type=1400 audit(1693845666.308:73): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libvirt-3dae2b1d-3095-4323-b396-32205b54614f" pid=41958 comm="apparmor_parser"
Sep 4 18:41:06 fil-Lenovo kernel: [ 6874.604447] audit: type=1400 audit(1693845666.492:74): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-3dae2b1d-3095-4323-b396-32205b54614f" pid=41961 comm="apparmor_parser"
Sep 4 18:41:06 fil-Lenovo kernel: [ 6874.785249] audit: type=1400 audit(1693845666.672:75): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-3dae2b1d-3095-4323-b396-32205b54614f" pid=41965 comm="apparmor_parser"
Sep 4 18:41:06 fil-Lenovo kernel: [ 6874.969536] audit: type=1400 audit(1693845666.856:76): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="libvirt-3dae2b1d-3095-4323-b396-32205b54614f" pid=41970 comm="apparmor_parser"
Sep 4 18:41:07 fil-Lenovo kernel: [ 6875.204521] audit: type=1400 audit(1693845667.092:77): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-3dae2b1d-3095-4323-b396-32205b54614f" pid=41983 comm="apparmor_parser"
Sep 4 18:49:51 fil-Lenovo systemd[1]: Starting Suspend/Resume Running libvirt Guests...
Sep 4 18:49:51 fil-Lenovo libvirt-guests.sh[875]: libvirt-guests is configured not to start any guests on boot
Sep 4 18:49:51 fil-Lenovo systemd[1]: Finished Suspend/Resume Running libvirt Guests.
Sep 4 18:49:51 fil-Lenovo dnsmasq[986]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Sep 4 18:49:51 fil-Lenovo dnsmasq-dhcp[986]: read /var/lib/libvirt/dnsmasq/default.hostsfile
VM status is “POWEROFF”
//End - example