trap2 - loginhost

guest os: FreeBSD / amd64

cpu: 1

memory size 256 MB

storage: file - 5 GB (was: 4 GB)

usage: loginhost / ssh server - replacement for the old trap.

tmux commands: ls - list session, attach - t ,

tmux keys: ctrl-B command key, ctrl-b i information, ctrl-b t time, ctrl-b d detach,

back to virtual machines page.

History

This machine was originally named bhyve_bvm4.

Work log

2024-09-30: vtbd0p3 - reboot, FreeBSD 13.3-release-p7 is in

root@trap2:~ # freebsd-version -ku
13.3-RELEASE-p7
13.3-RELEASE-p7

kernel

root@trap2:~ # uname -a
FreeBSD trap2.kg4.no 13.3-RELEASE-p7 FreeBSD 13.3-RELEASE-p7 GENERIC amd64

2024-09-30: vtbd0p3 - freebsd-update fetch

root@trap2:~ # freebsd-update fetch
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 13.3-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata patches.. done.
Applying metadata patches... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 8 patches..... done.
Applying patches... done.
The following files will be updated as part of updating to
13.3-RELEASE-p7:
/bin/freebsd-version
/boot/kernel/kernel
/boot/kernel/pf.ko
/lib/libnv.so.0
/usr/include/net/pfvar.h
/usr/lib/libnv.a
/usr/lib/libnv_p.a
/usr/sbin/bhyve

install

root@trap2:~ # freebsd-update install
src component not installed, skipped
Installing updates...
Restarting sshd after upgrade
Performing sanity check on sshd configuration.
Stopping sshd.
Performing sanity check on sshd configuration.
Starting sshd.
Scanning //usr/share/certs/blacklisted for certificates...
Scanning //usr/share/certs/trusted for certificates...
 done.

2024-09-16: vtbd0p3 - reboot, FreeBSD 13.3-release-p6 is in

root@trap2:~ # freebsd-version -ku
13.3-RELEASE-p6
13.3-RELEASE-p6

kernel

root@trap2:~ # uname -a
FreeBSD trap2.kg4.no 13.3-RELEASE-p6 FreeBSD 13.3-RELEASE-p6 GENERIC amd64

2024-09-16: vtbd0p3 - freebsd-update fetch

root@trap2:~ # freebsd-update fetch
src component not installed, skipped
[..]
The following files will be updated as part of updating to
13.3-RELEASE-p6:
/bin/freebsd-version
/boot/kernel/cfiscsi.ko
/boot/kernel/cfumass.ko
/boot/kernel/ctl.ko
/boot/kernel/kernel
/lib/libnv.so.0
/usr/bin/calendar
/usr/lib/libnv.a
/usr/lib/libnv_p.a
/usr/sbin/bhyve

install

root@trap2:~ # freebsd-update install
src component not installed, skipped
Installing updates...
Restarting sshd after upgrade
Performing sanity check on sshd configuration.
Stopping sshd.
Waiting for PIDS: 733.
Performing sanity check on sshd configuration.
Starting sshd.
Scanning //usr/share/certs/blacklisted for certificates...
Scanning //usr/share/certs/trusted for certificates...
 done.

2024-08-25: vtbd0p3 - reboot, FreeBSD 13.3-release-p5 is in

root@trap2:~ # freebsd-version -ku
13.3-RELEASE-p5
13.3-RELEASE-p5

kernel

root@trap2:~ # uname -a
FreeBSD trap2.kg4.no 13.3-RELEASE-p5 FreeBSD 13.3-RELEASE-p5 GENERIC amd64

2024-08-25: vtbd0p3 - freebsd-update fetch

root@trap2:~ # freebsd-update fetch
The following files will be updated as part of updating to
13.3-RELEASE-p5:
/bin/freebsd-version
/boot/kernel/kernel
/boot/kernel/nfscl.ko
/boot/kernel/pf.ko
/usr/bin/slogin
/usr/bin/ssh
/usr/libexec/ssh-keysign
/usr/sbin/sshd

install

root@trap2:~ # freebsd-update install
src component not installed, skipped
Installing updates...
Restarting sshd after upgrade
Performing sanity check on sshd configuration.
Stopping sshd.
Waiting for PIDS: 733.
Performing sanity check on sshd configuration.
Starting sshd.
Scanning //usr/share/certs/blacklisted for certificates...
Scanning //usr/share/certs/trusted for certificates...
 done.

2024-07-03: vtbd0p3 - reboot, FreeBSD 13.3-release-p4 is in

root@trap2:~ # freebsd-version -ku
13.3-RELEASE-p3
13.3-RELEASE-p4

kernel

root@trap2:~ # uname -a
FreeBSD trap2.kg4.no 13.3-RELEASE-p3 FreeBSD 13.3-RELEASE-p3 GENERIC amd64

2024-07-03: vtbd0p3 - freebsd-update fetch

root@trap2:~ # freebsd-update fetch
src component not installed, skipped
[..]
The following files will be updated as part of updating to
13.3-RELEASE-p4:
/bin/freebsd-version
/boot/kernel/kernel
/boot/kernel/zfs.ko
/boot/loader.efi
/boot/loader_4th.efi
/boot/loader_lua.efi
/boot/loader_simp.efi
/lib/libzpool.so.2
/rescue/[
/rescue/bectl
/rescue/bsdlabel
/rescue/bunzip2
/rescue/bzcat
/rescue/bzip2
/rescue/camcontrol
/rescue/cat
/rescue/ccdconfig
/rescue/chflags
/rescue/chgrp
/rescue/chio
/rescue/chmod
/rescue/chown
/rescue/chroot
/rescue/clri
/rescue/cp
/rescue/csh
/rescue/date
/rescue/dd
/rescue/devfs
/rescue/df
/rescue/dhclient
/rescue/disklabel
/rescue/dmesg
/rescue/dump
/rescue/dumpfs
/rescue/dumpon
/rescue/echo
/rescue/ed
/rescue/ex
/rescue/expr
/rescue/fastboot
/rescue/fasthalt
/rescue/fdisk
/rescue/fetch
/rescue/fsck
/rescue/fsck_4.2bsd
/rescue/fsck_ffs
/rescue/fsck_msdosfs
/rescue/fsck_ufs
/rescue/fsdb
/rescue/fsirand
/rescue/gbde
/rescue/geom
/rescue/getfacl
/rescue/glabel
/rescue/gpart
/rescue/groups
/rescue/gunzip
/rescue/gzcat
/rescue/gzip
/rescue/halt
/rescue/head
/rescue/hostname
/rescue/id
/rescue/ifconfig
/rescue/init
/rescue/ipf
/rescue/iscsictl
/rescue/iscsid
/rescue/kenv
/rescue/kill
/rescue/kldconfig
/rescue/kldload
/rescue/kldstat
/rescue/kldunload
/rescue/ldconfig
/rescue/less
/rescue/link
/rescue/ln
/rescue/ls
/rescue/lzcat
/rescue/lzma
/rescue/md5
/rescue/mdconfig
/rescue/mdmfs
/rescue/mkdir
/rescue/mknod
/rescue/more
/rescue/mount
/rescue/mount_cd9660
/rescue/mount_msdosfs
/rescue/mount_nfs
/rescue/mount_nullfs
/rescue/mount_udf
/rescue/mount_unionfs
/rescue/mt
/rescue/mv
/rescue/nc
/rescue/newfs
/rescue/newfs_msdos
/rescue/nos-tun
/rescue/pgrep
/rescue/ping
/rescue/ping6
/rescue/pkill
/rescue/poweroff
/rescue/ps
/rescue/pwd
/rescue/rcorder
/rescue/rdump
/rescue/realpath
/rescue/reboot
/rescue/red
/rescue/rescue
/rescue/restore
/rescue/rm
/rescue/rmdir
/rescue/route
/rescue/routed
/rescue/rrestore
/rescue/rtquery
/rescue/rtsol
/rescue/savecore
/rescue/sed
/rescue/setfacl
/rescue/sh
/rescue/shutdown
/rescue/sleep
/rescue/spppcontrol
/rescue/stty
/rescue/swapon
/rescue/sync
/rescue/sysctl
/rescue/tail
/rescue/tar
/rescue/tcsh
/rescue/tee
/rescue/test
/rescue/tunefs
/rescue/umount
/rescue/unlink
/rescue/unlzma
/rescue/unxz
/rescue/unzstd
/rescue/vi
/rescue/whoami
/rescue/xz
/rescue/xzcat
/rescue/zcat
/rescue/zdb
/rescue/zfs
/rescue/zpool
/rescue/zstd
/rescue/zstdcat
/rescue/zstdmt
/usr/bin/slogin
/usr/bin/ssh
/usr/lib/libprivateldns.a
/usr/lib/libprivateldns.so.5
/usr/lib/libprivateldns_p.a
/usr/lib/libprivatessh.a
/usr/lib/libprivatessh.so.5
/usr/lib/libprivatessh_p.a
/usr/lib/libzpool.a
/usr/libexec/ssh-keysign
/usr/sbin/sshd
/usr/sbin/zdb

install

root@trap2:~ # freebsd-update install
src component not installed, skipped
Installing updates...
Restarting sshd after upgrade
Performing sanity check on sshd configuration.
Stopping sshd.
Performing sanity check on sshd configuration.
Starting sshd.
Scanning //usr/share/certs/blacklisted for certificates...
Scanning //usr/share/certs/trusted for certificates...
 done.

and do a reboot next.

2024-07-03: today I cannot ssh to the machine

tingo@kg-core2:~ $ ssh trap
Fssh_kex_exchange_identification: Connection closed by remote host
Connection closed by 10.1.150.33 port 22

and when I connect directly via tmux, I get this

root@kg-vm3# tmux attach -t trap2

kern.ipc.maxpipekva exceeded; see tuning(7)
kern.ipc.maxpipekva exceeded; see tuning(7)
kern.ipc.maxpipekva exceeded; see tuning(7)
kern.ipc.maxpipekva exceeded; see tuning(7)
kern.ipc.maxpipekva exceeded; see tuning(7)
Jul  3 17:13:42 trap2 syslogd: last message repeated 25 times
[..]

endlessly. Let me try to stop it from the host

root@kg-vm3# vm stop trap2
Sending ACPI shutdown to trap2

and a while later

Jul  3 17:29:48 trap2 syslogd: last message repeated 10 times
Jul  3 17:30:13 trap2 syslogd: exiting on signal 15
2024-07-03T17:30:13.597441+02:00 trap2.kg4.no init 1 - - timeout expired for /etc/rc.shutdown: Interrupted system call; going to s
ingle user mode
Waiting (max 60 seconds) for system process `vnlru' to stop... done
Waiting (max 60 seconds) for system process `syncer' to stop... 
Syncing disks, vnodes remaining... 3 0 done
All buffers synced.
Uptime: 32d3h25m12s
acpi0: Powering system off

[trap2] 0:bhyve*                                                                                   "kg-vm3.kg4.no" 17:30 03-Jul-24
[exited]

2024-04-14: vtbd0p3 - reboot, FreeBSD 13.3-release-p1 is in

root@trap2:~ # freebsd-version -ku
13.3-RELEASE-p1
13.3-RELEASE-p1

kernel

root@trap2:~ # uname -a
FreeBSD trap2.kg4.no 13.3-RELEASE-p1 FreeBSD 13.3-RELEASE-p1 GENERIC amd64

2024-04-14: vtbd0p3 - freebsd-update install

root@trap2# freebsd-update install
src component not installed, skipped
Installing updates...
Restarting sshd after upgrade
Performing sanity check on sshd configuration.
Stopping sshd.
Waiting for PIDS: 714.
Performing sanity check on sshd configuration.
Starting sshd.
Scanning //usr/share/certs/blacklisted for certificates...
Scanning //usr/share/certs/trusted for certificates...
 done.

2024-04-14: vtbd0p3 - check drive size after I have enlarged the storage file

root@trap2# gpart show -p
=>      40  10485680    vtbd0  GPT  (5.0G)
        40        24           - free -  (12K)
        64      1024  vtbd0p1  freebsd-boot  (512K)
      1088   2097152  vtbd0p2  freebsd-swap  (1.0G)
   2098240   6289408  vtbd0p3  freebsd-ufs  (3.0G)
   8387648   2098072           - free -  (1.0G)

nice. I should be able to resize it

root@trap2# gpart resize -i 3 vtbd0
vtbd0p3 resized

check

root@trap2# gpart show -p
=>      40  10485680    vtbd0  GPT  (5.0G)
        40        24           - free -  (12K)
        64      1024  vtbd0p1  freebsd-boot  (512K)
      1088   2097152  vtbd0p2  freebsd-swap  (1.0G)
   2098240   8387456  vtbd0p3  freebsd-ufs  (4.0G)
  10485696        24           - free -  (12K)

and now growfs

root@trap2# growfs /dev/vtbd0p3
Device is mounted read-write; resizing will result in temporary write suspension for /.
It's strongly recommended to make a backup before growing the file system.
OK to grow filesystem on /dev/vtbd0p3, mounted on /, from 3.0GB to 4.0GB? [yes/no] yes
super-block backups (for fsck_ffs -b #) at:
 6411392, 7693632

check

root@trap2# df -h
Filesystem      Size    Used   Avail Capacity  Mounted on
/dev/vtbd0p3    3.9G    2.9G    686M    81%    /
devfs           1.0K      0B    1.0K     0%    /dev

2024-04-14: vtbd0p2 - freebsd-update - upgrade to 13.3-release

root@trap2# freebsd-update -r 13.3-RELEASE upgrade
src component not installed, skipped
[..]
The following components of FreeBSD seem to be installed:
kernel/generic world/base

The following components of FreeBSD do not seem to be installed:
kernel/generic-dbg world/base-dbg world/lib32 world/lib32-dbg

Does this look reasonable (y/n)? y
[..]
The following files will be removed as part of updating to
13.3-RELEASE-p1:
The following files will be added as part of updating to
13.3-RELEASE-p1:
The following files will be updated as part of updating to
13.3-RELEASE-p1:
[..]
/var/db/etcupdate/log
/var/db/mergemaster.mtree
/var/yp/Makefile.dist
To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".

install

root@trap2# freebsd-update install
src component not installed, skipped
Installing updates...
Kernel updates have been installed.  Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.

reboot, then install again

root@trap2# freebsd-update install
src component not installed, skipped
Installing updates...
/: write failed, filesystem is full
gunzip: error writing to output: No space left on device
install: ///usr/bin/INS@OGA2H6: No space left on device

/: write failed, filesystem is full
gunzip: error writing to output: No space left on device
install: ///usr/bin/INS@yP4BTy: No space left on device
gunzip: error writing to output: No space left on device
install: ///usr/bin/INS@JxOf9c: No space left on device

/: write failed, filesystem is full
install: ///usr/bin/INS@WzgYQA: No space left on device
install: ///usr/bin/INS@MBlUJT: No space left on device

/: write failed, filesystem is full
install: ///usr/bin/INS@6bGR0c: No space left on device

/: write failed, filesystem is full
install: ///usr/lib/clang/17/lib/freebsd/libclang_rt.asan-x86_64.a: No space left on device
gunzip: error writing to output: No space left on device
install: ///usr/lib/clang/17/lib/freebsd/libclang_rt.fuzzer-x86_64.a: No space left on device

/: write failed, filesystem is full
gunzip: error writing to output: No space left on device
install: ///usr/lib/clang/17/lib/freebsd/libclang_rt.fuzzer_no_main-x86_64.a: No space left on device
install: ///usr/lib/clang/17/lib/freebsd/libclang_rt.msan-x86_64.a: No space left on device
gunzip: error writing to output: No space left on device
install: ///usr/lib/clang/17/lib/freebsd/libclang_rt.tsan-x86_64.a: No space left on device
gunzip: error writing to output: No space left on device

/: write failed, filesystem is full
install: ///usr/lib/clang/17/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a: No space left on device

/: write failed, filesystem is full
gunzip: error writing to output: No space left on device
install: ///usr/lib/INS@az6Pvv: No space left on device
gunzip: error writing to output: No space left on device

/: write failed, filesystem is full
gunzip: error writing to output: No space left on device
install: ///usr/lib/INS@Twi9m6: No space left on device
gunzip: error writing to output: No space left on device
install: ///usr/lib/INS@fSM0pb: No space left on device
gunzip: error writing to output: No space left on device
install: ///usr/lib/INS@nu96Tn: No space left on device

/: write failed, filesystem is full
gunzip: error writing to output: No space left on device
install: ///usr/lib/INS@T1cAZk: No space left on device
gunzip: error writing to output: No space left on device
install: ///usr/lib/INS@qePDHd: No space left on device

/: write failed, filesystem is full
gunzip: error writing to output: No space left on device
install: ///usr/lib/INS@ZD984Z: No space left on device
gunzip: error writing to output: No space left on device

/: write failed, filesystem is full
gunzip: error writing to output: No space left on device
install: ///usr/lib/INS@Kfk5ex: No space left on device
[..]

Oops, I need to extende the storage file a bit.

2024-02-18: vtbd0p2 - reboot, FreeBSD 13.2-release-p10 is in

root@trap2# freebsd-version -ku
13.2-RELEASE-p10
13.2-RELEASE-p10

kernel

root@trap2# uname -a
FreeBSD trap2.kg4.no 13.2-RELEASE-p10 FreeBSD 13.2-RELEASE-p10 GENERIC amd64

2024-02-18: vtbd0p3 - freebsd-update fetch

root@trap2# freebsd-update fetch
src component not installed, skipped
[..]
The following files will be updated as part of updating to
13.2-RELEASE-p10:
/bin/freebsd-version
/boot/kernel/kernel
[..]
/var/db/etcupdate/current/etc/defaults/rc.conf
/var/db/etcupdate/current/etc/periodic/daily/480.leapfile-ntpd
/var/db/mergemaster.mtree

install

root@trap2# freebsd-update install
src component not installed, skipped
Installing updates...
Restarting sshd after upgrade
Performing sanity check on sshd configuration.
Stopping sshd.
Performing sanity check on sshd configuration.
Starting sshd.
Scanning //usr/share/certs/blacklisted for certificates...
Scanning //usr/share/certs/trusted for certificates...
 done.

2024-01-20: vtbd0p3 -I've noticed over the last couple of weeks that the machine use a small amount of swap now:

root@trap2# date;swapinfo -h;echo " ";tvlm;echo " ";tvls;echo " ";df -h;echo " ";uptime;service sshd status;service sshd status
Sat Jan 20 10:52:50 CET 2024
Device              Size     Used    Avail Capacity
/dev/vtbd0p2        1.0G     544K     1.0G     0%
[..]

As reported on the host

root@kg-vm3# vm info trap2 | grep memory
  memory: 256M
  memory-resident: 226750464 (216.246M)

Perhaps I should increase memory for the trap2 vm.

2024-01-13: c2 (FreeBSD workstation) - from c2, bootstrap ansible on this host

tingo@kg-core2:~/personal/projects/2020/ansible_fbsd/infrastructure_home $ ansible-playbook --become-method su --ask-become-pass -l trap fbsd-bootstrap.yml
BECOME password: 

PLAY [all] **********************************************************************************************************************************

TASK [pkg bootstrap] ************************************************************************************************************************
changed: [trap]

TASK [pkg update] ***************************************************************************************************************************
changed: [trap]

TASK [install python and sudo] **************************************************************************************************************
changed: [trap]

TASK [set up wheel group to have passwordless sudo] *****************************************************************************************
changed: [trap]

PLAY RECAP **********************************************************************************************************************************
trap                       : ok=4    changed=4    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

2024-01-13: trap2 - another reboot, yes FreeBSD 13.2-release-p9 is in

root@trap2# freebsd-version -ku
13.2-RELEASE-p8
13.2-RELEASE-p9

kernel

root@trap2# uname -a
FreeBSD trap2.kg4.no 13.2-RELEASE-p8 FreeBSD 13.2-RELEASE-p8 GENERIC amd64

2024-01-13: trap2 - freebsd-update, try to upgrade directly to 13.2-RELEASE

root@trap2# freebsd-update -r 13.2-RELEASE upgrade
src component not installed, skipped
[..]
The following components of FreeBSD seem to be installed:
kernel/generic world/base

The following components of FreeBSD do not seem to be installed:
world/doc world/games world/lib32

Does this look reasonable (y/n)? y
[..]
The following files will be removed as part of updating to 13.2-RELEASE-p9:
The following files will be added as part of updating to 13.2-RELEASE-p9:
The following files will be updated as part of updating to 13.2-RELEASE-p9:
[..]
/var/db/ntp
/var/empty
/var/yp/Makefile.dist
To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".

install

root@trap2# freebsd-update install
src component not installed, skipped
Installing updates...
Kernel updates have been installed.  Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.

reboot, then

root@trap2# freebsd-update install
src component not installed, skipped
Installing updates...
Completing this upgrade requires removing old shared object files.
Please rebuild all installed 3rd party software (e.g., programs
installed from the ports tree) and then run "/usr/sbin/freebsd-update install"
again to finish installing updates.

well, nothing installed so

root@trap2# freebsd-update install
src component not installed, skipped
Installing updates...rmdir: ///var/db/etcupdate/current/usr/share/openssl/man/en.ISO8859-1: Directory not empty
rmdir: ///var/db/etcupdate/current/usr/share/openssl/man: Directory not empty
rmdir: ///var/db/etcupdate/current/usr/share/openssl: Directory not empty
rmdir: ///var/db/etcupdate/current/usr/share/man/en.UTF-8: Directory not empty
rmdir: ///var/db/etcupdate/current/usr/share/man/en.ISO8859-1: Directory not empty
rmdir: ///var/db/etcupdate/current/usr/share/man: Directory not empty
 done.

2024-01-13: trap2 - reboot, yes that worked

root@trap2# freebsd-version -ku
10.4-RELEASE-p13
10.4-RELEASE-p13

kernel

root@trap2# uname -a
FreeBSD trap2.kg4.no 10.4-RELEASE-p13 FreeBSD 10.4-RELEASE-p13 #0: Thu Sep 27 10:09:35 UTC 2018
     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

2024-01-13: trap2 (formerly bvm4) - try to run freebsd-update on it. fetch first

root@trap2# freebsd-update fetch
src component not installed, skipped
[..]
The following files will be updated as part of updating to 10.4-RELEASE-p13:
/usr/share/zoneinfo/zone.tab

WARNING: FreeBSD 10.4-RELEASE HAS PASSED ITS END-OF-LIFE DATE.
Any security issues discovered after Thu Nov  1 01:00:00 CET 2018
will not have been corrected.

ok, that worked at least. install

root@trap2# freebsd-update install
src component not installed, skipped
Installing updates... done.

2020-06-21: bvm4 - gets renamed to 'trap2' as part of the switch to vm-bhyve

root@kg-vm3# pwd
/zs/vms
root@kg-vm3# mv bvm4 trap2

add a config file

root@kg-vm3# more trap2/trap2.conf
loader="bhyveload"
cpu="1"
memory="256M"
network0_type="virtio-net"
network0_switch="public"
disk0_type="virtio-blk"
disk0_name="guest-bvm4.img"

test it

root@kg-vm3# vm list
NAME   DATASTORE  LOADER     CPU  MEMORY  VNC  AUTOSTART  STATE
trap2  default    bhyveload  1    256M    -    No         Running (10299)
tv     default    bhyveload  2    1536M   -    No         Running (9278)
wiki   default    bhyveload  2    1024M   -    No         Running (8672)

it works, and I can ssh into it

2019-11-27: vtbd0p3 - clock trouble

root@trap2# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 kg-omni1.kg4.no 91.209.0.17      3 u   35   64  377    0.633  3592816 150966.

check

root@trap2# sysctl kern.timecounter.hardware
kern.timecounter.hardware: TSC

change and verify

root@trap2# sysctl kern.timecounter.hardware=HPET
kern.timecounter.hardware: TSC -> HPET
root@trap2# sysctl kern.timecounter.hardware
kern.timecounter.hardware: HPET

ok.

2019-11-25: powered on after power outage.

2019-08-27: bvm4 - this machine has clock trouble too:

root@trap2# date;ntpq -p
Sun Aug 25 21:58:29 CEST 2019
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 kg-omni1.kg4.no 194.58.205.148   2 u   42   64  377    0.452  1256607 112735.

and the culprit is

root@trap2# sysctl kern.timecounter.hardware
kern.timecounter.hardware: TSC

change

root@trap2# sysctl kern.timecounter.hardware=HPET
kern.timecounter.hardware: TSC -> HPET

fix time

root@trap2# service ntpd stop
Stopping ntpd.
root@trap2# ntpdate 10.1.10.1
27 Aug 08:55:53 ntpdate[27386]: step time server 10.1.10.1 offset 125700.424538 sec
root@trap2# ntpdate 10.1.10.1
27 Aug 08:56:02 ntpdate[27387]: adjust time server 10.1.10.1 offset 0.000968 sec
root@trap2# ntpdate 10.1.10.1
27 Aug 08:56:13 ntpdate[27388]: adjust time server 10.1.10.1 offset 0.000784 sec
root@trap2# service ntpd start
Starting ntpd.

and now?

root@trap2# date;ntpq -p
Tue Aug 27 08:56:52 CEST 2019
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*kg-omni1.kg4.no 194.58.205.148   2 u   21   64    1    0.731    1.619   0.547

better.

2017-11-26: bvm4 - disk layout etc.

root@trap2# date;swapinfo -h;echo " ";tvlm;echo " ";tvls;echo " ";df -h;echo " ";uptime;service sshd status
Sun Nov 26 20:42:25 CET 2017
Device          1K-blocks     Used    Avail Capacity
/dev/vtbd0p2      1048576       0B     1.0G     0%

Nov 26 21:26:15 trap2 kernel: random: unblocking device.
Nov 26 21:26:15 trap2 kernel: Timecounter "TSC" frequency 1039821016 Hz quality 1000
Nov 26 21:26:15 trap2 kernel: Trying to mount root from ufs:/dev/vtbd0p3 [rw]...
Nov 26 21:26:15 trap2 kernel: vtnet0: link state changed to UP
Nov 26 21:26:16 trap2 ntpd[581]: ntpd 4.2.8p10-a (1): Starting
Nov 26 21:35:24 trap2 su: tingo to root on /dev/pts/0
Nov 26 21:36:49 trap2 su: tingo to root on /dev/pts/1
Nov 26 21:37:34 trap2 sshd[756]: error: maximum authentication attempts exceeded for root from 2.235.53.130 port 54158 ssh2 [preauth]
Nov 26 21:39:21 trap2 ntpd[773]: ntpd 4.2.8p10-a (1): Starting
Nov 26 21:40:46 trap2 ntpd[794]: ntpd 4.2.8p10-a (1): Starting

Nov 26 20:46:04 trap2 newsyslog[416]: logfile first created

Filesystem      Size    Used   Avail Capacity  Mounted on
/dev/vtbd0p3    2.9G    876M    1.8G    32%    /
devfs           1.0K    1.0K      0B   100%    /dev

 8:42PM  up 16 mins, 1 user, load averages: 0.27, 0.28, 0.19
sshd is running as pid 615.

ok.

2017-11-26: bvm4 - I modified /etc/motd and a few other files:

root@trap2:~ # more /etc/ntp.conf
server 10.1.10.1 iburst

and /etc/dhclient.conf

root@trap2# tail -1 /etc/dhclient.conf
send dhcp-client-identifier "trap.kg4.no";

change sh for root

root@trap2:~ # chsh -s /bin/sh
chsh: user information updated

I also fixed a few more files, mainly for convenience.

2017-11-26: vm3 - tmux - list (active sessions)

root@kg-vm3# tmux ls
bhyve_bvm1: 1 windows (created Mon Oct 16 18:49:41 2017) [80x24]
bhyve_bvm2: 1 windows (created Mon Oct 16 18:49:42 2017) [80x24]
bhyve_bvm3: 1 windows (created Mon Oct 16 18:49:42 2017) [80x24]
bhyve_bvm4: 1 windows (created Sun Nov 26 19:45:37 2017) [106x52]

connect to bvm4

root@kg-vm3# tmux attach -t bhyve_bvm4

(and the session starts)

2017-11-26: vm3 - bhyve - set up the new machine (1 cpu, 256M, 4 G, tap3)

create a directory for it

root@kg-vm3# cd /zs/vms
root@kg-vm3# mkdir bvm4

make file for a virtual disk drive

root@kg-vm3# truncate -s 4G bvm4/guest-bvm4.img
root@kg-vm3# ls -lh bvm4
total 96
-rw-r--r--  1 root  wheel   4.0G Nov 26 19:18 guest-bvm4.img

install the machine

root@kg-vm3# sh /usr/share/examples/bhyve/vmrun.sh -c 2 -t tap3 -d /zs/vms/bvm4/guest-bvm4.img -i -I /zs/tingo/dl/bsd/FreeBSD-10.4-RELEASE-amd64-disc1.iso bhyve_bvm4

this boot and starts the install. Selection and changes: xterm, Install, Norwegian ISO-8859-1 keymap, trap2.kg4.no, unselect games, lib32, ports, disk guided, entire disk, gpt, modify so I get 1G swap, 3G rootfs, net dhcp, services sshd, ntpd, dumpdev, set timezone. On exit, it reboots, just select "reboot" from the boot menu.

I add bvm4 to /etc/rc.conf.local:

root@kg-vm3# grep bvm4 /etc/rc.conf.local
bhyve_profiles="bvm1 bvm2 bvm3 bvm4"
bhyve_bvm4_tapdev="tap3"
bhyve_bvm4_diskdev="/zs/vms/bvm4/guest-bvm4.img"
bhyve_bvm4_ncpu="1"
bhyve_bvm4_memsize="256"

check bhyve status

root@kg-vm3# service bhyve status
===> bhyve profile: bvm1
bhyve_bvm1 is running.
===> bhyve profile: bvm2
bhyve_bvm2 is running.
===> bhyve profile: bvm3
bhyve_bvm3 is running.
===> bhyve profile: bvm4
bhyve_bvm4 is not running.

start bvm4

root@kg-vm3# service bhyve start bvm4

Starting bhyve.

root@kg-vm3# service bhyve status
===> bhyve profile: bvm1
bhyve_bvm1 is running.
===> bhyve profile: bvm2
bhyve_bvm2 is running.
===> bhyve profile: bvm3
bhyve_bvm3 is running.
===> bhyve profile: bvm4
bhyve_bvm4 is running.

ok.

2017-11-26: setting up a new loginhost, so I can take vbox-trap offline. Trying to move everything off the VirtualBox host.