Bug 261083

Summary: Accidently reboot VMs after OS Upgrade 12.2 to 13.0
Product: Base System Reporter: Arkadiy Yaruta <yaruta.arkadiy>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: grahamperrin, shuriku, yaruta.arkadiy
Priority: ---    
Version: 13.0-STABLE   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
pciconf -lv
none
var-log-messages
none
Clusters errors
none
dmesg none

Description Arkadiy Yaruta 2022-01-10 11:15:28 UTC
Hi

After upgrade OS from 12.2 to 13.0 servers starts accidentally reboot.

uname -a
FreeBSD 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-p4 #0: Tue Aug 24 07:33:27 UTC 2021     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

freebsd-version
13.0-RELEASE-p5

last
boot time                                  Mon Jan 10 12:48
boot time                                  Mon Jan 10 11:34
boot time                                  Mon Jan 10 09:40
boot time                                  Mon Jan 10 08:51

less /etc/fstab
# Device        Mountpoint      FStype  Options Dump    Pass#
#/dev/ada0p2    /               ufs     rw      1       1
#/dev/ada0p3    none            swap    sw      0       0
/dev/gptid/b27e8a97-6e76-11e4-b223-00155d536650     /               ufs     rw      1       1
/dev/gptid/b2800231-6e76-11e4-b223-00155d536650     none            swap    sw      0       0

less /var/log/messages
Jan 10 11:34:28  kernel: intsmb0 attach returned 6
Jan 10 11:34:28  kernel: lo0: link state changed to UP
Jan 10 12:48:35  syslog-ng[995]: syslog-ng starting up; version='3.35.1'
Jan 10 12:48:35  kernel:
Jan 10 12:48:35  kernel: (c) 1992-2021 The FreeBSD Project.
Jan 10 12:48:35  kernel: (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
Jan 10 12:48:35  kernel: Regents of the University of California. All rights reserved.
Jan 10 12:48:35  kernel: is a registered trademark of The FreeBSD Foundation.
Jan 10 12:48:35  kernel: 13.0-RELEASE-p4 #0: Tue Aug 24 07:33:27 UTC 2021
Jan 10 12:48:35  kernel: /usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

Virtual machines running on Hyper-V (2012R2 an 2019 Server). Reboot occurs on any Hyper-V hosts.
VMs (Gen1) has 1-4 vCPU and 1Gb-7Gb RAM.

Could you recommend the next steps to troubleshoot and resolve the problem?

Thank you.
Comment 1 Arkadiy Yaruta 2022-01-10 12:26:04 UTC
Update:

I figure out that happens on clustered VMs (Microsoft Fileover cluster 2012R2 and 2019).

Should I install addition components on FreeBSD VMs for supporting clustering  or something else?
Comment 2 Arkadiy Yaruta 2022-01-10 12:51:43 UTC
Created attachment 230870 [details]
pciconf -lv

pciconf -lv
Comment 3 Oleksandr Kryvulia 2022-01-10 13:29:10 UTC
Please attach full /var/log/messages as well. Does reboots occurs on vm migrations or not? What do you see in hyper-v console or logs related to your vm while rebooting?
Comment 4 Arkadiy Yaruta 2022-01-10 15:07:21 UTC
Created attachment 230878 [details]
var-log-messages
Comment 5 Arkadiy Yaruta 2022-01-10 15:08:01 UTC
Created attachment 230879 [details]
Clusters errors
Comment 6 Arkadiy Yaruta 2022-01-10 15:24:40 UTC
Reboot occurred without VM migration.
I took all servers out of clusters. Clusters errors and reboots stopped.

I added 1 VM (SRV5) to the 2012R2 cluster again and reboot it (dmesg is attached). Live migration works fine. 
I'll watch the server for a few days.
Comment 7 Arkadiy Yaruta 2022-01-10 15:25:12 UTC
Created attachment 230881 [details]
dmesg
Comment 8 Oleksandr Kryvulia 2022-01-11 07:11:16 UTC
Nothing unusual in dmesg. IMO it is related to Failover Cluster Service and not to FreeBSD guest. We have some 12.3-13.0 VMs running in Hyper-V cluster and no special settings were made for them, but we prefer to run Gen2 VMs.
Comment 9 Arkadiy Yaruta 2022-01-23 19:38:51 UTC
We have found some network issues in our Windows cluster. As a result, the cluster was unstable, and the virtual machines rebooted periodically. Based on this, I'm pretty sure that the problem is not related to the version of the FreeBSD OS.

Thanks for your help and answers!