I haven't seen this on my system (focal running with the newer virt
stack of https://launchpad.net/~canonical-server/+archive/ubuntu/server-
backports) nor on pure-focal (spawned that and did a test). It looks
pretty much like what Paride reported:

a) guests are listed in machined
but they are
b) not affected by it's stop/start/restart

We really need to find what is different on your installation that make 
systemd-machined think it is authoritative to kill those guests - any idea?
Since mine is a plain Focal VM hosting further VMs the question is if you'd 
know which config steps to take to make it expose the reported behavior?


Here a console log of that on Focal:

ubuntu@f-machined:~$ virsh list; machinectl list; systemctl status 
systemd-machined; uvt-kvm ssh testguest uptime; sudo systemctl restart 
systemd-machined; sleep 5; virsh list; machinectl list; systemctl status 
systemd-machined; uvt-kvm ssh testguest uptime; sudo systemctl stop 
systemd-machined; sleep 5; virsh list; machinectl list; systemctl status 
systemd-machined; uvt-kvm ssh testguest uptime; sudo systemctl start 
systemd-machined; virsh list; machinectl list; systemctl status 
systemd-machined; uvt-kvm ssh testguest uptime
 Id   Name        State
---------------------------
 2    testguest   running

MACHINE          CLASS SERVICE      OS VERSION ADDRESSES
qemu-2-testguest vm    libvirt-qemu -  -       -        

1 machines listed.
● systemd-machined.service - Virtual Machine and Container Registration Service
     Loaded: loaded (/lib/systemd/system/systemd-machined.service; static; 
vendor preset: enabled)
     Active: active (running) since Mon 2021-08-23 06:25:09 UTC; 4min 59s ago
       Docs: man:systemd-machined.service(8)
             https://www.freedesktop.org/wiki/Software/systemd/machined
   Main PID: 6152 (systemd-machine)
     Status: "Processing requests..."
      Tasks: 1 (limit: 4682)
     Memory: 1.2M
     CGroup: /system.slice/systemd-machined.service
             └─6152 /lib/systemd/systemd-machined

Aug 23 06:25:09 f-machined systemd[1]: Starting Virtual Machine and Container 
Registration Service...
Aug 23 06:25:09 f-machined systemd[1]: Started Virtual Machine and Container 
Registration Service.
Aug 23 06:26:11 f-machined systemd-machined[6152]: New machine qemu-1-testguest.
Aug 23 06:26:17 f-machined systemd-machined[6152]: Machine qemu-1-testguest 
terminated.
Aug 23 06:26:25 f-machined systemd-machined[6152]: New machine qemu-2-testguest.
 06:30:11 up 3 min,  0 users,  load average: 0.07, 0.17, 0.08
 Id   Name        State
---------------------------
 2    testguest   running

MACHINE          CLASS SERVICE      OS VERSION ADDRESSES
qemu-2-testguest vm    libvirt-qemu -  -       -        

1 machines listed.
● systemd-machined.service - Virtual Machine and Container Registration Service
     Loaded: loaded (/lib/systemd/system/systemd-machined.service; static; 
vendor preset: enabled)
     Active: active (running) since Mon 2021-08-23 06:30:11 UTC; 5s ago
       Docs: man:systemd-machined.service(8)
             https://www.freedesktop.org/wiki/Software/systemd/machined
   Main PID: 7708 (systemd-machine)
     Status: "Processing requests..."
      Tasks: 1 (limit: 4682)
     Memory: 1.0M
     CGroup: /system.slice/systemd-machined.service
             └─7708 /lib/systemd/systemd-machined

Aug 23 06:30:11 f-machined systemd[1]: Starting Virtual Machine and Container 
Registration Service...
Aug 23 06:30:11 f-machined systemd[1]: Started Virtual Machine and Container 
Registration Service.
Aug 23 06:30:11 f-machined systemd-machined[7708]: New machine qemu-2-testguest.
 06:30:18 up 3 min,  0 users,  load average: 0.06, 0.17, 0.08
 Id   Name        State
---------------------------
 2    testguest   running

MACHINE          CLASS SERVICE      OS VERSION ADDRESSES
qemu-2-testguest vm    libvirt-qemu -  -       -        

1 machines listed.
● systemd-machined.service - Virtual Machine and Container Registration Service
     Loaded: loaded (/lib/systemd/system/systemd-machined.service; static; 
vendor preset: enabled)
     Active: active (running) since Mon 2021-08-23 06:30:23 UTC; 13ms ago
       Docs: man:systemd-machined.service(8)
             https://www.freedesktop.org/wiki/Software/systemd/machined
   Main PID: 7759 (systemd-machine)
     Status: "Processing requests..."
      Tasks: 1 (limit: 4682)
     Memory: 1.1M
     CGroup: /system.slice/systemd-machined.service
             └─7759 /lib/systemd/systemd-machined

Aug 23 06:30:23 f-machined systemd[1]: Starting Virtual Machine and Container 
Registration Service...
Aug 23 06:30:23 f-machined systemd[1]: Started Virtual Machine and Container 
Registration Service.
Aug 23 06:30:23 f-machined systemd-machined[7759]: New machine qemu-2-testguest.
 06:30:24 up 3 min,  0 users,  load average: 0.13, 0.18, 0.09
 Id   Name        State
---------------------------
 2    testguest   running

MACHINE          CLASS SERVICE      OS VERSION ADDRESSES
qemu-2-testguest vm    libvirt-qemu -  -       -        

1 machines listed.
● systemd-machined.service - Virtual Machine and Container Registration Service
     Loaded: loaded (/lib/systemd/system/systemd-machined.service; static; 
vendor preset: enabled)
     Active: active (running) since Mon 2021-08-23 06:30:23 UTC; 1s ago
       Docs: man:systemd-machined.service(8)
             https://www.freedesktop.org/wiki/Software/systemd/machined
   Main PID: 7759 (systemd-machine)
     Status: "Processing requests..."
      Tasks: 1 (limit: 4682)
     Memory: 1.1M
     CGroup: /system.slice/systemd-machined.service
             └─7759 /lib/systemd/systemd-machined

Aug 23 06:30:23 f-machined systemd[1]: Starting Virtual Machine and Container 
Registration Service...
Aug 23 06:30:23 f-machined systemd[1]: Started Virtual Machine and Container 
Registration Service.
Aug 23 06:30:23 f-machined systemd-machined[7759]: New machine qemu-2-testguest.
 06:30:26 up 3 min,  0 users,  load average: 0.13, 0.18, 0.09

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1939577

Title:
  Missing dependency in libvirt-guests.service leads sometimes to killed
  VMs on host shutdown

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1939577/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to