ERROR Libvir-lxc "error: Domain not found: no domain with matching name 'exfw'"

ADDED

I am very sorry. Please Never mind.
I had an error, but I do not have any disk resource to show you.
It must be on encrypted root files system to get error, but this error is my easy mistake…
I am sorry…

END

Hi

I got in trouble with libvirt-lxc.

I create a container under

> uname -r
4.12.14-lp150.12.25-default

The kernel is installed from leap 15 installation image without any updates.
It’s fine.

However, I only updated the kernel with 4.12.14-lp150.12.28.1
I got an error

> virsh shutdown exfw
error: failed to get domain 'exfw'
error: Domain not found: no domain with matching name 'exfw'

mgr@linux-o7l9:~> sudo systemctl status libvirtd
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2018-12-15 20:34:42 GMT; 15min ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 1458 (libvirtd)
    Tasks: 22 (limit: 32768)
   CGroup: /system.slice/libvirtd.service
           ├─1458 /usr/sbin/libvirtd --listen
           ├─3140 /usr/lib64/libvirt/libvirt_lxc --name exfw --console 20 --security=apparmor --handshake 23 --veth vnet1 --veth vnet3
           ├─3873 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/vnet02.conf --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper
           └─3923 /usr/lib64/libvirt/libvirt_lxc --name infw --console 20 --security=apparmor --handshake 26 --veth vnet3 --veth vnet5 --veth vnet7 --veth vnet9 --veth vnet11 --veth vnet13


Dec 15 20:38:17 linux-o7l9 libvirtd[1458]: 2018-12-15 20:38:17.769+0000: 1489: error : virDBusCall:1570 : error from service: GetMachineByPID: PID 3140 does not belong to any known machine
Dec 15 20:38:17 linux-o7l9 libvirtd[1458]: 2018-12-15 20:38:17.770+0000: 1489: warning : virDomainAuditHostdev:468 : Unexpected hostdev type while encoding audit message: 2
Dec 15 20:38:32 linux-o7l9 dnsmasq[3873]: started, version 2.78 cachesize 2000
Dec 15 20:38:32 linux-o7l9 dnsmasq[3873]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
Dec 15 20:38:32 linux-o7l9 dnsmasq[3873]: reading /etc/resolv.conf
Dec 15 20:38:32 linux-o7l9 dnsmasq[3873]: using nameserver 192.168.0.1#53
Dec 15 20:38:32 linux-o7l9 dnsmasq[3873]: read /etc/hosts - 8 addresses
Dec 15 20:38:32 linux-o7l9 dnsmasq[3873]: read /var/lib/libvirt/dnsmasq/vnet02.addnhosts - 0 addresses
Dec 15 20:38:47 linux-o7l9 libvirtd[1458]: 2018-12-15 20:38:47.053+0000: 1488: error : virDBusCall:1570 : error from service: GetMachineByPID: PID 3923 does not belong to any known machine
Dec 15 20:38:47 linux-o7l9 libvirtd[1458]: 2018-12-15 20:38:47.054+0000: 1488: warning : virDomainAuditHostdev:468 : Unexpected hostdev type while encoding audit message: 2
>

I also updated everything including libvirt, but it does not solve.

Then I installed kernel-vanilla-4.12.14-lp150.12.28.1.nosrc.
It’s solved.

Have the kernel settings had changed from 4.12.14-lp150.12.25-default to 4.12.14-lp150.12.28-default?

Do you have any idea?

Thanks,
Yuichi

Many times “domain name” = “machine name” so in this case is the LXC container name.
Somehow your container has been unregistered, so then no management functions can be applied against it.

Did you do something to cause unregistration to happen?
Or, could some kind of corruption have happened?

Although IMO any kind of deregistration is unlikely to be caused by a kernel update, I’d still consider it bad practice to do any kind of system updating while containers are running. You should power down (or in this case stop) all running containers before doing any system updates. I’m not aware of any such “Best Practice” recommendations, but would be based purely on my general experience.

TSU