ASRock BeeBox N3000 - FreeBSD
Hardware info on main page.
Links
iohyve, xhyve, xhyve – Lightweight Virtualization on OS X Based on bhyve, vmrc, bhyve links: bhyve.org, FreeBSD wiki: bhyve, libvirt: bhyve driver, vm-bhyve, bhyve examples: Using bhyve on FreeBSD, BSDnow: Virtualization with bhyve, Understanding bhyve: How-To run Ubuntu & CentOS under FreeBSD, Writing Aliases in csh and tcsh,
local links
History / work log
2024-11-24: ada0p2 - reboot, FreeBSD 13.4-relesae-p2 is in
root@kg-vm3:~ # freebsd-version -ku 13.4-RELEASE-p1 13.4-RELEASE-p2
kernel
root@kg-vm3:~ # uname -a FreeBSD kg-vm3.kg4.no 13.4-RELEASE-p1 FreeBSD 13.4-RELEASE-p1 GENERIC amd64
2024-11-24: ada0p2 - pkg - upgrade
Nov 24 17:37:12 kg-vm3 pkg[15320]: perl5 upgraded: 5.36.3_1 -> 5.36.3_2 Nov 24 17:37:12 kg-vm3 pkg[15320]: libnghttp2 upgraded: 1.62.1 -> 1.63.0 Nov 24 17:37:12 kg-vm3 pkg[15320]: libedit upgraded: 3.1.20240517,1 -> 3.1.20240808,1 Nov 24 17:37:12 kg-vm3 pkg[15320]: readline upgraded: 8.2.10 -> 8.2.13_1 Nov 24 17:37:29 kg-vm3 pkg[15320]: python39 upgraded: 3.9.19 -> 3.9.20 Nov 24 17:37:51 kg-vm3 pkg[15320]: ruby upgraded: 3.2.4,1 -> 3.2.5,1 Nov 24 17:37:52 kg-vm3 pkg[15320]: automake upgraded: 1.16.5_2 -> 1.17 Nov 24 17:37:53 kg-vm3 pkg[15320]: sudo upgraded: 1.9.15p5_4 -> 1.9.16p1 Nov 24 17:37:54 kg-vm3 pkg[15320]: curl upgraded: 8.9.1 -> 8.10.1 Nov 24 17:37:55 kg-vm3 pkg[15320]: pkgconf upgraded: 2.2.0,1 -> 2.3.0,1 Nov 24 17:38:25 kg-vm3 pkg[15320]: ca_root_nss upgraded: 3.93_2 -> 3.104
2024-11-24: ada0p2 - freebsd-update upgrade to 13.4-release
root@kg-vm3:~ # freebsd-update -r 13.4-RELEASE upgrade src component not installed, skipped [..] The following components of FreeBSD seem to be installed: kernel/generic world/base world/lib32 The following components of FreeBSD do not seem to be installed: kernel/generic-dbg world/base-dbg world/lib32-dbg Does this look reasonable (y/n)? y [..] The following files are affected by updates. No changes have been downloaded, however, because the files have been modified locally: /var/db/locate.database The following files will be removed as part of updating to 13.4-RELEASE-p2: The following files will be added as part of updating to 13.4-RELEASE-p2: The following files will be updated as part of updating to 13.4-RELEASE-p2: /var/db/etcupdate/log /var/db/mergemaster.mtree To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
install
root@kg-vm3:~ # 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@kg-vm3:~ # 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: 1125. Performing sanity check on sshd configuration. Starting sshd. Scanning //usr/share/certs/blacklisted for certificates... Scanning //usr/share/certs/trusted for certificates... Scanning //usr/local/share/certs for certificates... find: ///usr/share/man/man5/nologin.5.gz: No such file or directory done.
2024-11-24: ada0p2 - reboot, FreeBSD 13.3-release-p8 is in
root@kg-vm3:~ # freebsd-version -ku 13.3-RELEASE-p7 13.3-RELEASE-p8
kernel
root@kg-vm3:~ # uname -a FreeBSD kg-vm3.kg4.no 13.3-RELEASE-p7 FreeBSD 13.3-RELEASE-p7 GENERIC amd64
2024-11-24: ada0p2 - freeebsd-update fetch
root@kg-vm3:~ # freebsd-update fetch src component not installed, skipped [..] The following files will be updated as part of updating to 13.3-RELEASE-p8: /bin/freebsd-version /boot/kernel/ctl.ko /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/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/fetch /usr/sbin/bhyve WARNING: FreeBSD 13.3-RELEASE-p7 is approaching its End-of-Life date. It is strongly recommended that you upgrade to a newer release within the next 1 month.
install
root@kg-vm3:~ # 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: 1145. Performing sanity check on sshd configuration. Starting sshd. Scanning //usr/share/certs/blacklisted for certificates... Scanning //usr/share/certs/trusted for certificates... Scanning //usr/local/share/certs for certificates... find: ///usr/share/man/man5/nologin.5.gz: No such file or directory done.
2024-09-29: ada0p2 - reboot, FreeBSD 13.3-release-p7 is in
root@kg-vm3:~ # freebsd-version -ku 13.3-RELEASE-p7 13.3-RELEASE-p7
kernel
root@kg-vm3:~ # uname -a FreeBSD kg-vm3.kg4.no 13.3-RELEASE-p7 FreeBSD 13.3-RELEASE-p7 GENERIC amd64
2024-09-29: ada0p2 - freebsd-update fetch
root@kg-vm3:~ # 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 11 patches.....10 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/lib32/libnv.a /usr/lib32/libnv.so.0 /usr/lib32/libnv_p.a /usr/sbin/bhyve
install
root@kg-vm3:~ # 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: 1165. Performing sanity check on sshd configuration. Starting sshd. Scanning //usr/share/certs/blacklisted for certificates... Scanning //usr/share/certs/trusted for certificates... Scanning //usr/local/share/certs for certificates... find: ///usr/share/man/man5/nologin.5.gz: No such file or directory done.
2024-09-07: ada0p2 - reboot, FreeBSD 13.3-release-p6 is in
root@kg-vm3:~ # freebsd-version -ku 13.3-RELEASE-p6 13.3-RELEASE-p6
kernel
root@kg-vm3:~ # uname -a FreeBSD kg-vm3.kg4.no 13.3-RELEASE-p6 FreeBSD 13.3-RELEASE-p6 GENERIC amd64
2024-09-07: ada0p2 - freebsd-update fetch
root@kg-vm3:~ # 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/lib32/libnv.a /usr/lib32/libnv.so.0 /usr/lib32/libnv_p.a /usr/sbin/bhyve
install
root@kg-vm3:~ # 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: 1181. Performing sanity check on sshd configuration. Starting sshd. Scanning //usr/share/certs/blacklisted for certificates... Scanning //usr/share/certs/trusted for certificates... Scanning //usr/local/share/certs for certificates... find: ///usr/share/man/man5/nologin.5.gz: No such file or directory done.
2024-08-11: ada0p2 - now the root has 'csh' as default shell, I needed to update the aliases in ~/.cshrc
:
root@kg-vm3:~ # alias h (history 25) j (jobs -l) l (ls -aGF) la (ls -aF) lf (ls -FA) ll (ls -laGF) pv (pkg version -vL=) temp sysctl dev.cpu.0.temperature;sysctl dev.cpu.1.temperature tvla (tail /var/log/auth.log) tvlm (tail /var/log/messages) tvlml (tail /var/log/maillog)
some are the standard, like h, j, la, lf, the rest are my variation.
2024-08-09: ada0p2 - the machine now runs FreeBSD 13.3-release-p5
root@kg-vm3:~ # freebsd-version -ku 13.3-RELEASE-p5 13.3-RELEASE-p5
kernel
root@kg-vm3:~ # uname -a FreeBSD kg-vm3.kg4.no 13.3-RELEASE-p5 FreeBSD 13.3-RELEASE-p5 GENERIC amd64
that's it.
2024-08-09: ada0p2 - vm-bhyve - enable it in /etc/rc.conf, and enable the machines to be autostarted in /etc/rc.conf.local. Then reboot the machine. As expected, all vms started
root@kg-vm3:~ # vm list NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE music3 default bhyveload 1 768M - Yes [4] Running (2481) proxy default bhyveload 2 1024M - Yes [5] Running (2670) trap2 default bhyveload 1 256M - Yes [1] Running (1435) tv default bhyveload 2 1536M - No Stopped web default bhyveload 2 1280M - Yes [2] Running (1727) web2 default bhyveload 2 2048M - Yes [3] Running (1983) wiki default bhyveload 2 1024M - No Stopped wiki2 default bhyveload 2 1408M - No Stopped wiki3 default bhyveload 2 1408M - Yes [6] Running (2761)
2024-08-09: ada0p2 - pkg - upgrade
Aug 9 19:35:19 kg-vm3 pkg[1162]: pkg upgraded: 1.20.9 -> 1.21.3 Aug 9 19:39:31 kg-vm3 pkg[1195]: libedit upgraded: 3.1.20230828,1 -> 3.1.20240517,1 Aug 9 19:39:31 kg-vm3 pkg[1195]: libunwind upgraded: 20230730 -> 20240221 Aug 9 19:39:32 kg-vm3 pkg[1195]: libunistring upgraded: 1.1 -> 1.2 Aug 9 19:39:32 kg-vm3 pkg[1195]: libffi upgraded: 3.4.4 -> 3.4.6 Aug 9 19:39:32 kg-vm3 pkg[1195]: gettext-runtime upgraded: 0.22.3 -> 0.22.5 Aug 9 19:39:54 kg-vm3 pkg[1195]: ruby-3.2.4,1 installed Aug 9 19:39:55 kg-vm3 pkg[1195]: libidn2 upgraded: 2.3.4 -> 2.3.7 Aug 9 19:39:55 kg-vm3 pkg[1195]: m4 upgraded: 1.4.19,1 -> 1.4.19_1,1 Aug 9 19:39:55 kg-vm3 pkg[1195]: libnghttp2 upgraded: 1.58.0 -> 1.62.1 Aug 9 19:39:55 kg-vm3 pkg[1195]: mpdecimal upgraded: 2.5.1 -> 4.0.0 Aug 9 19:39:55 kg-vm3 pkg[1195]: ruby32-bdb-0.6.6_9 installed Aug 9 19:39:56 kg-vm3 pkg[1195]: libtextstyle upgraded: 0.22.3 -> 0.22.5 Aug 9 19:39:56 kg-vm3 pkg[1195]: readline upgraded: 8.2.7 -> 8.2.10 Aug 9 19:39:56 kg-vm3 pkg[1195]: libssh2 upgraded: 1.11.0,3 -> 1.11.0_1,3 Aug 9 19:39:57 kg-vm3 pkg[1195]: libpsl upgraded: 0.21.2_4 -> 0.21.5_1 Aug 9 19:39:58 kg-vm3 pkg[1195]: ncurses-6.5 installed Aug 9 19:39:58 kg-vm3 pkg[1195]: autoconf upgraded: 2.71 -> 2.72 Aug 9 19:39:58 kg-vm3 pkg[1195]: libtool upgraded: 2.4.7_1 -> 2.4.7_2 Aug 9 19:40:14 kg-vm3 pkg[1195]: python39 upgraded: 3.9.18 -> 3.9.19 Aug 9 19:40:14 kg-vm3 pkg[1195]: automake upgraded: 1.16.5 -> 1.16.5_2 Aug 9 19:40:15 kg-vm3 pkg[1195]: dialog4ports upgraded: 0.1.6_1 -> 0.1.6_2 Aug 9 19:40:15 kg-vm3 pkg[1195]: gmake upgraded: 4.3_2 -> 4.4.1 Aug 9 19:40:16 kg-vm3 pkg[1195]: sudo upgraded: 1.9.15p5 -> 1.9.15p5_4 Aug 9 19:40:17 kg-vm3 pkg[1195]: curl upgraded: 8.6.0 -> 8.9.1 Aug 9 19:40:18 kg-vm3 pkg[1195]: help2man upgraded: 1.49.3 -> 1.49.3_1 Aug 9 19:40:18 kg-vm3 pkg[1195]: pkgconf upgraded: 2.0.3_1,1 -> 2.2.0,1 Aug 9 19:40:21 kg-vm3 pkg[1195]: gettext-tools upgraded: 0.22.3 -> 0.22.5 Aug 9 19:40:21 kg-vm3 pkg[1195]: vm-bhyve upgraded: 1.5.0 -> 1.5.0_1 Aug 9 19:40:22 kg-vm3 pkg[1195]: tmux upgraded: 3.3a_1 -> 3.3a_3 Aug 9 19:40:38 kg-vm3 pkg[1195]: ruby31-3.1.6,1 installed Aug 9 19:40:38 kg-vm3 pkg[1195]: portupgrade upgraded: 2.4.16_1,2 -> 2.4.16_3,2
2024-08-09: ada0p2 - freebsd-update again, fetch
root@kg-vm3# freebsd-update fetch src component not installed, skipped [..] 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@kg-vm3# 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: 42064. Performing sanity check on sshd configuration. Starting sshd. Scanning //usr/share/certs/blacklisted for certificates... Scanning //usr/share/certs/trusted for certificates... Scanning //usr/local/share/certs for certificates... find: ///usr/share/man/man5/nologin.5.gz: No such file or directory done.
2024-08-09: ada0p2 - with a borrowed power supply - run freebsd-update install again
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates...install: ///usr/share/man/man5/nologin.5.gz: No such file or directory ln: ///usr/share/man/man9/uma_zone_set_allocf.9.gz: File exists ln: ///usr/share/man/man9/uma_zone_set_maxcache.9.gz: File exists ln: ///usr/share/man/man9/uma_zsecond_create.9.gz: File exists ln: ///usr/share/man/man9/vm_map_wire_mapped.9.gz: File exists ln: ///usr/share/man/man9/vm_page_unwire_noq.9.gz: File exists install: ///var/db/etcupdate/current/etc/rc.d/ipfw_netflow: No such file or directory install: ///var/db/etcupdate/current/etc/rc.d/ipmon: No such file or directory install: ///var/db/etcupdate/current/etc/rc.d/ippool: No such file or directory install: ///var/db/etcupdate/current/etc/rc.d/ipropd_slave: No such file or directory install: ///var/db/etcupdate/current/etc/rc.d/ipsec: No such file or directory install: ///var/db/etcupdate/current/etc/rc.d/iscsictl: No such file or directory install: ///var/db/etcupdate/current/etc/rc.d/iscsid: No such file or directory Restarting sshd after upgrade Performing sanity check on sshd configuration. Stopping sshd. Waiting for PIDS: 1129. Performing sanity check on sshd configuration. Starting sshd. Scanning //usr/share/certs/blacklisted for certificates... Scanning //usr/share/certs/trusted for certificates... Scanning //usr/local/share/certs for certificates... find: ///usr/share/man/man5/nologin.5.gz: No such file or directory done.
2024-07-21: ok, it looks like the internal SSD (msata) died.
2024-07-21: ada0p2 - freebsd-update, upgrade to 13.3-release
root@kg-vm3# 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 world/lib32 The following components of FreeBSD do not seem to be installed: kernel/generic-dbg world/base-dbg world/lib32-dbg Does this look reasonable (y/n)? y [..] The following files will be removed as part of updating to 13.3-RELEASE-p4: The following files will be added as part of updating to 13.3-RELEASE-p4: The following files will be updated as part of updating to 13.3-RELEASE-p4: [..] /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@kg-vm3# 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@kg-vm3# freebsd-update install src component not installed, skipped Installing updates...Connection to kg-vm3.kg4.no closed by remote host. Connection to kg-vm3.kg4.no closed.
ouch! Thats not supposed to happen.
2024-07-21: ada0p2 - reboot, FreeBSD 13.2-release-p12 is in
root@kg-vm3# freebsd-version -ku 13.2-RELEASE-p11 13.2-RELEASE-p12
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 13.2-RELEASE-p11 FreeBSD 13.2-RELEASE-p11 GENERIC amd64
2024-07-21: ada0p2 - freebsd-update fetch
root@kg-vm3# freebsd-update fetch src component not installed, skipped [..] The following files will be updated as part of updating to 13.2-RELEASE-p12: /bin/freebsd-version /boot/kernel/if_wg.ko /boot/kernel/kernel /usr/bin/slogin /usr/bin/ssh /usr/lib/libprivatessh.a /usr/lib/libprivatessh.so.5 /usr/lib/libprivatessh_p.a /usr/lib/libprivateunbound.a /usr/lib/libprivateunbound.so.5 /usr/lib/libprivateunbound_p.a /usr/lib32/libprivatessh.a /usr/lib32/libprivatessh.so.5 /usr/lib32/libprivatessh_p.a /usr/lib32/libprivateunbound.a /usr/lib32/libprivateunbound.so.5 /usr/lib32/libprivateunbound_p.a /usr/libexec/ssh-keysign /usr/sbin/local-unbound /usr/sbin/local-unbound-anchor /usr/sbin/local-unbound-checkconf /usr/sbin/local-unbound-control /usr/sbin/sshd WARNING: FreeBSD 13.2-RELEASE-p10 HAS PASSED ITS END-OF-LIFE DATE. Any security issues discovered after Tue Jul 2 02:00:00 CEST 2024 will not have been corrected.
install
root@kg-vm3# 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: 1171. Performing sanity check on sshd configuration. Starting sshd. Scanning //usr/share/certs/blacklisted for certificates... Scanning //usr/share/certs/trusted for certificates... Scanning //usr/local/share/certs for certificates... done.
2024-06-02: ada0p2 - just a status report
root@kg-vm3# date;temp;swapinfo -h;echo " ";tvlm;echo " ";tvls;echo " ";df -h;echo " ";uptime;echo " ";ps ax | grep -v grep | grep ddc;ps ax | grep -v grep | grep smartd;ps ax | grep -v grep | grep natd;echo "bhyve vms:";tmux ls Sun Jun 2 13:20:32 CEST 2024 dev.cpu.0.temperature: 62.0C dev.cpu.1.temperature: 69.0C Device Size Used Avail Capacity /dev/ada0p3 3.8G 0B 3.8G 0% Jun 1 14:04:58 kg-vm3 kernel: tap4: Ethernet address: 58:9c:fc:10:50:48 Jun 1 14:04:59 kg-vm3 kernel: tap3: link state changed to UP Jun 1 14:04:59 kg-vm3 kernel: tap4: promiscuous mode enabled Jun 1 14:05:03 kg-vm3 kernel: tap5: Ethernet address: 58:9c:fc:10:d0:39 Jun 1 14:05:03 kg-vm3 kernel: tap4: link state changed to UP Jun 1 14:05:03 kg-vm3 kernel: tap5: promiscuous mode enabled Jun 1 14:05:09 kg-vm3 kernel: tap5: link state changed to UP Jun 1 14:12:38 kg-vm3 su[2918]: tingo to root on /dev/pts/6 Jun 1 14:18:14 kg-vm3 su[3079]: tingo to root on /dev/pts/7 Jun 1 14:18:51 kg-vm3 su[3227]: tingo to root on /dev/pts/8 Sep 19 01:35:25 kg-vm3 newsyslog[478]: logfile first created Filesystem Size Used Avail Capacity Mounted on /dev/ada0p2 105G 6.9G 89G 7% / devfs 1.0K 1.0K 0B 100% /dev /dev/da0p1 1.8T 148G 1.5T 9% /zs 1:20PM up 23:16, 10 users, load averages: 0.13, 0.21, 0.23 bhyve vms: music3: 1 windows (created Sat Jun 1 14:04:50 2024) proxy: 1 windows (created Sat Jun 1 14:04:56 2024) trap2: 1 windows (created Sat Jun 1 14:04:35 2024) web: 1 windows (created Sat Jun 1 14:04:40 2024) web2: 1 windows (created Sat Jun 1 14:04:45 2024) wiki3: 1 windows (created Sat Jun 1 14:05:01 2024)
the machine and the vm's on it are still up.
2024-06-01: ada0p2 - and it crashed / powered off after a few minutes
root@kg-vm3# last tingo pts/8 kg-core2.kg4.no Sat Jun 1 14:18 still logged in tingo pts/7 kg-core2.kg4.no Sat Jun 1 14:18 still logged in tingo pts/6 10.1.161.6 Sat Jun 1 14:12 still logged in root pts/5 tmux(1162).%5 Sat Jun 1 14:05 still logged in root pts/4 tmux(1162).%4 Sat Jun 1 14:04 still logged in root pts/3 tmux(1162).%3 Sat Jun 1 14:04 still logged in root pts/2 tmux(1162).%2 Sat Jun 1 14:04 still logged in root ttyv0 Sat Jun 1 14:04 still logged in root pts/1 tmux(1162).%1 Sat Jun 1 14:04 still logged in root pts/0 tmux(1162).%0 Sat Jun 1 14:04 still logged in boot time Sat Jun 1 14:04 tingo pts/7 kg-core2.kg4.no Sat Jun 1 13:36 - crash (00:27) tingo pts/6 kg-core2.kg4.no Sat Jun 1 13:36 - crash (00:27) root pts/5 tmux(1176).%5 Sat Jun 1 13:35 - crash (00:28) root pts/4 tmux(1176).%4 Sat Jun 1 13:35 - crash (00:28) root pts/3 tmux(1176).%3 Sat Jun 1 13:35 - crash (00:28) root pts/2 tmux(1176).%2 Sat Jun 1 13:35 - crash (00:29) root pts/1 tmux(1176).%1 Sat Jun 1 13:35 - crash (00:29) root pts/0 tmux(1176).%0 Sat Jun 1 13:35 - crash (00:29) boot time Sat Jun 1 13:35 utx.log begins Sat Jun 1 13:35:20 CEST 2024
still no clues in logs. But it has been up for
root@kg-vm3# uptime 2:20PM up 16 mins, 10 users, load averages: 0.19, 0.78, 1.17
now. Let me see how this goes.
2024-06-01: ada0p2 - power on after the machine was off. No easily found reason in logs, etc.
root@kg-vm3# last tingo pts/7 kg-core2.kg4.no Sat Jun 1 13:36 still logged in tingo pts/6 kg-core2.kg4.no Sat Jun 1 13:36 still logged in root pts/5 tmux(1176).%5 Sat Jun 1 13:35 still logged in root pts/4 tmux(1176).%4 Sat Jun 1 13:35 still logged in root pts/3 tmux(1176).%3 Sat Jun 1 13:35 still logged in root pts/2 tmux(1176).%2 Sat Jun 1 13:35 still logged in root pts/1 tmux(1176).%1 Sat Jun 1 13:35 still logged in root pts/0 tmux(1176).%0 Sat Jun 1 13:35 still logged in boot time Sat Jun 1 13:35 utx.log begins Sat Jun 1 13:35:20 CEST 2024 root@kg-vm3# who -b system boot Jun 1 13:35 root@kg-vm3# ls -l /var/crash total 4 -rw-r--r-- 1 root wheel 5 Aug 12 2015 minfree
2024-04-14: ada0p2 - extend storage file for vm trap2
root@kg-vm3# cd /zs/vms/trap2 root@kg-vm3# ll -h total 4195400 drwxr-xr-x 2 root wheel 512B Mar 23 16:44 ./ drwxr-xr-x 16 root wheel 512B Jul 15 2023 ../ -rw-r--r-- 1 root wheel 16B Mar 23 16:44 console -rw-r--r-- 1 root wheel 4.0G Apr 14 20:45 guest-bvm4.img -rw-r--r-- 1 root wheel 14B Mar 23 16:44 run.lock -rw-r--r-- 1 root wheel 222B Jun 21 2020 trap2.conf -rw-r--r-- 1 root wheel 18K Apr 14 20:34 vm-bhyve.log root@kg-vm3# truncate -s +1G ./guest-bvm4.img root@kg-vm3# ll -h ./guest-bvm4.img -rw-r--r-- 1 root wheel 5.0G Apr 14 20:50 ./guest-bvm4.img
2024-03-23: ada0p2 - reboot, FreeBSD 13.2-release-p10 is in
root@kg-vm3# freebsd-version -ku 13.2-RELEASE-p10 13.2-RELEASE-p10
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 13.2-RELEASE-p10 FreeBSD 13.2-RELEASE-p10 GENERIC amd64
2024-03-23: ada0p2 - pkg - upgrade
Mar 23 16:39:42 kg-vm3 pkg[11623]: gettext-runtime upgraded: 0.22_1 -> 0.22.3 Mar 23 16:40:05 kg-vm3 pkg[11623]: perl5 upgraded: 5.34.3_3 -> 5.36.3_1 Mar 23 16:40:06 kg-vm3 pkg[11623]: libnghttp2 upgraded: 1.57.0 -> 1.58.0 Mar 23 16:40:06 kg-vm3 pkg[11623]: p5-Locale-gettext reinstalled: 1.07 -> 1.07 Mar 23 16:40:06 kg-vm3 pkg[11623]: libtextstyle upgraded: 0.22 -> 0.22.3 Mar 23 16:40:06 kg-vm3 pkg[11623]: libpsl upgraded: 0.21.2_3 -> 0.21.2_4 Mar 23 16:40:06 kg-vm3 pkg[11623]: autoconf reinstalled: 2.71 -> 2.71 Mar 23 16:40:07 kg-vm3 pkg[11623]: libedit upgraded: 3.1.20221030,1 -> 3.1.20230828,1 Mar 23 16:40:07 kg-vm3 pkg[11623]: automake reinstalled: 1.16.5 -> 1.16.5 Mar 23 16:40:07 kg-vm3 pkg[11623]: libunwind upgraded: 20211201_2 -> 20230730 Mar 23 16:40:08 kg-vm3 pkg[11623]: readline upgraded: 8.2.1 -> 8.2.7 Mar 23 16:40:09 kg-vm3 pkg[11623]: sudo upgraded: 1.9.15p4 -> 1.9.15p5 Mar 23 16:40:10 kg-vm3 pkg[11623]: curl upgraded: 8.5.0 -> 8.6.0 Mar 23 16:40:11 kg-vm3 pkg[11623]: help2man reinstalled: 1.49.3 -> 1.49.3 Mar 23 16:40:11 kg-vm3 pkg[11623]: pkgconf upgraded: 2.0.3,1 -> 2.0.3_1,1 Mar 23 16:40:15 kg-vm3 pkg[11623]: gettext-tools upgraded: 0.22 -> 0.22.3 Mar 23 16:40:15 kg-vm3 pkg[11623]: utf8proc upgraded: 2.8.0 -> 2.9.0 Mar 23 16:40:44 kg-vm3 pkg[11623]: ca_root_nss upgraded: 3.93 -> 3.93_2
2024-03-23: ada0p2 - freebsd-update fetch
root@kg-vm3# freebsd-update fetch src component not installed, skipped [..] The following files will be updated as part of updating to 13.2-RELEASE-p10: [..] /var/db/etcupdate/current/etc/defaults/rc.conf /var/db/etcupdate/current/etc/periodic/daily/480.leapfile-ntpd /var/db/mergemaster.mtree
install
root@kg-vm3# 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: 1123. Performing sanity check on sshd configuration. Starting sshd. Scanning //usr/share/certs/blacklisted for certificates... Scanning //usr/share/certs/trusted for certificates... Scanning //usr/local/share/certs for certificates... done.
2023-12-28: ada0p2 - pkg - upgrade
Dec 28 22:53:03 kg-vm3 pkg[2973]: pkg upgraded: 1.19.2 -> 1.20.9 Dec 28 22:53:50 kg-vm3 pkg[2994]: gettext-runtime upgraded: 0.21.1 -> 0.22_1 Dec 28 22:54:19 kg-vm3 pkg[2994]: perl5 upgraded: 5.32.1_3 -> 5.34.3_3 Dec 28 22:54:19 kg-vm3 pkg[2994]: libnghttp2 upgraded: 1.53.0 -> 1.57.0 Dec 28 22:54:19 kg-vm3 pkg[2994]: p5-Locale-gettext reinstalled: 1.07 -> 1.07 Dec 28 22:54:19 kg-vm3 pkg[2994]: ruby31-bdb upgraded: 0.6.6_8 -> 0.6.6_9 Dec 28 22:54:19 kg-vm3 pkg[2994]: libtextstyle upgraded: 0.21.1 -> 0.22 Dec 28 22:54:20 kg-vm3 pkg[2994]: autoconf reinstalled: 2.71 -> 2.71 Dec 28 22:54:39 kg-vm3 pkg[2994]: python39 upgraded: 3.9.17 -> 3.9.18 Dec 28 22:54:39 kg-vm3 pkg[2994]: automake reinstalled: 1.16.5 -> 1.16.5 Dec 28 22:54:41 kg-vm3 pkg[2994]: sudo upgraded: 1.9.14 -> 1.9.15p4 Dec 28 22:54:43 kg-vm3 pkg[2994]: curl upgraded: 8.1.2 -> 8.5.0 Dec 28 22:54:43 kg-vm3 pkg[2994]: help2man reinstalled: 1.49.3 -> 1.49.3 Dec 28 22:54:43 kg-vm3 pkg[2994]: pkgconf upgraded: 1.8.1,1 -> 2.0.3,1 Dec 28 22:54:50 kg-vm3 pkg[2994]: gettext-tools upgraded: 0.21.1 -> 0.22 Dec 28 22:54:50 kg-vm3 pkg[2994]: ca_root_nss upgraded: 3.89.1 -> 3.93 Dec 28 22:54:51 kg-vm3 pkg[2994]: portupgrade upgraded: 2.4.16,2 -> 2.4.16_1,2
2023-12-28: ada0p2 - reboot (I manually shut down all the vms before rebooting the server), FreeBSD 13.2-release-p9 is in
root@kg-vm3# freebsd-version -ku 13.2-RELEASE-p8 13.2-RELEASE-p9
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 13.2-RELEASE-p8 FreeBSD 13.2-RELEASE-p8 GENERIC amd64
2023-12-28: ada0p2 - freebsd-update fetch
root@kg-vm3# freebsd-update fetch src component not installed, skipped [..] 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: [..] /usr/sbin/sshd /usr/share/man/man1/ssh-agent.1.gz /usr/share/man/man5/sshd_config.5.gz /var/db/etcupdate/current/etc/ssh/sshd_config /var/db/mergemaster.mtree
install
root@kg-vm3# 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: 1110. Performing sanity check on sshd configuration. Starting sshd. Scanning //usr/share/certs/blacklisted for certificates... Scanning //usr/share/certs/trusted for certificates... Scanning //usr/local/share/certs for certificates... done.
2023-07-15: ada0p2 - vm - install FreeBSD 13.2-release on 'wiki3'
root@kg-vm3# vm install wiki3 FreeBSD-13.2-RELEASE-amd64-disc1.iso Starting wiki3 * found guest in /zs/vms/wiki3 * booting...
followed by
root@kg-vm3# vm console wiki3 [..]
then do the install in the normal way.
2023-07-15: ada0p2 - vm - create a new vm with 2 cpus, 1408M memory and 13 G disk
root@kg-vm3# vm create -c 2 -m 1408M -s 13G wiki3
and it shows up in 'vm list' output. Check what iso's we have
root@kg-vm3# vm iso DATASTORE FILENAME default FreeBSD-11.4-RELEASE-amd64-disc1.iso default FreeBSD-13.2-RELEASE-amd64-disc1.iso
2023-07-15: ada0p2 - vm - get an iso of FreeBSD 13.2
root@kg-vm3# vm iso https://download.freebsd.org/releases/ISO-IMAGES/13.2/FreeBSD-13.2-RELEASE-amd64-disc1.iso /zs/vms/.iso/FreeBSD-13.2-RELEASE-amd64-disc1. 1022 MB 13 MBps 01m15s
do a manual sha check
tingo@kg-vm3$ sha512 -c cd773814a95405868f31be40e44739a497043601e668b82bc54f73e9e5252743ec75fdbc884e903ffd9d511495a7205f5e5fada4333852b3e16407ff77cb63d0 /zs/vms/.iso/FreeBSD-13.2-RELEASE-amd64-disc1.iso SHA512 (/zs/vms/.iso/FreeBSD-13.2-RELEASE-amd64-disc1.iso) = cd773814a95405868f31be40e44739a497043601e668b82bc54f73e9e5252743ec75fdbc884e903ffd9d511495a7205f5e5fada4333852b3e16407ff77cb63d0
good.
2023-07-09: ada0p2 - vms - I copied back the disk of web2, since that was the only vm I had updated while they were at the temporary home. Got all vms started, and '/etc/rc.conf.local' updated
root@kg-vm3# vm list NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE music3 default bhyveload 1 768M - Yes [4] Running (3286) proxy default bhyveload 2 1024M - Yes [5] Running (2045) trap2 default bhyveload 1 256M - Yes [1] Running (2352) tv default bhyveload 2 1536M - No Stopped web default bhyveload 2 1280M - Yes [2] Running (2775) web2 default bhyveload 2 2048M - Yes [3] Running (3813) wiki default bhyveload 2 1024M - No Stopped wiki2 default bhyveload 2 1408M - Yes [6] Running (1585)
testing that all vms come up in proper order when the host is rebooted remains.
2023-07-09: ada0p2 - reboot, FreeBSD 13.2-release-p1 is in
root@kg-vm3# freebsd-version -ku 13.2-RELEASE-p1 13.2-RELEASE-p1
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 13.2-RELEASE-p1 FreeBSD 13.2-RELEASE-p1 GENERIC amd64
2023-07-09: ada0p2 - freebsd-update run the final step
root@kg-vm3# 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.
2023-07-09: ada0p2 - pkg - upgrade
root@kg-vm3# pkg upgrade pkg pkg: Warning: Major OS version upgrade detected. Running "pkg bootstrap -f" recommended Updating FreeBSD repository catalogue... Fetching meta.conf: 100% 163 B 0.2kB/s 00:01 Fetching packagesite.txz: 100% 7 MiB 7.0MB/s 00:01 Processing entries: 100% FreeBSD repository update completed. 33778 packages processed. All repositories are up to date. New version of pkg detected; it needs to be installed first. The following 1 package(s) will be affected (of 0 checked): Installed packages to be UPGRADED: pkg: 1.16.3 -> 1.19.2 Number of packages to be upgraded: 1 The process will require 19 MiB more space. 8 MiB to be downloaded. Proceed with this action? [y/N]: n
do that instead
root@kg-vm3# pkg bootstrap -f The package management tool is not yet installed on your system. Do you want to fetch and install it now? [y/N]: y Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly, please wait... Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done Installing pkg-1.19.2... package pkg is already installed, forced install Extracting pkg-1.19.2: 100%
pkg - upgrade
Jul 9 00:07:06 kg-vm3 pkg[49740]: indexinfo reinstalled: 0.3.1 -> 0.3.1 Jul 9 00:07:27 kg-vm3 pkg[49740]: perl5 upgraded: 5.32.1_1 -> 5.32.1_3 Jul 9 00:07:28 kg-vm3 pkg[49740]: gettext-runtime upgraded: 0.21 -> 0.21.1 Jul 9 00:07:28 kg-vm3 pkg[49740]: libedit upgraded: 3.1.20210216,1 -> 3.1.20221030,1 Jul 9 00:07:28 kg-vm3 pkg[49740]: libyaml reinstalled: 0.2.5 -> 0.2.5 Jul 9 00:07:28 kg-vm3 pkg[49740]: libunwind upgraded: 20201110 -> 20211201_2 Jul 9 00:07:28 kg-vm3 pkg[49740]: libffi upgraded: 3.3_1 -> 3.4.4 Jul 9 00:07:28 kg-vm3 pkg[49740]: autoconf-wrapper-20131203 deinstalled Jul 9 00:07:29 kg-vm3 pkg[49740]: m4 upgraded: 1.4.18_1,1 -> 1.4.19,1 Jul 9 00:07:52 kg-vm3 pkg[49740]: ruby upgraded: 2.7.3_2,1 -> 3.1.4_1,1 Jul 9 00:07:53 kg-vm3 pkg[49740]: libunistring-1.1 installed Jul 9 00:07:59 kg-vm3 pkg[49740]: db5 upgraded: 5.3.28_7 -> 5.3.28_9 Jul 9 00:08:00 kg-vm3 pkg[49740]: libidn2-2.3.4 installed Jul 9 00:08:00 kg-vm3 pkg[49740]: autoconf-switch-20220527 installed Jul 9 00:08:00 kg-vm3 pkg[49740]: ruby27-bdb-0.6.6_8 deinstalled Jul 9 00:08:00 kg-vm3 pkg[49740]: libnghttp2 upgraded: 1.43.0 -> 1.53.0 Jul 9 00:08:00 kg-vm3 pkg[49740]: mpdecimal reinstalled: 2.5.1 -> 2.5.1 Jul 9 00:08:00 kg-vm3 pkg[49740]: p5-Locale-gettext reinstalled: 1.07 -> 1.07 Jul 9 00:08:00 kg-vm3 pkg[49740]: ruby31-bdb-0.6.6_8 installed Jul 9 00:08:01 kg-vm3 pkg[49740]: libtextstyle upgraded: 0.21 -> 0.21.1 Jul 9 00:08:01 kg-vm3 pkg[49740]: readline upgraded: 8.1.1 -> 8.2.1 Jul 9 00:08:01 kg-vm3 pkg[49740]: libssh2-1.11.0,3 installed Jul 9 00:08:02 kg-vm3 pkg[49740]: libpsl-0.21.2_3 installed Jul 9 00:08:02 kg-vm3 pkg[49740]: ca_root_nss upgraded: 3.63 -> 3.89.1 Jul 9 00:08:02 kg-vm3 pkg[49740]: libevent reinstalled: 2.1.12 -> 2.1.12 Jul 9 00:08:02 kg-vm3 pkg[49740]: autoconf upgraded: 2.69_3 -> 2.71 Jul 9 00:08:03 kg-vm3 pkg[49740]: libtool upgraded: 2.4.6_1 -> 2.4.7_1 Jul 9 00:08:19 kg-vm3 pkg[49740]: python39 upgraded: 3.9.7 -> 3.9.17 Jul 9 00:08:19 kg-vm3 pkg[49740]: automake upgraded: 1.16.3 -> 1.16.5 Jul 9 00:08:19 kg-vm3 pkg[49740]: dialog4ports upgraded: 0.1.6 -> 0.1.6_1 Jul 9 00:08:19 kg-vm3 pkg[49740]: gmake reinstalled: 4.3_2 -> 4.3_2 Jul 9 00:08:20 kg-vm3 pkg[49740]: libffi321 upgraded: 3.2.1_2 -> 3.2.1_3 Jul 9 00:08:20 kg-vm3 pkg[49740]: sudo upgraded: 1.9.8 -> 1.9.14 Jul 9 00:08:22 kg-vm3 pkg[49740]: curl upgraded: 7.78.0 -> 8.1.2 Jul 9 00:08:22 kg-vm3 pkg[49740]: help2man upgraded: 1.48.3 -> 1.49.3 Jul 9 00:08:22 kg-vm3 pkg[49740]: pkgconf upgraded: 1.7.4,1 -> 1.8.1,1 Jul 9 00:08:26 kg-vm3 pkg[49740]: gettext-tools upgraded: 0.21 -> 0.21.1 Jul 9 00:08:26 kg-vm3 pkg[49740]: utf8proc upgraded: 2.6.1 -> 2.8.0 Jul 9 00:08:26 kg-vm3 pkg[49740]: vm-bhyve upgraded: 1.4.2 -> 1.5.0 Jul 9 00:08:26 kg-vm3 pkg[49740]: tmux upgraded: 3.2a -> 3.3a_1 Jul 9 00:08:26 kg-vm3 pkg[49740]: portupgrade reinstalled: 2.4.16,2 -> 2.4.16,2
2023-07-08: ada0p2 - freebsd-update upgrade
root@kg-vm3# freebsd-update -r 13.2-RELEASE upgrade src component not installed, skipped Looking up update.FreeBSD.org mirrors... 2 mirrors found. Fetching metadata signature for 11.4-RELEASE from update1.freebsd.org... done. Fetching metadata index... done. Fetching 1 metadata patches. done. Applying metadata patches... done. Inspecting system... done. The following components of FreeBSD seem to be installed: kernel/generic world/base world/lib32 The following components of FreeBSD do not seem to be installed: kernel/generic-dbg world/base-dbg world/doc world/lib32-dbg Does this look reasonable (y/n)? y [..] Applying patches... done. Fetching 11266 files... done. Attempting to automatically merge changes in files... done. The following file could not be merged automatically: /etc/ntp.conf The following files will be removed as part of updating to 13.2-RELEASE-p1: The following files will be added as part of updating to 13.2-RELEASE-p1: The following files will be updated as part of updating to 13.2-RELEASE-p1: /var/db/ntp /var/db/services.db /var/yp/Makefile.dist To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
install
root@kg-vm3# 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@kg-vm3# freebsd-update install src component not installed, skipped Installing updates...Scanning //usr/share/certs/blacklisted for certificates... Scanning //usr/share/certs/trusted for certificates... Scanning //usr/local/share/certs for certificates... 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.
2023-07-08: ada0p2 - before upgrade
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 11.4-RELEASE-p9 FreeBSD 11.4-RELEASE-p9 #0: Tue Apr 6 09:27:45 UTC 2021 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
status
root@kg-vm3# date;temp;swapinfo -h;echo " ";tvlm;echo " ";tvls;echo " ";df -h;echo " ";uptime;echo " ";ps ax | grep -v grep | grep ddc;ps ax | grep -v grep | grep smartd;ps ax | grep -v grep | grep natd;echo "bhyve vms:";tmux ls Sat Jul 8 22:51:44 CEST 2023 dev.cpu.0.temperature: 59.0C dev.cpu.1.temperature: 68.0C Device 1K-blocks Used Avail Capacity /dev/ada0p3 3974068 0B 3.8G 0% Jul 8 20:03:55 kg-vm3 kernel: tap3: link state changed to DOWN Jul 8 22:13:24 kg-vm3 kernel: tap5: link state changed to DOWN Jul 8 22:13:25 kg-vm3 kernel: re0: link state changed to DOWN Jul 8 22:13:25 kg-vm3 kernel: vm-public: link state changed to DOWN Jul 8 22:13:29 kg-vm3 kernel: re0: link state changed to UP Jul 8 22:13:29 kg-vm3 kernel: vm-public: link state changed to UP Jul 8 22:13:29 kg-vm3 dhclient: New IP Address (re0): 10.1.150.29 Jul 8 22:13:29 kg-vm3 dhclient: New Subnet Mask (re0): 255.255.0.0 Jul 8 22:13:29 kg-vm3 dhclient: New Broadcast Address (re0): 10.1.255.255 Jul 8 22:13:29 kg-vm3 dhclient: New Routers (re0): 10.1.10.1 Sep 19 01:35:25 kg-vm3 newsyslog[478]: logfile first created Filesystem Size Used Avail Capacity Mounted on /dev/ada0p2 105G 5.4G 91G 6% / devfs 1.0K 1.0K 0B 100% /dev /dev/da0p1 1.8T 128G 1.5T 8% /zs 10:51PM up 157 days, 11:12, 3 users, load averages: 0.10, 0.11, 0.31 bhyve vms: no server running on /tmp/tmux-0/default
2023-07-08: ada0p2 - vms - temporarily moved all the vms to a different machie, so I can upgrade this one. For now
root@kg-vm3# vm list NAME DATASTORE LOADER CPU MEMORY VNC AUTOSTART STATE music3 default bhyveload 1 768M - No Stopped proxy default bhyveload 2 1024M - No Stopped trap2 default bhyveload 1 256M - No Stopped tv default bhyveload 2 1536M - No Stopped web default bhyveload 2 1280M - No Stopped web2 default bhyveload 2 2048M - No Stopped wiki default bhyveload 2 1024M - No Stopped wiki2 default bhyveload 2 1408M - No Stopped
2021-10-22: ada0p2 - pkg - install Python 3.9
Oct 22 21:37:43 kg-vm3 pkg: mpdecimal-2.5.1 installed Oct 22 21:37:44 kg-vm3 pkg: readline-8.1.1 installed Oct 22 21:37:59 kg-vm3 pkg: python39-3.9.7 installed
2021-10-22: ada0p2 - reboot, FreeBSD 11.4-release-p13 is in
root@kg-vm3# freebsd-version -ku 11.4-RELEASE-p9 11.4-RELEASE-p13
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 11.4-RELEASE-p9 FreeBSD 11.4-RELEASE-p9 #0: Tue Apr 6 09:27:45 UTC 2021 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
2021-10-22: ada0p2 - pkg - upgrade
Oct 22 20:09:17 kg-vm3 pkg: tmux upgraded: 3.1c -> 3.2a Oct 22 20:09:18 kg-vm3 pkg: sudo upgraded: 1.9.6p1 -> 1.9.8 Oct 22 20:09:44 kg-vm3 pkg: ruby upgraded: 2.7.3,1 -> 2.7.3_2,1 Oct 22 20:09:44 kg-vm3 pkg: help2man upgraded: 1.48.1 -> 1.48.3 Oct 22 20:09:46 kg-vm3 pkg: curl upgraded: 7.75.0 -> 7.78.0
2021-10-22: ada0p2 - freebsd-update fetch
root@kg-vm3# freebsd-update fetch [..] The following files will be updated as part of updating to 11.4-RELEASE-p13: [..] WARNING: FreeBSD 11.4-RELEASE-p5 HAS PASSED ITS END-OF-LIFE DATE. Any security issues discovered after Thu Sep 30 02:00:00 CEST 2021 will not have been corrected.
install
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates...Scanning //usr/share/certs/blacklisted for certificates... Scanning //usr/share/certs/trusted for certificates... Scanning //usr/local/share/certs for certificates... done.
2021-04-20: ada0p2 - pkg - upgrade
Apr 20 13:04:33 kg-vm3 pkg: libunwind upgraded: 20200331_1 -> 20201110 Apr 20 13:04:33 kg-vm3 pkg: libnghttp2 upgraded: 1.42.0 -> 1.43.0 Apr 20 13:04:34 kg-vm3 pkg: libedit upgraded: 3.1.20191231,1 -> 3.1.20210216,1 Apr 20 13:04:34 kg-vm3 pkg: ca_root_nss upgraded: 3.58 -> 3.63 Apr 20 13:04:35 kg-vm3 pkg: sudo upgraded: 1.9.5p2 -> 1.9.6p1 Apr 20 13:05:01 kg-vm3 pkg: ruby upgraded: 2.7.2_1,1 -> 2.7.3,1 Apr 20 13:05:01 kg-vm3 pkg: pkgconf upgraded: 1.7.3,1 -> 1.7.4,1 Apr 20 13:05:02 kg-vm3 pkg: help2man upgraded: 1.47.16 -> 1.48.1 Apr 20 13:05:03 kg-vm3 pkg: curl upgraded: 7.74.0 -> 7.75.0
ok
2021-03-04: ada0p2 - pkg - upgrade pkg
Mar 4 18:58:44 kg-vm3 pkg: pkg upgraded: 1.16.1 -> 1.16.3
ok
2021-01-30: ada0p2 - reboot - due to user error.
2021-01-30: ada0p2 - pkg - remove old packages
Jan 30 16:24:18 kg-vm3 pkg: ruby26-2.6.6_2,1 deinstalled Jan 30 16:24:28 kg-vm3 pkg: ruby26-bdb-0.6.6_8 deinstalled Jan 30 16:24:47 kg-vm3 pkg: ruby25-2.5.8_2,1 deinstalled Jan 30 16:25:00 kg-vm3 pkg: ruby25-bdb-0.6.6_6 deinstalled
ok
2021-01-30: ada0p2 - pkg - upgrade
Jan 30 16:21:28 kg-vm3 pkg: ruby-2.7.2_1,1 installed Jan 30 16:21:35 kg-vm3 pkg: ruby-2.6.6_1,1 deinstalled Jan 30 16:21:36 kg-vm3 pkg: ruby27-bdb-0.6.6_8 installed Jan 30 16:21:36 kg-vm3 pkg: portupgrade reinstalled: 2.4.16,2 -> 2.4.16,2 Jan 30 16:21:58 kg-vm3 pkg: ruby26-2.6.6_2,1 installed Jan 30 16:22:41 kg-vm3 pkg: perl5 upgraded: 5.32.0 -> 5.32.1_1 Jan 30 16:22:41 kg-vm3 pkg: utf8proc upgraded: 2.5.0 -> 2.6.1 Jan 30 16:22:42 kg-vm3 pkg: sudo upgraded: 1.9.5p1 -> 1.9.5p2 Jan 30 16:22:42 kg-vm3 pkg: automake upgraded: 1.16.2 -> 1.16.3
ok
2021-01-30: ada0p2 - pkg - remove
Jan 30 16:17:12 kg-vm3 pkg: bhyve-rc-3 deinstalled
since I'm not using it anymore.
2021-01-18: ada0p2 - pkg - upgrade
Jan 18 17:32:39 kg-vm3 pkg: pkg upgraded: 1.15.10 -> 1.16.1 Jan 18 17:35:50 kg-vm3 pkg: sudo upgraded: 1.9.3p1 -> 1.9.5p1 Jan 18 17:36:12 kg-vm3 pkg: ruby25-2.5.8_2,1 installed Jan 18 17:37:36 kg-vm3 pkg: libnghttp2 upgraded: 1.41.0 -> 1.42.0 Jan 18 17:37:37 kg-vm3 pkg: curl upgraded: 7.72.0 -> 7.74.0 Jan 18 17:37:52 kg-vm3 pkg: tmux upgraded: 3.1b -> 3.1c
ok
2020-12-16: ada0p2 - after reboot, FreeBSD 11.4-release-p6 is in. dmesg output: normal, vebose.
root@kg-vm3# freebsd-version -ku 11.4-RELEASE-p5 11.4-RELEASE-p6
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 11.4-RELEASE-p5 FreeBSD 11.4-RELEASE-p5 #0: Tue Dec 1 11:46:55 UTC 2020 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
ok
2020-12-16: ada0p2 - freebsd-update upgrade
root@kg-vm3# freebsd-update -r 11.4-RELEASE upgrade src component not installed, skipped [..] The following components of FreeBSD seem to be installed: kernel/generic world/base world/lib32 The following components of FreeBSD do not seem to be installed: kernel/generic-dbg world/base-dbg world/doc world/lib32-dbg Does this look reasonable (y/n)? y [..] Fetching 325 files... done. Attempting to automatically merge changes in files... done. The following file could not be merged automatically: /etc/ntp.conf Press Enter to edit this file in /usr/bin/vi and resolve the conflicts manually... [..] The following files are affected by updates. No changes have been downloaded, however, because the files have been modified locally: /.profile /root/.profile [..] The following files will be removed as part of updating to 11.4-RELEASE-p6: The following files will be added as part of updating to 11.4-RELEASE-p6: The following files will be updated as part of updating to 11.4-RELEASE-p6: [..] To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
install
root@kg-vm3# 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.
ok
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates... done.
done. Now stop all the vms and do a final reboot, just for the heck of it.
2020-12-07: ada0p2 - pkg - upgrade
Dec 7 21:35:37 kg-vm3 pkg: pkg upgraded: 1.14.6 -> 1.15.10 Dec 7 21:37:10 kg-vm3 pkg: ca_root_nss upgraded: 3.56 -> 3.58 Dec 7 21:37:25 kg-vm3 pkg: gettext-runtime upgraded: 0.20.2 -> 0.21 Dec 7 21:37:39 kg-vm3 pkg: libtextstyle upgraded: 0.20.2 -> 0.21 Dec 7 21:37:43 kg-vm3 pkg: gettext-tools upgraded: 0.20.2 -> 0.21 Dec 7 21:38:27 kg-vm3 pkg: perl5 upgraded: 5.30.3 -> 5.32.0 Dec 7 21:39:06 kg-vm3 pkg: p5-Locale-gettext reinstalled: 1.07 -> 1.07 Dec 7 21:39:29 kg-vm3 pkg: sudo upgraded: 1.9.2 -> 1.9.3p1 Dec 7 21:39:45 kg-vm3 pkg: libffi upgraded: 3.2.1_3 -> 3.3_1 Dec 7 21:40:11 kg-vm3 pkg: ruby upgraded: 2.6.6,1 -> 2.6.6_1,1 Dec 7 21:40:11 kg-vm3 pkg: libffi321-3.2.1_2 installed Dec 7 21:40:30 kg-vm3 pkg: help2man upgraded: 1.47.15 -> 1.47.16 Dec 7 21:40:52 kg-vm3 pkg: ruby25-2.5.8,1 deinstalled
and ruby25 was removed - not needed anymore.
2020-09-13: ada0p2 - reboot, FreeBSD 11.3-release-p13 is in
root@kg-vm3# freebsd-version -ku 11.3-RELEASE-p13 11.3-RELEASE-p13
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 11.3-RELEASE-p13 FreeBSD 11.3-RELEASE-p13 #0: Tue Sep 1 06:56:51 UTC 2020 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
ok
2020-09-13: ada0p2 - freebsd-update fetch
root@kg-vm3# freebsd-update fetch [..] The following files will be removed as part of updating to 11.3-RELEASE-p13: /usr/sbin/unbound /usr/sbin/unbound-anchor /usr/sbin/unbound-checkconf /usr/sbin/unbound-control /usr/share/man/man5/unbound.conf.5.gz /usr/share/man/man8/unbound-anchor.8.gz /usr/share/man/man8/unbound-checkconf.8.gz /usr/share/man/man8/unbound-control.8.gz /usr/share/man/man8/unbound.8.gz The following files will be added as part of updating to 11.3-RELEASE-p13: /usr/lib/debug/usr/sbin/local-unbound-anchor.debug /usr/lib/debug/usr/sbin/local-unbound-checkconf.debug /usr/lib/debug/usr/sbin/local-unbound-control.debug /usr/lib/debug/usr/sbin/local-unbound.debug /usr/sbin/local-unbound-anchor /usr/sbin/local-unbound-checkconf /usr/sbin/local-unbound-control /usr/share/man/man5/local-unbound.conf.5.gz /usr/share/man/man8/local-unbound-anchor.8.gz /usr/share/man/man8/local-unbound-checkconf.8.gz /usr/share/man/man8/local-unbound-control.8.gz /usr/share/man/man8/local-unbound.8.gz The following files will be updated as part of updating to 11.3-RELEASE-p13: /bin/freebsd-version /boot/kernel/if_smsc.ko /boot/kernel/kernel /boot/kernel/linux_common.ko /boot/kernel/linuxkpi.ko /boot/kernel/mps.ko /etc/rc.d/local_unbound [..] /var/db/mergemaster.mtree WARNING: FreeBSD 11.3-RELEASE-p10 is approaching its End-of-Life date. It is strongly recommended that you upgrade to a newer release within the next 2 weeks.
install
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates...install: ///usr/lib/debug/usr/sbin/local-unbound-anchor.debug: No such file or directory install: ///usr/lib/debug/usr/sbin/local-unbound-checkconf.debug: No such file or directory install: ///usr/lib/debug/usr/sbin/local-unbound-control.debug: No such file or directory install: ///usr/lib/debug/usr/sbin/local-unbound.debug: No such file or directory done.
only reboot remains.
2020-09-07: ada0p2 - pkg - upgrade
Sep 7 19:43:17 kg-vm3 pkg: libyaml upgraded: 0.2.2 -> 0.2.5 Sep 7 19:43:17 kg-vm3 pkg: libunwind upgraded: 20170615 -> 20200331_1 Sep 7 19:43:17 kg-vm3 pkg: libedit upgraded: 3.1.20191211,1 -> 3.1.20191231,1 Sep 7 19:43:45 kg-vm3 pkg: ruby upgraded: 2.6.5,1 -> 2.6.6,1 Sep 7 19:43:45 kg-vm3 pkg: libtextstyle upgraded: 0.20.1 -> 0.20.2 Sep 7 19:43:46 kg-vm3 pkg: ca_root_nss upgraded: 3.54 -> 3.56 Sep 7 19:43:46 kg-vm3 pkg: utf8proc upgraded: 2.4.0 -> 2.5.0 Sep 7 19:43:46 kg-vm3 pkg: sudo upgraded: 1.9.1 -> 1.9.2 Sep 7 19:43:47 kg-vm3 pkg: ruby26-bdb upgraded: 0.6.6_7 -> 0.6.6_8 Sep 7 19:44:15 kg-vm3 pkg: ruby25 upgraded: 2.5.7,1 -> 2.5.8,1 Sep 7 19:44:15 kg-vm3 pkg: libevent upgraded: 2.1.11_1 -> 2.1.12 Sep 7 19:44:16 kg-vm3 pkg: help2man upgraded: 1.47.13 -> 1.47.15 Sep 7 19:44:16 kg-vm3 pkg: gmake upgraded: 4.2.1_3 -> 4.3_2 Sep 7 19:44:20 kg-vm3 pkg: gettext-tools upgraded: 0.20.1_1 -> 0.20.2 Sep 7 19:44:22 kg-vm3 pkg: curl upgraded: 7.71.0 -> 7.72.0 Sep 7 19:44:22 kg-vm3 pkg: automake upgraded: 1.16.1_2 -> 1.16.2
ok
2020-07-19: ada0p2 - vm - install FreeBSD 11.4 on the vm 'proxy'
root@kg-vm3# vm install proxy FreeBSD-11.4-RELEASE-amd64-disc1.iso Starting proxy * found guest in /zs/vms/proxy * booting...
followed by
root@kg-vm3# vm console proxy
(do the install the usual way). Finished:
root@kg-vm3# vm info proxy ------------------------ Virtual Machine: proxy ------------------------ state: running (89210) datastore: default loader: bhyveload uuid: abeefa3f-c9b4-11ea-96a2-600292b5cd2c uefi: default cpu: 2 memory: 1024M memory-resident: 145133568 (138.410M) console-ports com1: tmux/proxy network-interface number: 0 emulation: virtio-net virtual-switch: public fixed-mac-address: 58:9c:fc:04:99:e3 fixed-device: - active-device: tap5 desc: vmnet-proxy-0-public mtu: 1500 bridge: vm-public bytes-in: 491227 (479.713K) bytes-out: 7284 (7.113K) virtual-disk number: 0 device-type: file emulation: virtio-blk options: - system-path: /zs/vms/proxy/disk0.img bytes-size: 4294967296 (4.000G) bytes-used: 1125253120 (1.047G)
ok.
2020-07-19: ada0p2 - vm - create a new vm with 2 cpus, 1024M memory and 4G disk
root@kg-vm3# vm create -m 1024M -c 2 -s 4G proxy
verify
root@kg-vm3# vm list NAME DATASTORE LOADER CPU MEMORY VNC AUTOSTART STATE music3 default bhyveload 1 512M - Yes [3] Running (1831) proxy default bhyveload 2 1024M - No Stopped trap2 default bhyveload 1 256M - Yes [1] Running (1124) tv default bhyveload 2 1536M - Yes [5] Running (2172) web default bhyveload 2 1280M - Yes [2] Running (1383) wiki default bhyveload 2 1024M - No Stopped wiki2 default bhyveload 2 1024M - Yes [4] Running (71683)
ok
2020-07-19: ada0p2 - vm - get an iso of FreeBSD 11.4:
root@kg-vm3# vm iso https://download.freebsd.org/ftp/releases/ISO-IMAGES/11.4/FreeBSD-11.4-RELEASE-amd64-disc1.iso /zs/vms/.iso/FreeBSD-11.4-RELEASE-amd64-disc1. 715 MB 27 MBps 26s
check what it got
root@kg-vm3# ll /zs/vms/.iso/ total 732488 drwxr-xr-x 2 root wheel 512 Jul 19 13:07 ./ drwxr-xr-x 13 root wheel 512 Jun 21 15:55 ../ -rw-r--r-- 1 root wheel 749811712 Jun 12 20:39 FreeBSD-11.4-RELEASE-amd64-disc1.iso
so, no SHAxxx checking, hmm,
tingo@kg-vm3$ sha512 -c 473b35bf7835de4adf57603fdfee90f87742c57f885de2b282952b121fc84404432c77c804028b42576482e3c76183f224985b0292b9f69302186f03fdad919d /zs/vms/.iso/FreeBSD-11.4-RELEASE-amd64-disc1.iso SHA512 (/zs/vms/.iso/FreeBSD-11.4-RELEASE-amd64-disc1.iso) = 473b35bf7835de4adf57603fdfee90f87742c57f885de2b282952b121fc84404432c77c804028b42576482e3c76183f224985b0292b9f69302186f03fdad919d
manually checked. what happens if I try a random string?
tingo@kg-vm3$ sha512 -c 473b35bf7835de4adf57603fdfee90f87742c57f885de2b282952 /zs/vms/.iso/FreeBSD-11.4-RELEASE-amd64-disc1.iso SHA512 (/zs/vms/.iso/FreeBSD-11.4-RELEASE-amd64-disc1.iso) = 473b35bf7835de4adf57603fdfee90f87742c57f885de2b282952b121fc84404432c77c804028b42576482e3c76183f224985b0292b9f69302186f03fdad919d [ Failed ]
ok, cool.
2020-07-14: ada0p2 - if I restart a vm, tmux works again
root@kg-vm3# tmux ls wiki2: 1 windows (created Tue Jul 14 13:02:50 2020) root@kg-vm3# vm list NAME DATASTORE LOADER CPU MEMORY VNC AUTOSTART STATE music3 default bhyveload 1 512M - Yes [3] Running (1831) trap2 default bhyveload 1 256M - Yes [1] Running (1124) tv default bhyveload 2 1536M - Yes [5] Running (2172) web default bhyveload 2 1280M - Yes [2] Running (1383) wiki default bhyveload 2 1024M - No Stopped wiki2 default bhyveload 2 1024M - Yes [4] Running (71683)
good enough
2020-07-14: ada0p2 - tmux - and now I get this:
root@kg-vm3# tmux ls server version is too old for client server version is too old for client server version is too old for client server version is too old for client server version is too old for client
version
root@kg-vm3# tmux -V tmux 3.1b
I can do this
root@kg-vm3# tmux kill-server root@kg-vm3# tmux ls no server running on /tmp/tmux-0/default root@kg-vm3# tmux start-server root@kg-vm3# tmux ls no server running on /tmp/tmux-0/default
but then all my tmux sessions are lost. Hrm.
2020-07-11: ada0p2 - pkg - upgrade
Jul 11 12:53:47 kg-vm3 pkg: pkg upgraded: 1.13.2_1 -> 1.14.6 Jul 11 12:54:12 kg-vm3 pkg: pkgconf upgraded: 1.6.3,1 -> 1.7.3,1 Jul 11 12:54:25 kg-vm3 pkg: ca_root_nss upgraded: 3.53 -> 3.54 Jul 11 12:54:37 kg-vm3 pkg: curl upgraded: 7.69.1 -> 7.71.0 Jul 11 12:55:05 kg-vm3 pkg: gettext-runtime upgraded: 0.20.1 -> 0.20.2 Jul 11 12:55:06 kg-vm3 pkg: sudo upgraded: 1.8.31p1 -> 1.9.1 Jul 11 12:55:25 kg-vm3 pkg: libevent upgraded: 2.1.11 -> 2.1.11_1 Jul 11 12:55:25 kg-vm3 pkg: tmux upgraded: 3.0a_1 -> 3.1b
ok
2020-06-28: ada0p2 - pkg - upgrade
Jun 28 14:46:28 kg-vm3 pkg: pkg upgraded: 1.13.2 -> 1.13.2_1 Jun 28 14:46:45 kg-vm3 pkg: libnghttp2 upgraded: 1.40.0 -> 1.41.0
ok
2020-06-21: ada0p2 - reboot - FreeBSD 11.3-release-p10 is in
root@kg-vm3# freebsd-version -ku 11.3-RELEASE-p10 11.3-RELEASE-p10
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 11.3-RELEASE-p10 FreeBSD 11.3-RELEASE-p10 #0: Tue Jun 9 08:49:05 UTC 2020 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
ok. And the vms came up as expected
root@kg-vm3# vm list NAME DATASTORE LOADER CPU MEMORY VNC AUTOSTART STATE music3 default bhyveload 1 512M - Yes [3] Running (1831) trap2 default bhyveload 1 256M - Yes [1] Running (1124) tv default bhyveload 2 1536M - Yes [5] Running (2172) web default bhyveload 2 1280M - Yes [2] Running (1383) wiki default bhyveload 2 1024M - No Stopped wiki2 default bhyveload 2 1024M - Yes [4] Running (2077)
good
2020-06-21: ada0p2 - vm-bhyve, test the stopall command:
root@kg-vm3# vm stopall Beginning shutdown process * stopping tv * waiting 5 second(s) * stopping wiki2 * waiting 5 second(s) * stopping music3 * waiting 5 second(s) * stopping web * waiting 5 second(s) * stopping trap2 Waiting for PIDS: 13342 12591 10299.
and list
root@kg-vm3# vm list NAME DATASTORE LOADER CPU MEMORY VNC AUTOSTART STATE music3 default bhyveload 1 512M - Yes [3] Stopped trap2 default bhyveload 1 256M - Yes [1] Stopped tv default bhyveload 2 1536M - Yes [5] Stopped web default bhyveload 2 1280M - Yes [2] Stopped wiki default bhyveload 2 1024M - No Stopped wiki2 default bhyveload 2 1024M - Yes [4] Stopped
cool. Now, reboot the machine.
2020-06-21: ada0p2 - vm-bhyve, currently no vms are set to start on boot
root@kg-vm3# vm list NAME DATASTORE LOADER CPU MEMORY VNC AUTOSTART STATE music3 default bhyveload 1 512M - No Running (11953) trap2 default bhyveload 1 256M - No Running (10299) tv default bhyveload 2 1536M - No Running (9278) web default bhyveload 2 1280M - No Running (12591) wiki default bhyveload 2 1024M - No Stopped wiki2 default bhyveload 2 1024M - No Running (13342)
fix, by adding vm_delay and vm_list to /etc/rc.conf.local:
root@kg-vm3# grep ^vm /etc/rc.conf.local vm_enable="YES" vm_dir="/zs/vms" vm_delay="5" vm_list="trap2 web music3 wiki2 tv"
now
root@kg-vm3# vm list NAME DATASTORE LOADER CPU MEMORY VNC AUTOSTART STATE music3 default bhyveload 1 512M - Yes [3] Running (11953) trap2 default bhyveload 1 256M - Yes [1] Running (10299) tv default bhyveload 2 1536M - Yes [5] Running (9278) web default bhyveload 2 1280M - Yes [2] Running (12591) wiki default bhyveload 2 1024M - No Stopped wiki2 default bhyveload 2 1024M - Yes [4] Running (13342)
looks good.
2020-06-21: ada0p2 - freebsd-update fetch
root@kg-vm3# freebsd-update fetch [..] The following files will be removed as part of updating to 11.3-RELEASE-p10: /usr/share/zoneinfo/America/Godthab The following files will be added as part of updating to 11.3-RELEASE-p10: /usr/share/zoneinfo/America/Nuuk The following files will be updated as part of updating to 11.3-RELEASE-p10: [..] /usr/share/zoneinfo/Asia/Shanghai /usr/share/zoneinfo/zone.tab
install
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates... done.
ok
2020-06-21: ada0p2 - converted the needed vms to vm-bhyve:
root@kg-vm3# vm list NAME DATASTORE LOADER CPU MEMORY VNC AUTOSTART STATE music3 default bhyveload 1 512M - No Running (11953) trap2 default bhyveload 1 256M - No Running (10299) tv default bhyveload 2 1536M - No Running (9278) web default bhyveload 2 1280M - No Running (12591) wiki default bhyveload 2 1024M - No Running (8672) wiki2 default bhyveload 2 1024M - No Running (13342)
matching the old to the new
# bvm1 - generic test machine # bvm2 - wiki (old wiki) # bvm3 - tv (MythTV listings) # bvm4 - trap2 (loginhost) # bvm5 - music3 - m3 (music - Squeezebox server) # bvm6 - web - web server # bvm7 - wiki2 - new wiki
I haven't converted bvm1 yet
2020-06-21: ada0p2 - I shut down all the vm's, so that I can re-configure networking. First, comment out the old bhyve stuff from /etc/rc.conf
# network configuration for bhyve #cloned_interfaces="bridge0 tap0 tap1 tap2 tap3 tap4 tap5" #ifconfig_bridge0="addm re0 addm tap0 addm tap1 addm tap2 addm tap3 addm tap4 addm tap5" # enable bhyve - further configuration in rc.conf.local #bhyve_enable="YES"
next, remove bridge0 members
root@kg-vm3# ifconfig bridge0 deletem tap6 root@kg-vm3# ifconfig bridge0 deletem tap5 root@kg-vm3# ifconfig bridge0 deletem tap4 root@kg-vm3# ifconfig bridge0 deletem tap3 root@kg-vm3# ifconfig bridge0 deletem tap2 root@kg-vm3# ifconfig bridge0 deletem tap1 root@kg-vm3# ifconfig bridge0 deletem tap0 root@kg-vm3# ifconfig bridge0 deletem re0
now, see if I'm allowed to add re0 to the public switch
root@kg-vm3# vm switch list NAME TYPE IFACE ADDRESS PRIVATE MTU VLAN PORTS public standard vm-public - no - - - root@kg-vm3# vm switch add public re0 root@kg-vm3# vm switch list NAME TYPE IFACE ADDRESS PRIVATE MTU VLAN PORTS public standard vm-public - no - - re0
yes, that works.
2020-06-21: ada0p2 - configure vm-bhyve. First add necessary items to /etc/rc.conf.local:
root@kg-vm3# grep ^vm /etc/rc.conf.local vm_enable="YES" vm_dir="/zs/vms"
then do 'vm init'
root@kg-vm3# vm init
the "before" of the /zs/vms directory
root@kg-vm3# l /zs/vms ./ ../ bvm2/ bvm3/ bvm4/ bvm5/ bvm6/ bvm7/ vm1/
and the "after"
root@kg-vm3# l /zs/vms ./ .config/ .iso/ bvm2/ bvm4/ bvm6/ vm1/ ../ .img/ .templates/ bvm3/ bvm5/ bvm7/
Next up, create the public switch
root@kg-vm3# vm switch create public root@kg-vm3# vm switch list NAME TYPE IFACE ADDRESS PRIVATE MTU VLAN PORTS public standard vm-public - no - - -
and add the physical interface to it
root@kg-vm3# vm switch add public re0 /usr/local/sbin/vm: ERROR: failed to add member re0 to the virtual switch public root@kg-vm3# vm switch list NAME TYPE IFACE ADDRESS PRIVATE MTU VLAN PORTS public standard vm-public - no - - -
ok, that didn't work. Perhaps an interface can't be a member of two different bridges? Ah, yes, see comments in issue 292.
fix the console
root@kg-vm3# vm get console SETTING VALUE console - root@kg-vm3# vm set console=tmux root@kg-vm3# vm get console SETTING VALUE console tmux
check datastore
root@kg-vm3# vm datastore list NAME TYPE PATH ZFS DATASET default directory /zs/vms -
check version
root@kg-vm3# vm version vm-bhyve: Bhyve virtual machine management v1.4.2 (rev. 104002)
ok
2020-06-06: ada0p2 - pkg - upgrade
Jun 6 13:18:22 kg-vm3 pkg: ca_root_nss upgraded: 3.52 -> 3.53 Jun 6 13:19:07 kg-vm3 pkg: perl5 upgraded: 5.30.2 -> 5.30.3
ok
2020-05-17: ada0p2 - pkg - install vm-bhyve message
Message from vm-bhyve-1.4.2: -- To enable vm-bhyve, please add the following lines to rc.conf, depending on whether you are using ZFS storage or not. Please note that the directory or dataset specified should already exist. vm_enable="YES" vm_dir="zfs:pool/dataset" OR vm_enable="YES" vm_dir="/directory/path" Then run 'vm init'.
package
May 17 11:26:29 kg-vm3 pkg: vm-bhyve-1.4.2 installed
ok
2020-05-17: ada0p2 - pkg - upgrade
May 17 11:24:54 kg-vm3 pkg: ca_root_nss upgraded: 3.51.1 -> 3.52
ok.
2020-04-19: ada0p2 - pkg - install sudo
Apr 19 20:46:49 kg-vm3 pkg: sudo-1.8.31p1 installed Apr 19 20:47:13 kg-vm3 pkg: ruby25-2.5.7,1 installed
ok
2020-04-18: ada0p2 - set up a new machine bvm7 - 2 cpu, 1024M memory, 13G disk (use as new wiki) config
root@kg-vm3# grep bvm7 /etc/rc.conf.local # bvm7 - wiki2 - new wiki bhyve_profiles="bvm1 bvm2 bvm3 bvm4 bvm5 bvm6 bvm7" bhyve_bvm7_tapdev="tap6" bhyve_bvm7_diskdev="/zs/vms/bvm7/guest-bvm7.img" bhyve_bvm7_ncpu="2" bhyve_bvm7_memsize="1024"
creation
root@kg-vm3# cd /zs/vms root@kg-vm3# mkdir bvm7 root@kg-vm3# truncate -s 13G bvm7/guest-bvm7.img
create network interface and add to bridge
root@kg-vm3# ifconfig tap6 create root@kg-vm3# sysctl net.link.tap.up_on_open net.link.tap.up_on_open: 1 root@kg-vm3# ifconfig bridge0 addm tap6
install
root@kg-vm3# sh /usr/share/examples/bhyve/vmrun.sh -c 2 -t tap6 -d /zs/vms/bvm7/guest-bvm7.img -i -I /zs/tingo/dl/bsd/FreeBSD-11.3-RELEASE-amd64-disc1.iso bhyve_bvm7
select xterm, unselect lib32, ports, Guided disk setup, entire disk,gpt, 11G root and 2G swap. Network configuration DHCP, services sshd, ntpd, dumpdev. On exit, it reboots, just select "reboot" from the boot menu. start it
root@kg-vm3# service bhyve start bvm7 Starting bhyve.
check
root@kg-vm3# service bhyve status bvm7 bhyve_bvm7 is running.
connect via tmux
root@kg-vm3# tmux attach -t bhyve_bvm7
ok
2020-04-18: ada0p2 - pkg - upgrade
Apr 18 19:56:27 kg-vm3 pkg: pkg upgraded: 1.12.0 -> 1.13.2 Apr 18 19:58:58 kg-vm3 pkg: perl5 upgraded: 5.30.0 -> 5.30.2 Apr 18 19:58:58 kg-vm3 pkg: libnghttp2 upgraded: 1.39.2 -> 1.40.0 Apr 18 19:58:59 kg-vm3 pkg: ca_root_nss upgraded: 3.47.1 -> 3.51.1 Apr 18 19:58:59 kg-vm3 pkg: tmux upgraded: 2.9a_1 -> 3.0a_1 Apr 18 19:58:59 kg-vm3 pkg: libedit upgraded: 3.1.20190324,1 -> 3.1.20191211,1 Apr 18 19:58:59 kg-vm3 pkg: help2man upgraded: 1.47.11 -> 1.47.13 Apr 18 19:59:01 kg-vm3 pkg: curl upgraded: 7.66.0 -> 7.69.1
ok.
2019-11-25: ada0p2 - finally, a reboot, just because.
2019-11-25: ada0p2 - pkg - update, then upgrade
Nov 25 23:22:29 kg-vm3 pkg: pkg upgraded: 1.11.1 -> 1.12.0 Nov 25 23:24:18 kg-vm3 pkg: ruby upgraded: 2.5.5_2,1 -> 2.6.5,1 Nov 25 23:24:41 kg-vm3 pkg: perl5 upgraded: 5.28.2 -> 5.30.0 Nov 25 23:24:49 kg-vm3 pkg: db5 reinstalled: 5.3.28_7 -> 5.3.28_7 Nov 25 23:24:49 kg-vm3 pkg: p5-Locale-gettext reinstalled: 1.07 -> 1.07 Nov 25 23:24:49 kg-vm3 pkg: libnghttp2 upgraded: 1.39.1 -> 1.39.2 Nov 25 23:24:49 kg-vm3 pkg: libevent upgraded: 2.1.10 -> 2.1.11 Nov 25 23:24:49 kg-vm3 pkg: ca_root_nss upgraded: 3.45 -> 3.47.1 Nov 25 23:24:50 kg-vm3 pkg: autoconf upgraded: 2.69_2 -> 2.69_3 Nov 25 23:24:50 kg-vm3 pkg: ruby26-bdb-0.6.6_7 installed Nov 25 23:24:50 kg-vm3 pkg: tmux upgraded: 2.9a -> 2.9a_1 Nov 25 23:24:50 kg-vm3 pkg: portupgrade reinstalled: 2.4.16,2 -> 2.4.16,2 Nov 25 23:24:50 kg-vm3 pkg: pkgconf upgraded: 1.6.1,1 -> 1.6.3,1 Nov 25 23:24:51 kg-vm3 pkg: help2man upgraded: 1.47.10 -> 1.47.11 Nov 25 23:24:54 kg-vm3 pkg: gettext-tools upgraded: 0.20.1 -> 0.20.1_1 Nov 25 23:24:56 kg-vm3 pkg: curl upgraded: 7.65.1 -> 7.66.0 Nov 25 23:24:56 kg-vm3 pkg: automake upgraded: 1.16.1_1 -> 1.16.1_2
ok
2019-11-25: ada0p2 - reboot - FreeBSD 11.3-release-p5 is in
root@kg-vm3# freebsd-version -ku 11.3-RELEASE-p5 11.3-RELEASE-p5
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 11.3-RELEASE-p5 FreeBSD 11.3-RELEASE-p5 #0: Tue Nov 12 08:59:04 UTC 2019 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
ok
2019-11-25: ada0p2 - freebsd-update fetch
root@kg-vm3# freebsd-update fetch [..] The following files will be updated as part of updating to 11.3-RELEASE-p5: [..] /usr/share/zoneinfo/Pacific/Fiji /usr/share/zoneinfo/Pacific/Norfolk
install
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates... done.
ok
2019-11-25: power on after booting - the machine had the same trouble - I had to connect a screen and a usb keyboard to do "press F1 to continue". Into bios, save settings - tha fixed it. I also upgraded to latest bios.
2019-08-21: after an unscheduled power outage, the machine wouldn't start right away: I had to connect a screen (I used the HDMIPi) and a usb keyboard, it needed a "press F1 to continue" before it would boot. UEFI trouble?
2019-07-10: ada0p2 - virtual machines - finished moving all virtual machines back to this machine (from temporary host c1). Now all but the test machine is running:
root@kg-vm3# service bhyve status ===> bhyve profile: bvm1 bhyve_bvm1 is not running. ===> bhyve profile: bvm2 bhyve_bvm2 is running. ===> bhyve profile: bvm3 bhyve_bvm3 is running. ===> bhyve profile: bvm4 bhyve_bvm4 is running. ===> bhyve profile: bvm5 bhyve_bvm5 is running. ===> bhyve profile: bvm6 bhyve_bvm6 is running.
via tmux
root@kg-vm3# tmux ls bhyve_bvm2: 1 windows (created Wed Jul 10 17:44:22 2019) bhyve_bvm3: 1 windows (created Wed Jul 10 17:52:51 2019) bhyve_bvm4: 1 windows (created Wed Jul 10 17:58:55 2019) bhyve_bvm5: 1 windows (created Wed Jul 10 18:58:27 2019) bhyve_bvm6: 1 windows (created Wed Jul 10 18:09:39 2019)
ok
2019-07-10: ada0p2 - pkg - update, then upgrade. messages
Message from ruby-2.5.5_2,1: ==== Some of the standard commands are provided as separate ports for ease of upgrading: devel/ruby-gems: gem - RubyGems package manager devel/rubygem-rake: rake - Ruby Make And some of the standard libraries are provided as separate ports since they require extra dependencies: databases/rubygem-dbm: DBM module databases/rubygem-gdbm: GDBM module Install them as occasion demands. ==== Message from ca_root_nss-3.45: ********************************* WARNING ********************************* FreeBSD does not, and can not warrant that the certification authorities whose certificates are included in this package have in any way been audited for trustworthiness or RFC 3647 compliance. Assessment and verification of trust is the complete responsibility of the system administrator. *********************************** NOTE ********************************** This package installs symlinks to support root certificates discovery by default for software that uses OpenSSL. This enables SSL Certificate Verification by client software without manual intervention. If you prefer to do this manually, replace the following symlinks with either an empty file or your site-local certificate bundle. * /etc/ssl/cert.pem * /usr/local/etc/ssl/cert.pem * /usr/local/openssl/cert.pem ***************************************************************************
packages
Jul 10 17:06:58 kg-vm3 pkg: libyaml upgraded: 0.2.1 -> 0.2.2 Jul 10 17:06:58 kg-vm3 pkg: libedit upgraded: 3.1.20181209_2,1 -> 3.1.20190324,1 Jul 10 17:07:36 kg-vm3 pkg: ruby upgraded: 2.4.5_1,1 -> 2.5.5_2,1 Jul 10 17:07:36 kg-vm3 pkg: libnghttp2 upgraded: 1.37.0 -> 1.39.1 Jul 10 17:07:36 kg-vm3 pkg: gettext-runtime upgraded: 0.19.8.1_2 -> 0.20.1 Jul 10 17:07:36 kg-vm3 pkg: ca_root_nss upgraded: 3.44.1 -> 3.45 Jul 10 17:07:36 kg-vm3 pkg: utf8proc-2.4.0 installed Jul 10 17:07:37 kg-vm3 pkg: ruby25-bdb-0.6.6_6 installed Jul 10 17:07:37 kg-vm3 pkg: libtextstyle-0.20.1 installed Jul 10 17:07:37 kg-vm3 pkg: tmux upgraded: 2.8 -> 2.9a Jul 10 17:07:37 kg-vm3 pkg: portupgrade reinstalled: 2.4.16,2 -> 2.4.16,2 Jul 10 17:07:38 kg-vm3 pkg: pkgconf upgraded: 1.6.0,1 -> 1.6.1,1 Jul 10 17:07:58 kg-vm3 pkg: perl5 upgraded: 5.28.1_1 -> 5.28.2 Jul 10 17:08:02 kg-vm3 pkg: gettext-tools upgraded: 0.19.8.1_1 -> 0.20.1 Jul 10 17:08:04 kg-vm3 pkg: curl upgraded: 7.65.0_2 -> 7.65.1
and remove outdated packages - ok, there aren't any.
2019-07-10: ada0p2 - pkg - which repository are we using?
root@kg-vm3# pkg -vv | grep url url : "pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly",
quarterly it is.
2019-07-09: ada0p2 - freebsd-update - upgrade upgrade
root@kg-vm3# freebsd-update -r 11.3-RELEASE upgrade src component not installed, skipped [..] The following components of FreeBSD seem to be installed: kernel/generic world/base world/lib32 The following components of FreeBSD do not seem to be installed: kernel/generic-dbg world/base-dbg world/doc world/lib32-dbg Does this look reasonable (y/n)? y [..] The following file could not be merged automatically: /etc/ntp.conf Press Enter to edit this file in /usr/bin/vi and resolve the conflicts manually... [..] The following files will be removed as part of updating to 11.3-RELEASE-p0: /boot/loader.help [..] The following files will be added as part of updating to 11.3-RELEASE-p0: /boot/kernel/amdgpio.ko [..] The following files will be updated as part of updating to 11.3-RELEASE-p0: /.cshrc [..] /var/yp/Makefile.dist To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
install
root@kg-vm3# 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@kg-vm3# freebsd-update install src component not installed, skipped Installing updates... done.
and now FreeBSD 11.3-release is installed
root@kg-vm3# freebsd-version -ku 11.3-RELEASE 11.3-RELEASE
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 11.3-RELEASE FreeBSD 11.3-RELEASE #0 r349754: Fri Jul 5 04:45:24 UTC 2019 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
ok
2019-07-09: ada0p2 - freebsd-update fetch
root@kg-vm3# freebsd-update fetch [..] The following files will be updated as part of updating to 11.2-RELEASE-p11: /bin/freebsd-version [..] /usr/share/zoneinfo/Europe/Vatican /usr/share/zoneinfo/zone.tab
install
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates... done.
ok, now
root@kg-vm3# freebsd-version -ku 11.2-RELEASE-p11 11.2-RELEASE-p11
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 11.2-RELEASE-p10 FreeBSD 11.2-RELEASE-p10 #0: Mon May 13 21:20:50 UTC 2019 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
is installed.
2019-06-28: ada0p2 - freebsd-update install
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates... done.
freebsd-version says
root@kg-vm3# freebsd-version -ku 11.2-RELEASE-p10 11.2-RELEASE-p10
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 11.2-RELEASE-p10 FreeBSD 11.2-RELEASE-p10 #0: Mon May 13 21:20:50 UTC 2019 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
ok
2019-06-28: ada0p2 - pkg - upgrade messages
Message from perl5-5.28.1_1: The /usr/bin/perl symlink has been removed starting with Perl 5.20. For shebangs, you should either use: #!/usr/local/bin/perl or #!/usr/bin/env perl The first one will only work if you have a /usr/local/bin/perl, the second will work as long as perl is in PATH. Message from ruby-2.4.5_1,1: ==== Some of the standard commands are provided as separate ports for ease of upgrading: devel/ruby-gems: gem - RubyGems package manager devel/rubygem-rake: rake - Ruby Make And some of the standard libraries are provided as separate ports since they require extra dependencies: databases/ruby-gdbm: GDBM module Install them as occasion demands. ==== Message from ca_root_nss-3.44.1: ********************************* WARNING ********************************* FreeBSD does not, and can not warrant that the certification authorities whose certificates are included in this package have in any way been audited for trustworthiness or RFC 3647 compliance. Assessment and verification of trust is the complete responsibility of the system administrator. *********************************** NOTE ********************************** This package installs symlinks to support root certificates discovery by default for software that uses OpenSSL. This enables SSL Certificate Verification by client software without manual intervention. If you prefer to do this manually, replace the following symlinks with either an empty file or your site-local certificate bundle. * /etc/ssl/cert.pem * /usr/local/etc/ssl/cert.pem * /usr/local/openssl/cert.pem *************************************************************************** Message from bhyve-rc-3: Configuration is done completely though rc.conf. The rc script won't touch any devices for you (neither disk, nor tap) so you need to make sure all of those have been initialized properly. General setup: kldload vmm net.link.tap.up_on_open=1 Make it persistent: echo "net.link.tap.up_on_open=1" >> /etc/sysctl.conf cat >> /boot/loader.conf << EOF vmm_load="YES" EOF Minimal example: cat >> /etc/rc.conf << EOF cloned_interfaces="tap0 bridge0" bhyve_enable="YES" bhyve_diskdev="/dev/zvol/tank/bhyve/virt" EOF ifconfig tap0 create ifconfig bridge0 create service bhyve start tmux list-sessions tmux attach -t bhyve service bhyve status service bhyve stop Multi profile configuration example: cat >> /etc/rc.conf << EOF cloned_interfaces="tap0 tap1 bridge0" bhyve_enable="YES" bhyve_profiles="virt1 virt2" bhyve_virt1_diskdev="/dev/zvol/tank/bhyve/virt1" bhyve_virt2_tapdev="tap1" bhyve_virt2_diskdev="/dev/zvol/tank/bhyve/virt2" bhyve_virt2_memsize="8192" bhyve_virt2_ncpu="4" EOF ifconfig tap0 create ifconfig tap1 create ifconfig bridge0 create service bhyve start # start all service bhyve start virt2 # start individual tmux attach -t bhyve_virt1 tmux attach -t bhyve_virt1 service bhyve stop virt2 # stop individual service bhyve stop # stop all (by default ctrl-b d detaches from tmux).
packages
Jun 28 01:30:39 kg-vm3 pkg: indexinfo upgraded: 0.2.4 -> 0.3.1 Jun 28 01:30:58 kg-vm3 pkg: perl5 upgraded: 5.20.3_8 -> 5.28.1_1 Jun 28 01:30:58 kg-vm3 pkg: m4 upgraded: 1.4.17_1,1 -> 1.4.18_1,1 Jun 28 01:30:58 kg-vm3 pkg: autoconf-wrapper reinstalled: 20131203 -> 20131203 Jun 28 01:30:58 kg-vm3 pkg: automake-wrapper-20131203 deinstalled Jun 28 01:30:58 kg-vm3 pkg: autoconf upgraded: 2.69 -> 2.69_2 Jun 28 01:30:58 kg-vm3 pkg: libevent2-2.0.22_1 deinstalled Jun 28 01:30:59 kg-vm3 pkg: libyaml upgraded: 0.1.6_2 -> 0.2.1 Jun 28 01:30:59 kg-vm3 pkg: libffi upgraded: 3.2.1 -> 3.2.1_3 Jun 28 01:30:59 kg-vm3 pkg: libedit upgraded: 3.1.20150325_1 -> 3.1.20181209_2,1 Jun 28 01:30:59 kg-vm3 pkg: libunwind-20170615 installed Jun 28 01:31:28 kg-vm3 pkg: ruby upgraded: 2.1.8,1 -> 2.4.5_1,1 Jun 28 01:31:29 kg-vm3 pkg: gettext-runtime upgraded: 0.19.7 -> 0.19.8.1_2 Jun 28 01:31:35 kg-vm3 pkg: db5 upgraded: 5.3.28_3 -> 5.3.28_7 Jun 28 01:31:36 kg-vm3 pkg: libevent-2.1.10 installed Jun 28 01:31:36 kg-vm3 pkg: tmux upgraded: 2.1_1 -> 2.8 Jun 28 01:31:36 kg-vm3 pkg: p5-Locale-gettext upgraded: 1.06 -> 1.07 Jun 28 01:31:36 kg-vm3 pkg: ca_root_nss upgraded: 3.22 -> 3.44.1 Jun 28 01:31:36 kg-vm3 pkg: ruby24-bdb-0.6.6_5 installed Jun 28 01:31:36 kg-vm3 pkg: libnghttp2-1.37.0 installed Jun 28 01:31:37 kg-vm3 pkg: portupgrade upgraded: 2.4.14,2 -> 2.4.16,2 Jun 28 01:31:37 kg-vm3 pkg: pkgconf upgraded: 0.9.12_1 -> 1.6.0,1 Jun 28 01:31:37 kg-vm3 pkg: libtool upgraded: 2.4.6 -> 2.4.6_1 Jun 28 01:31:37 kg-vm3 pkg: help2man upgraded: 1.43.3_1 -> 1.47.10 Jun 28 01:31:37 kg-vm3 pkg: gmake upgraded: 4.1_2 -> 4.2.1_3 Jun 28 01:31:39 kg-vm3 pkg: gettext-tools upgraded: 0.19.7 -> 0.19.8.1_1 Jun 28 01:31:39 kg-vm3 pkg: disktype reinstalled: 9 -> 9 Jun 28 01:31:39 kg-vm3 pkg: dialog4ports upgraded: 0.1.5_2 -> 0.1.6 Jun 28 01:31:40 kg-vm3 pkg: curl upgraded: 7.47.0 -> 7.65.0_2 Jun 28 01:31:40 kg-vm3 pkg: bhyve-rc reinstalled: 3 -> 3 Jun 28 01:31:40 kg-vm3 pkg: automake upgraded: 1.15_1 -> 1.16.1_1
ok
2019-06-28: ada0p2 - pkg - check upgrades
root@kg-vm3# pkg upgrade -n Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. Checking for upgrades (25 candidates): 100% Processing candidates (25 candidates): 100% The following 29 package(s) will be affected (of 0 checked): New packages to be INSTALLED: libevent: 2.1.10 libunwind: 20170615 ruby24-bdb: 0.6.6_5 libnghttp2: 1.37.0 Installed packages to be UPGRADED: tmux: 2.1_1 -> 2.8 ruby: 2.1.8,1 -> 2.4.5_1,1 portupgrade: 2.4.14,2 -> 2.4.16,2 pkgconf: 0.9.12_1 -> 1.6.0,1 perl5: 5.20.3_8 -> 5.28.1_1 p5-Locale-gettext: 1.06 -> 1.07 m4: 1.4.17_1,1 -> 1.4.18_1,1 libyaml: 0.1.6_2 -> 0.2.1 libtool: 2.4.6 -> 2.4.6_1 libffi: 3.2.1 -> 3.2.1_3 libedit: 3.1.20150325_1 -> 3.1.20181209_2,1 indexinfo: 0.2.4 -> 0.3.1 help2man: 1.43.3_1 -> 1.47.10 gmake: 4.1_2 -> 4.2.1_3 gettext-tools: 0.19.7 -> 0.19.8.1_1 gettext-runtime: 0.19.7 -> 0.19.8.1_2 dialog4ports: 0.1.5_2 -> 0.1.6 db5: 5.3.28_3 -> 5.3.28_7 curl: 7.47.0 -> 7.65.0_2 ca_root_nss: 3.22 -> 3.44.1 automake: 1.15_1 -> 1.16.1_1 autoconf: 2.69 -> 2.69_2 Installed packages to be REINSTALLED: disktype-9 (ABI changed: 'freebsd:10:x86:64' -> 'freebsd:11:x86:64') bhyve-rc-3 (ABI changed: 'freebsd:10:x86:64' -> 'freebsd:11:x86:64') autoconf-wrapper-20131203 (ABI changed: 'freebsd:10:x86:64' -> 'freebsd:11:x86:64') Number of packages to be installed: 4 Number of packages to be upgraded: 22 Number of packages to be reinstalled: 3 The process will require 19 MiB more space. 43 MiB to be downloaded.
ok
2019-06-28: ada0p2 - pkg - fix pkg
root@kg-vm3# pkg info pkg pkg: Warning: Major OS version upgrade detected. Running "pkg-static install -f pkg" recommended pkg-1.6.4 Name : pkg Version : 1.6.4 Installed on : Sat Feb 20 18:11:17 2016 CET Origin : ports-mgmt/pkg Architecture : freebsd:10:x86:64 Prefix : /usr/local Categories : ports-mgmt Licenses : BSD2CLAUSE Maintainer : pkg@FreeBSD.org WWW : http://wiki.freebsd.org/pkgng Comment : Package manager Shared Libs provided: libpkg.so.3 Annotations : Flat size : 10.1MiB Description : Package management tool WWW: http://wiki.freebsd.org/pkgng
ok, do that
root@kg-vm3# pkg-static install -f pkg pkg-static: Warning: Major OS version upgrade detected. Running "pkg-static install -f pkg" recommended Updating FreeBSD repository catalogue... Repository FreeBSD has a wrong packagesite, need to re-create database Fetching meta.txz: 100% 940 B 0.9kB/s 00:01 Fetching packagesite.txz: 100% 6 MiB 1.7MB/s 00:04 Processing entries: 100% FreeBSD repository update completed. 31884 packages processed. Updating database digests format: 100% New version of pkg detected; it needs to be installed first. The following 1 package(s) will be affected (of 0 checked): Installed packages to be UPGRADED: pkg: 1.6.4 -> 1.10.5_5 The process will require 2 MiB more space. 3 MiB to be downloaded. Proceed with this action? [y/N]: y Fetching pkg-1.10.5_5.txz: 100% 3 MiB 1.5MB/s 00:02 Checking integrity... done (0 conflicting) [1/1] Upgrading pkg from 1.6.4 to 1.10.5_5... [1/1] Extracting pkg-1.10.5_5: 100% Updating FreeBSD repository catalogue... Repo "FreeBSD" upgrade schema 2012 to 2013: Add vital field Repo "FreeBSD" upgrade schema 2013 to 2014: DROP TABLE pkg_search; FreeBSD repository is up to date. All repositories are up to date. Checking integrity... done (0 conflicting) The following 1 package(s) will be affected (of 0 checked): Installed packages to be REINSTALLED: pkg-1.10.5_5 Number of packages to be reinstalled: 1 Proceed with this action? [y/N]: y [1/1] Reinstalling pkg-1.10.5_5... [1/1] Extracting pkg-1.10.5_5: 100%
good
2019-06-28: ada0p2 - FreeBSD version
root@kg-vm3# freebsd-version -ku 11.2-RELEASE-p10 11.2-RELEASE-p10
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 11.2-RELEASE-p10 FreeBSD 11.2-RELEASE-p10 #0: Mon May 13 21:20:50 UTC 2019 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
is in.
2019-06-28: ada0p2 - freebsd-update upgrade
root@kg-vm3# freebsd-update -r 11.2-RELEASE upgrade [..] The following components of FreeBSD seem to be installed: kernel/generic world/base world/lib32 The following components of FreeBSD do not seem to be installed: world/doc world/games Does this look reasonable (y/n)? y [..] The following files will be removed as part of updating to 11.2-RELEASE-p10: /boot/kernel/aac.ko.symbols [..] The following files will be added as part of updating to 11.2-RELEASE-p10: /boot/dtb/overlays [..] The following files will be updated as part of updating to 11.2-RELEASE-p10: /.cshrc [..] /var/yp/Makefile.dist To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
install
root@kg-vm3# 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 re-run freebsd-update install
root@kg-vm3# 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.
ok, so now I need to re-install all packages.
2019-06-28: ada0p2 - reboot, FreeBSD version
root@kg-vm3# freebsd-version -ku 10.4-RELEASE-p13 10.4-RELEASE-p13
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.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
is in.
2019-06-27: ada0p2 - freebsd-update, upgrade to 10.4-release upgrade
root@kg-vm3# freebsd-update -r 10.4-RELEASE upgrade src component not installed, skipped Looking up update.FreeBSD.org mirrors... none found. Fetching metadata signature for 10.3-RELEASE from update.FreeBSD.org... done. Fetching metadata index... done. Fetching 1 metadata patches. done. Applying metadata patches... done. Inspecting system... done. The following components of FreeBSD seem to be installed: kernel/generic world/base world/lib32 The following components of FreeBSD do not seem to be installed: world/doc world/games Does this look reasonable (y/n)? y [..] The following file could not be merged automatically: /etc/ntp.conf Press Enter to edit this file in /usr/bin/vi and resolve the conflicts [..] The following files are affected by updates, but no changes have been downloaded because the files have been modified locally: /.profile /root/.profile The following files will be removed as part of updating to 10.4-RELEASE-p13: /boot/kernel/hv_ata_pci_disengage.ko /boot/kernel/hv_ata_pci_disengage.ko.symbols /usr/share/man/man2/cap_rights_get.2.gz /usr/share/man/man4/hv_ata_pci_disengage.4.gz /usr/share/man/man9/rman_await_resource.9.gz The following files will be added as part of updating to 10.4-RELEASE-p13: /boot/kernel/geom_flashmap.ko [..] The following files will be updated as part of updating to 10.4-RELEASE-p13: /.cshrc [..] /var/yp/Makefile.dist To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
install
root@kg-vm3# 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.
rebooted, then ran freebsd-update install again
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates... done.
ok
2019-06-27: ada0p2 - a reboot, and FreeBSD
root@kg-vm3# freebsd-version -ku 10.3-RELEASE-p29 10.3-RELEASE-p29
kernel
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 10.3-RELEASE-p29 FreeBSD 10.3-RELEASE-p29 #0: Tue Apr 3 19:55:05 UTC 2018 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
is in.
2019-06-27: ada0p2 - freebsd-update fetch
root@kg-vm3# freebsd-update fetch [..] The following files will be updated as part of updating to 10.3-RELEASE-p29: /bin/freebsd-version [..] /var/db/mergemaster.mtree WARNING: FreeBSD 10.3-RELEASE-p24 HAS PASSED ITS END-OF-LIFE DATE. Any security issues discovered after Tue May 1 02:00:00 CEST 2018 will not have been corrected.
install
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates... done.
ok
2019-06-27: ada0p2 - FreeBSD - version - where are we at?
root@kg-vm3# freebsd-version -ku 10.3-RELEASE-p24 10.3-RELEASE-p24
ok
2019-06-27: ada0p2 - all vm's temporarily running on c1 (core1) machine, no vm's running on this machine:
root@kg-vm3# service bhyve status ===> bhyve profile: bvm1 bhyve_bvm1 is not running. ===> bhyve profile: bvm2 bhyve_bvm2 is not running. ===> bhyve profile: bvm3 bhyve_bvm3 is not running. ===> bhyve profile: bvm4 bhyve_bvm4 is not running. ===> bhyve profile: bvm5 bhyve_bvm5 is not running. ===> bhyve profile: bvm6 bhyve_bvm6 is not running.
comment out all profiles in /etc/rc.conf.local:
root@kg-vm3# grep profiles /etc/rc.conf.local #bhyve_profiles="bvm1 bvm2 bvm3 bvm4 bvm5 bvm6"
and what does the bhyve service script do now?
root@kg-vm3# service bhyve status bhyve is not running.
good, no machines on automatic
2018-10-13: ada0p2 - ports - installed curl
Oct 13 21:32:37 kg-vm3 pkg-static: curl-7.47.0 installed
ok.
2017-11-28: ada0p2 - bhyve - I managed to add support for diskdev2 to the /usr/local/etc/rc.d/bhyve script. Here's the diff:
tingo@kg-vm3$ diff -u bhyve_org bhyve --- bhyve_org 2016-02-20 17:49:48.153677000 +0100 +++ bhyve 2017-11-28 14:12:35.318728000 +0100 @@ -53,6 +53,10 @@ eval bhyve_diskdev="\${${_session}_diskdev:-${bhyve_diskdev}}" eval bhyve_ncpu="\${${_session}_ncpu:-${bhyve_ncpu}}" eval bhyve_memsize="\${${_session}_memsize:-${bhyve_memsize}}" + eval bhyve_diskdev2="\${${_session}_diskdev2}" + if [ ! -z "${bhyve_diskdev2}" ]; then + bhyve_disk2=" -s 2:1,virtio-blk,${bhyve_diskdev2} " + fi else echo "$0: extra argument ignored" fi @@ -141,6 +145,6 @@ rm -f ${pidfile} } -command_args="new-session -ds ${_session} \"sh -c 'echo \\\$PPID >${pidfile}; while true; do /usr/sbin/bhyvectl --vm=${_session} --destroy; /usr/sbin/bhyveload -m ${bhyve_memsize} -d ${bhyve_diskdev} ${_session} && /usr/sbin/bhyve -c ${bhyve_ncpu} -m ${bhyve_memsize} -AI -H -P -g 0 -s 0:0,hostbridge -s 1:0,virtio-net,${bhyve_tapdev} -s 2:0,virtio-blk,${bhyve_diskdev} -s 31,lpc -l com1,stdio ${_session} || break; done'\"" +command_args="new-session -ds ${_session} \"sh -c 'echo \\\$PPID >${pidfile}; while true; do /usr/sbin/bhyvectl --vm=${_session} --destroy; /usr/sbin/bhyveload -m ${bhyve_memsize} -d ${bhyve_diskdev} ${_session} && /usr/sbin/bhyve -c ${bhyve_ncpu} -m ${bhyve_memsize} -AI -H -P -g 0 -s 0:0,hostbridge -s 1:0,virtio-net,${bhyve_tapdev} -s 2:0,virtio-blk,${bhyve_diskdev} ${bhyve_disk2} -s 31,lpc -l com1,stdio ${_session} || break; done'\"" run_rc_command "$1"
ok.
2017-11-27: ada0p2 - after a reboot the host runs FreeBSD 10.3-release-p24.
root@kg-vm3# freebsd-version -ku 10.3-RELEASE-p24 10.3-RELEASE-p24 root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 10.3-RELEASE-p24 FreeBSD 10.3-RELEASE-p24 #0: Wed Nov 15 04:57:40 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
ok
2017-11-27: ada0p2 - vms - I shutdown all four vms before rebooting the host.
2017-11-27: ada0p2 - freebsd-update fetch
root@kg-vm3# freebsd-update fetch src component not installed, skipped Looking up update.FreeBSD.org mirrors... 3 mirrors found. Fetching metadata signature for 10.3-RELEASE from update5.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 189 patches.....10....20....30....40....50....60....70....80....90....100....110....120....130....140....150....160....170....180.... done. Applying patches... done. Fetching 3 files... done. [..] The following files will be removed as part of updating to 10.3-RELEASE-p24: /usr/share/zoneinfo/Pacific/Johnston The following files will be added as part of updating to 10.3-RELEASE-p24: /usr/share/zoneinfo/America/Punta_Arenas /usr/share/zoneinfo/Asia/Atyrau /usr/share/zoneinfo/Europe/Saratov The following files will be updated as part of updating to 10.3-RELEASE-p24: /bin/freebsd-version /boot/kernel/kernel /boot/kernel/kernel.symbols /boot/kernel/mqueuefs.ko /boot/kernel/mqueuefs.ko.symbols /boot/kernel/sem.ko /boot/kernel/sem.ko.symbols /usr/include/sys/osd.h /usr/sbin/hostapd /usr/sbin/wpa_supplicant /usr/share/man/man9/osd.9.gz /usr/share/man/whatis /usr/share/zoneinfo/Africa/Accra /usr/share/zoneinfo/Africa/Addis_Ababa /usr/share/zoneinfo/Africa/Asmara /usr/share/zoneinfo/Africa/Bissau /usr/share/zoneinfo/Africa/Ceuta /usr/share/zoneinfo/Africa/Dar_es_Salaam /usr/share/zoneinfo/Africa/Djibouti /usr/share/zoneinfo/Africa/El_Aaiun /usr/share/zoneinfo/Africa/Juba /usr/share/zoneinfo/Africa/Kampala /usr/share/zoneinfo/Africa/Khartoum /usr/share/zoneinfo/Africa/Mogadishu /usr/share/zoneinfo/Africa/Monrovia /usr/share/zoneinfo/Africa/Nairobi /usr/share/zoneinfo/Africa/Windhoek /usr/share/zoneinfo/America/Adak /usr/share/zoneinfo/America/Anchorage /usr/share/zoneinfo/America/Araguaina /usr/share/zoneinfo/America/Argentina/Buenos_Aires /usr/share/zoneinfo/America/Argentina/Catamarca /usr/share/zoneinfo/America/Argentina/Cordoba /usr/share/zoneinfo/America/Argentina/Jujuy /usr/share/zoneinfo/America/Argentina/La_Rioja /usr/share/zoneinfo/America/Argentina/Mendoza /usr/share/zoneinfo/America/Argentina/Rio_Gallegos /usr/share/zoneinfo/America/Argentina/Salta /usr/share/zoneinfo/America/Argentina/San_Juan /usr/share/zoneinfo/America/Argentina/San_Luis /usr/share/zoneinfo/America/Argentina/Tucuman /usr/share/zoneinfo/America/Argentina/Ushuaia /usr/share/zoneinfo/America/Aruba /usr/share/zoneinfo/America/Asuncion /usr/share/zoneinfo/America/Bahia /usr/share/zoneinfo/America/Belem /usr/share/zoneinfo/America/Belize /usr/share/zoneinfo/America/Boa_Vista /usr/share/zoneinfo/America/Bogota /usr/share/zoneinfo/America/Campo_Grande /usr/share/zoneinfo/America/Caracas /usr/share/zoneinfo/America/Cayenne /usr/share/zoneinfo/America/Cuiaba /usr/share/zoneinfo/America/Curacao /usr/share/zoneinfo/America/Danmarkshavn /usr/share/zoneinfo/America/Detroit /usr/share/zoneinfo/America/Eirunepe /usr/share/zoneinfo/America/Fortaleza /usr/share/zoneinfo/America/Godthab /usr/share/zoneinfo/America/Grand_Turk /usr/share/zoneinfo/America/Guayaquil /usr/share/zoneinfo/America/Guyana /usr/share/zoneinfo/America/Juneau /usr/share/zoneinfo/America/Kralendijk /usr/share/zoneinfo/America/La_Paz /usr/share/zoneinfo/America/Lima /usr/share/zoneinfo/America/Lower_Princes /usr/share/zoneinfo/America/Maceio /usr/share/zoneinfo/America/Manaus /usr/share/zoneinfo/America/Metlakatla /usr/share/zoneinfo/America/Miquelon /usr/share/zoneinfo/America/Montevideo /usr/share/zoneinfo/America/Nome /usr/share/zoneinfo/America/Noronha /usr/share/zoneinfo/America/Paramaribo /usr/share/zoneinfo/America/Port-au-Prince /usr/share/zoneinfo/America/Porto_Velho /usr/share/zoneinfo/America/Recife /usr/share/zoneinfo/America/Rio_Branco /usr/share/zoneinfo/America/Santarem /usr/share/zoneinfo/America/Santiago /usr/share/zoneinfo/America/Santo_Domingo /usr/share/zoneinfo/America/Sao_Paulo /usr/share/zoneinfo/America/Scoresbysund /usr/share/zoneinfo/America/Sitka /usr/share/zoneinfo/America/Yakutat /usr/share/zoneinfo/Antarctica/Macquarie /usr/share/zoneinfo/Antarctica/Palmer /usr/share/zoneinfo/Asia/Aden /usr/share/zoneinfo/Asia/Baghdad /usr/share/zoneinfo/Asia/Bahrain /usr/share/zoneinfo/Asia/Bangkok /usr/share/zoneinfo/Asia/Brunei /usr/share/zoneinfo/Asia/Choibalsan /usr/share/zoneinfo/Asia/Dhaka /usr/share/zoneinfo/Asia/Dili /usr/share/zoneinfo/Asia/Dubai /usr/share/zoneinfo/Asia/Famagusta /usr/share/zoneinfo/Asia/Gaza /usr/share/zoneinfo/Asia/Hebron /usr/share/zoneinfo/Asia/Ho_Chi_Minh /usr/share/zoneinfo/Asia/Hovd /usr/share/zoneinfo/Asia/Jakarta /usr/share/zoneinfo/Asia/Jayapura /usr/share/zoneinfo/Asia/Kabul /usr/share/zoneinfo/Asia/Karachi /usr/share/zoneinfo/Asia/Kathmandu /usr/share/zoneinfo/Asia/Kolkata /usr/share/zoneinfo/Asia/Kuala_Lumpur /usr/share/zoneinfo/Asia/Kuching /usr/share/zoneinfo/Asia/Kuwait /usr/share/zoneinfo/Asia/Macau /usr/share/zoneinfo/Asia/Makassar /usr/share/zoneinfo/Asia/Manila /usr/share/zoneinfo/Asia/Muscat /usr/share/zoneinfo/Asia/Oral /usr/share/zoneinfo/Asia/Phnom_Penh /usr/share/zoneinfo/Asia/Pontianak /usr/share/zoneinfo/Asia/Pyongyang /usr/share/zoneinfo/Asia/Qatar /usr/share/zoneinfo/Asia/Riyadh /usr/share/zoneinfo/Asia/Seoul /usr/share/zoneinfo/Asia/Singapore /usr/share/zoneinfo/Asia/Taipei /usr/share/zoneinfo/Asia/Tehran /usr/share/zoneinfo/Asia/Thimphu /usr/share/zoneinfo/Asia/Tokyo /usr/share/zoneinfo/Asia/Ulaanbaatar /usr/share/zoneinfo/Asia/Urumqi /usr/share/zoneinfo/Asia/Vientiane /usr/share/zoneinfo/Asia/Yangon /usr/share/zoneinfo/Asia/Yerevan /usr/share/zoneinfo/Atlantic/Azores /usr/share/zoneinfo/Atlantic/Canary /usr/share/zoneinfo/Atlantic/Cape_Verde /usr/share/zoneinfo/Atlantic/Madeira /usr/share/zoneinfo/Atlantic/Reykjavik /usr/share/zoneinfo/Atlantic/South_Georgia /usr/share/zoneinfo/Atlantic/Stanley /usr/share/zoneinfo/Australia/Eucla /usr/share/zoneinfo/Australia/Lord_Howe /usr/share/zoneinfo/Europe/Amsterdam /usr/share/zoneinfo/Europe/Dublin /usr/share/zoneinfo/Europe/Madrid /usr/share/zoneinfo/Europe/Zaporozhye /usr/share/zoneinfo/Indian/Antananarivo /usr/share/zoneinfo/Indian/Chagos /usr/share/zoneinfo/Indian/Christmas /usr/share/zoneinfo/Indian/Cocos /usr/share/zoneinfo/Indian/Comoro /usr/share/zoneinfo/Indian/Mahe /usr/share/zoneinfo/Indian/Maldives /usr/share/zoneinfo/Indian/Mauritius /usr/share/zoneinfo/Indian/Mayotte /usr/share/zoneinfo/Indian/Reunion /usr/share/zoneinfo/Pacific/Apia /usr/share/zoneinfo/Pacific/Bougainville /usr/share/zoneinfo/Pacific/Chatham /usr/share/zoneinfo/Pacific/Chuuk /usr/share/zoneinfo/Pacific/Easter /usr/share/zoneinfo/Pacific/Efate /usr/share/zoneinfo/Pacific/Enderbury /usr/share/zoneinfo/Pacific/Fakaofo /usr/share/zoneinfo/Pacific/Fiji /usr/share/zoneinfo/Pacific/Funafuti /usr/share/zoneinfo/Pacific/Galapagos /usr/share/zoneinfo/Pacific/Gambier /usr/share/zoneinfo/Pacific/Guadalcanal /usr/share/zoneinfo/Pacific/Kiritimati /usr/share/zoneinfo/Pacific/Kosrae /usr/share/zoneinfo/Pacific/Kwajalein /usr/share/zoneinfo/Pacific/Majuro /usr/share/zoneinfo/Pacific/Marquesas /usr/share/zoneinfo/Pacific/Midway /usr/share/zoneinfo/Pacific/Nauru /usr/share/zoneinfo/Pacific/Niue /usr/share/zoneinfo/Pacific/Norfolk /usr/share/zoneinfo/Pacific/Noumea /usr/share/zoneinfo/Pacific/Pago_Pago /usr/share/zoneinfo/Pacific/Palau /usr/share/zoneinfo/Pacific/Pitcairn /usr/share/zoneinfo/Pacific/Pohnpei /usr/share/zoneinfo/Pacific/Port_Moresby /usr/share/zoneinfo/Pacific/Rarotonga /usr/share/zoneinfo/Pacific/Tahiti /usr/share/zoneinfo/Pacific/Tarawa /usr/share/zoneinfo/Pacific/Tongatapu /usr/share/zoneinfo/Pacific/Wake /usr/share/zoneinfo/Pacific/Wallis /usr/share/zoneinfo/zone.tab /var/db/mergemaster.mtree
install
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates... done.
then a reboot is needed.
2017-10-15: ada0p2 - after a reboot, the machine runs FreeBSD 10.3-release-p21.
tingo@kg-vm3$ freebsd-version -ku 10.3-RELEASE-p20 10.3-RELEASE-p21 tingo@kg-vm3$ uname -a FreeBSD kg-vm3.kg4.no 10.3-RELEASE-p20 FreeBSD 10.3-RELEASE-p20 #0: Wed Jul 12 03:13:07 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
ok.
2017-10-15: ada0p2 - reboot didn't work, I had to forcible pull the power plug.
2017-10-15: ada0p2 - freebsd-update fetch
root@kg-vm3# freebsd-update fetch src component not installed, skipped Looking up update.FreeBSD.org mirrors... 3 mirrors found. Fetching metadata signature for 10.3-RELEASE from update4.freebsd.org... done. Fetching metadata index... done. Fetching 2 metadata patches.. done. Applying metadata patches... done. Inspecting system... Preparing to download files... done. Fetching 214 patches.....10....20....30....40....50....60....70....80....90....100....110....120....130....140....150....160....170....180....190....200....210.. done. Applying patches... done. Fetching 6 files... done. [..] The following files will be removed as part of updating to 10.3-RELEASE-p21: /usr/share/zoneinfo/America/Santa_Isabel /usr/share/zoneinfo/Asia/Rangoon The following files will be added as part of updating to 10.3-RELEASE-p21: /usr/share/zoneinfo/Asia/Barnaul /usr/share/zoneinfo/Asia/Famagusta /usr/share/zoneinfo/Asia/Tomsk /usr/share/zoneinfo/Asia/Yangon /usr/share/zoneinfo/Europe/Astrakhan /usr/share/zoneinfo/Europe/Kirov /usr/share/zoneinfo/Europe/Ulyanovsk The following files will be updated as part of updating to 10.3-RELEASE-p21: /bin/freebsd-version /boot/boot1.efi /boot/boot1.efifat /boot/kernel/cam.ko /boot/kernel/cam.ko.symbols /boot/kernel/hv_netvsc.ko /boot/kernel/hv_netvsc.ko.symbols /boot/kernel/hv_storvsc.ko /boot/kernel/hv_storvsc.ko.symbols /boot/kernel/hv_utils.ko /boot/kernel/hv_utils.ko.symbols /boot/kernel/hv_vmbus.ko /boot/kernel/hv_vmbus.ko.symbols /boot/kernel/ipl.ko /boot/kernel/ipl.ko.symbols /boot/kernel/kernel /boot/kernel/kernel.symbols /boot/kernel/sysvshm.ko /boot/kernel/sysvshm.ko.symbols /boot/kernel/tmpfs.ko /boot/kernel/tmpfs.ko.symbols /boot/kernel/zfs.ko /boot/kernel/zfs.ko.symbols /boot/loader.efi /lib/libc.so.7 /lib/libcrypto.so.7 /rescue/[ /rescue/atmconfig [..] /rescue/zfs /rescue/zpool /sbin/ifconfig /sbin/ipftest /sbin/route /usr/bin/ar /usr/bin/bsdcpio /usr/bin/bspatch /usr/bin/netstat /usr/bin/ntpq /usr/bin/ranlib /usr/bin/slogin /usr/bin/ssh /usr/bin/ssh-agent /usr/include/openssl/ssl.h /usr/include/openssl/ssl3.h /usr/include/sys/eventhandler.h /usr/include/vm/vm_object.h /usr/lib/libarchive.a /usr/lib/libarchive.so.6 /usr/lib/libarchive_p.a /usr/lib/libc.a /usr/lib/libc_p.a /usr/lib/libc_pic.a /usr/lib/libcrypto.a /usr/lib/libcrypto_p.a /usr/lib/libkrb5.a /usr/lib/libkrb5.so.11 /usr/lib/libkrb5_p.a /usr/lib/libssl.a /usr/lib/libssl.so.7 /usr/lib/libssl_p.a /usr/lib/libvmmapi.a /usr/lib/libvmmapi.so.5 /usr/lib/libvmmapi_p.a /usr/lib/private/libssh.a /usr/lib/private/libssh.so.5 /usr/lib/private/libssh_p.a /usr/lib32/libarchive.a /usr/lib32/libarchive.so.6 /usr/lib32/libarchive_p.a /usr/lib32/libc.a /usr/lib32/libc.so.7 /usr/lib32/libc_p.a /usr/lib32/libc_pic.a /usr/lib32/libcrypto.a /usr/lib32/libcrypto.so.7 /usr/lib32/libcrypto_p.a /usr/lib32/libkrb5.a /usr/lib32/libkrb5.so.11 /usr/lib32/libkrb5_p.a /usr/lib32/libssl.a /usr/lib32/libssl.so.7 /usr/lib32/libssl_p.a /usr/lib32/private/libssh.a /usr/lib32/private/libssh.so.5 /usr/lib32/private/libssh_p.a /usr/libexec/sendmail/sendmail /usr/libexec/telnetd /usr/sbin/arp /usr/sbin/bhyve /usr/sbin/bhyveload /usr/sbin/ifmcstat /usr/sbin/ndp /usr/sbin/ntp-keygen /usr/sbin/ntpd /usr/sbin/ntpdate /usr/sbin/ntpdc /usr/sbin/ntptime /usr/sbin/portsnap /usr/sbin/sntp /usr/sbin/sshd /usr/sbin/zdump /usr/sbin/zic /usr/share/doc/ntp/copyright.html /usr/share/doc/ntp/drivers/driver40.html /usr/share/doc/ntp/miscopt.html /usr/share/doc/ntp/ntp-keygen.html /usr/share/doc/ntp/ntp.conf.html /usr/share/doc/ntp/ntp.keys.html /usr/share/doc/ntp/ntpsnmpd.html /usr/share/man/man1/ssh-agent.1.gz /usr/share/man/man5/ntp.conf.5.gz /usr/share/man/man5/ntp.keys.5.gz /usr/share/man/man8/ntp-keygen.8.gz /usr/share/man/man8/ntpd.8.gz /usr/share/man/man8/ntpdc.8.gz /usr/share/man/man8/ntpq.8.gz /usr/share/man/man8/sntp.8.gz /usr/share/zoneinfo/America/Cambridge_Bay /usr/share/zoneinfo/America/Caracas /usr/share/zoneinfo/America/Cayman /usr/share/zoneinfo/America/Inuvik /usr/share/zoneinfo/America/Iqaluit /usr/share/zoneinfo/America/Los_Angeles /usr/share/zoneinfo/America/Metlakatla /usr/share/zoneinfo/America/Pangnirtung /usr/share/zoneinfo/America/Port-au-Prince /usr/share/zoneinfo/America/Rankin_Inlet /usr/share/zoneinfo/America/Resolute /usr/share/zoneinfo/America/Santiago /usr/share/zoneinfo/America/Tijuana /usr/share/zoneinfo/America/Yellowknife /usr/share/zoneinfo/Antarctica/Casey /usr/share/zoneinfo/Antarctica/Davis /usr/share/zoneinfo/Antarctica/DumontDUrville /usr/share/zoneinfo/Antarctica/Macquarie /usr/share/zoneinfo/Antarctica/Mawson /usr/share/zoneinfo/Antarctica/Palmer /usr/share/zoneinfo/Antarctica/Rothera /usr/share/zoneinfo/Antarctica/Syowa /usr/share/zoneinfo/Antarctica/Troll /usr/share/zoneinfo/Antarctica/Vostok /usr/share/zoneinfo/Asia/Almaty /usr/share/zoneinfo/Asia/Anadyr /usr/share/zoneinfo/Asia/Aqtau /usr/share/zoneinfo/Asia/Aqtobe /usr/share/zoneinfo/Asia/Ashgabat /usr/share/zoneinfo/Asia/Baku /usr/share/zoneinfo/Asia/Bishkek /usr/share/zoneinfo/Asia/Chita /usr/share/zoneinfo/Asia/Colombo /usr/share/zoneinfo/Asia/Dushanbe /usr/share/zoneinfo/Asia/Gaza /usr/share/zoneinfo/Asia/Hebron /usr/share/zoneinfo/Asia/Irkutsk /usr/share/zoneinfo/Asia/Istanbul /usr/share/zoneinfo/Asia/Kamchatka /usr/share/zoneinfo/Asia/Karachi /usr/share/zoneinfo/Asia/Khandyga /usr/share/zoneinfo/Asia/Krasnoyarsk /usr/share/zoneinfo/Asia/Magadan /usr/share/zoneinfo/Asia/Novokuznetsk /usr/share/zoneinfo/Asia/Novosibirsk /usr/share/zoneinfo/Asia/Omsk /usr/share/zoneinfo/Asia/Oral /usr/share/zoneinfo/Asia/Qyzylorda /usr/share/zoneinfo/Asia/Sakhalin /usr/share/zoneinfo/Asia/Samarkand /usr/share/zoneinfo/Asia/Srednekolymsk /usr/share/zoneinfo/Asia/Tashkent /usr/share/zoneinfo/Asia/Tbilisi /usr/share/zoneinfo/Asia/Tehran /usr/share/zoneinfo/Asia/Ust-Nera /usr/share/zoneinfo/Asia/Vladivostok /usr/share/zoneinfo/Asia/Yakutsk /usr/share/zoneinfo/Asia/Yekaterinburg /usr/share/zoneinfo/Asia/Yerevan /usr/share/zoneinfo/Etc/GMT+1 /usr/share/zoneinfo/Etc/GMT+10 /usr/share/zoneinfo/Etc/GMT+11 /usr/share/zoneinfo/Etc/GMT+12 /usr/share/zoneinfo/Etc/GMT+2 /usr/share/zoneinfo/Etc/GMT+3 /usr/share/zoneinfo/Etc/GMT+4 /usr/share/zoneinfo/Etc/GMT+5 /usr/share/zoneinfo/Etc/GMT+6 /usr/share/zoneinfo/Etc/GMT+7 /usr/share/zoneinfo/Etc/GMT+8 /usr/share/zoneinfo/Etc/GMT+9 /usr/share/zoneinfo/Etc/GMT-1 /usr/share/zoneinfo/Etc/GMT-10 /usr/share/zoneinfo/Etc/GMT-11 /usr/share/zoneinfo/Etc/GMT-12 /usr/share/zoneinfo/Etc/GMT-13 /usr/share/zoneinfo/Etc/GMT-14 /usr/share/zoneinfo/Etc/GMT-2 /usr/share/zoneinfo/Etc/GMT-3 /usr/share/zoneinfo/Etc/GMT-4 /usr/share/zoneinfo/Etc/GMT-5 /usr/share/zoneinfo/Etc/GMT-6 /usr/share/zoneinfo/Etc/GMT-7 /usr/share/zoneinfo/Etc/GMT-8 /usr/share/zoneinfo/Etc/GMT-9 /usr/share/zoneinfo/Europe/Chisinau /usr/share/zoneinfo/Europe/Istanbul /usr/share/zoneinfo/Europe/Kaliningrad /usr/share/zoneinfo/Europe/Malta /usr/share/zoneinfo/Europe/Minsk /usr/share/zoneinfo/Europe/Moscow /usr/share/zoneinfo/Europe/Rome /usr/share/zoneinfo/Europe/Samara /usr/share/zoneinfo/Europe/San_Marino /usr/share/zoneinfo/Europe/Vatican /usr/share/zoneinfo/Europe/Vilnius /usr/share/zoneinfo/Europe/Volgograd /usr/share/zoneinfo/Indian/Kerguelen /usr/share/zoneinfo/Pacific/Easter /usr/share/zoneinfo/Pacific/Tongatapu /usr/share/zoneinfo/zone.tab /var/db/mergemaster.mtree
install
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates... done.
a reboot remains.
2017-09-04: ada0p2 - interesting messages
root@kg-vm3# grep exiting /var/log/messages Aug 31 23:01:55 kg-vm3 getty[1276]: getty exiting due to excessive running time Sep 1 12:17:21 kg-vm3 getty[1273]: getty exiting due to excessive running time Sep 2 03:46:56 kg-vm3 getty[1275]: getty exiting due to excessive running time Sep 2 18:01:40 kg-vm3 getty[1274]: getty exiting due to excessive running time Sep 2 23:02:40 kg-vm3 getty[1280]: getty exiting due to excessive running time Sep 3 08:51:55 kg-vm3 getty[1278]: getty exiting due to excessive running time Sep 3 20:30:59 kg-vm3 getty[1279]: getty exiting due to excessive running time
check older logs - nope, those are the only ones. In context
Aug 31 23:01:55 kg-vm3 getty[1276]: getty exiting due to excessive running time Aug 31 23:01:55 kg-vm3 getty[45584]: open /dev/ttyv3: No such file or directory Sep 1 12:17:21 kg-vm3 getty[1273]: getty exiting due to excessive running time Sep 1 12:17:21 kg-vm3 getty[47378]: open /dev/ttyv0: No such file or directory Sep 2 03:46:56 kg-vm3 getty[1275]: getty exiting due to excessive running time Sep 2 03:46:56 kg-vm3 getty[49331]: open /dev/ttyv2: No such file or directory Sep 2 18:01:40 kg-vm3 getty[1274]: getty exiting due to excessive running time Sep 2 18:01:40 kg-vm3 getty[50997]: open /dev/ttyv1: No such file or directory Sep 2 23:02:40 kg-vm3 getty[1280]: getty exiting due to excessive running time Sep 2 23:02:40 kg-vm3 getty[51520]: open /dev/ttyv7: No such file or directory Sep 3 08:51:55 kg-vm3 getty[1278]: getty exiting due to excessive running time Sep 3 08:51:55 kg-vm3 getty[52856]: open /dev/ttyv5: No such file or directory Sep 3 20:30:59 kg-vm3 getty[1279]: getty exiting due to excessive running time Sep 3 20:30:59 kg-vm3 getty[54071]: open /dev/ttyv6: No such file or directory
ok
2016-09-30: after a reboot, the machine now runs FreeBSD 10.3-release-p9. dmesg output: normal, verbose.
root@kg-vm3# freebsd-version -ku 10.3-RELEASE-p7 10.3-RELEASE-p9 root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 10.3-RELEASE-p7 FreeBSD 10.3-RELEASE-p7 #0: Thu Aug 11 18:38:15 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
ok.
2016-09-30: freebsd-update - install updates.
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates... done.
ok. Now do a reboot.
2016-09-30: freebsd-update - check. The machine still runs:
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 10.3-RELEASE-p3 FreeBSD 10.3-RELEASE-p3 #0: Tue May 17 08:43:55 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
look for updates
root@kg-vm3# freebsd-update fetch src component not installed, skipped Looking up update.FreeBSD.org mirrors... 4 mirrors found. Fetching metadata signature for 10.3-RELEASE from update5.freebsd.org... done. Fetching metadata index... done. Fetching 1 metadata patches. done. Applying metadata patches... done. Fetching 2 metadata files... done. Inspecting system... done. Preparing to download files... done. Fetching 67 patches.....10....20....30....40....50....60... done. Applying patches... done. The following files will be updated as part of updating to 10.3-RELEASE-p9: /bin/freebsd-version /boot/boot1.efi /boot/boot1.efifat /boot/kernel/hv_storvsc.ko /boot/kernel/hv_storvsc.ko.symbols /boot/kernel/hv_vmbus.ko /boot/kernel/hv_vmbus.ko.symbols /boot/kernel/kernel /boot/kernel/kernel.symbols /boot/kernel/linux.ko /boot/kernel/linux.ko.symbols /boot/kernel/linux64.ko /boot/kernel/linux64.ko.symbols /lib/libcrypto.so.7 /rescue/[ /rescue/atmconfig /rescue/badsect /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/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/ps /rescue/pwd /rescue/rcorder /rescue/rcp /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/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/vi /rescue/whoami /rescue/xz /rescue/xzcat /rescue/zcat /rescue/zdb /rescue/zfs /rescue/zpool /sbin/dhclient /usr/bin/ar /usr/bin/bsdcpio /usr/bin/bspatch /usr/bin/ntpq /usr/bin/openssl /usr/bin/ranlib /usr/include/archive.h /usr/include/openssl/ssl.h /usr/lib/libarchive.a /usr/lib/libarchive.so.6 /usr/lib/libarchive_p.a /usr/lib/libcrypto.a /usr/lib/libcrypto_p.a /usr/lib/libmp.so.7 /usr/lib/libssl.a /usr/lib/libssl.so.7 /usr/lib/libssl_p.a /usr/lib/private/libssh.so.5 /usr/lib32/libarchive.a /usr/lib32/libarchive.so.6 /usr/lib32/libarchive_p.a /usr/lib32/libcrypto.a /usr/lib32/libcrypto.so.7 /usr/lib32/libcrypto_p.a /usr/lib32/libmp.so.7 /usr/lib32/libssl.a /usr/lib32/libssl.so.7 /usr/lib32/libssl_p.a /usr/lib32/private/libssh.so.5 /usr/sbin/freebsd-update /usr/sbin/ntp-keygen /usr/sbin/ntpd /usr/sbin/ntpdate /usr/sbin/ntpdc /usr/sbin/ntptime /usr/sbin/sntp /usr/share/doc/ntp/miscopt.html /usr/share/doc/ntp/ntp-keygen.html /usr/share/doc/ntp/ntp.conf.html /usr/share/doc/ntp/ntp.keys.html /usr/share/doc/ntp/ntpsnmpd.html /usr/share/man/man1/bsdcpio.1.gz /usr/share/man/man1/cpio.1.gz /usr/share/man/man3/archive_write_data_block.3.gz /usr/share/man/man3/archive_write_disk.3.gz /usr/share/man/man3/archive_write_disk_new.3.gz /usr/share/man/man3/archive_write_disk_set_group_lookup.3.gz /usr/share/man/man3/archive_write_disk_set_options.3.gz /usr/share/man/man3/archive_write_disk_set_skip_file.3.gz /usr/share/man/man3/archive_write_disk_set_standard_lookup.3.gz /usr/share/man/man3/archive_write_disk_set_user_lookup.3.gz /usr/share/man/man5/ntp.conf.5.gz /usr/share/man/man5/ntp.keys.5.gz /usr/share/man/man8/ntp-keygen.8.gz /usr/share/man/man8/ntpd.8.gz /usr/share/man/man8/ntpdc.8.gz /usr/share/man/man8/ntpq.8.gz /usr/share/man/man8/sntp.8.gz /var/db/mergemaster.mtree
ok.
2016-08-26: ada0p2 - after a scheduled power outage (power company maintenance) I powered on the machine. All services are up:
root@kg-vm3# date;temp;swapinfo -h;echo " ";tvlm;echo " ";tvls;echo " ";df -h;echo " ";uptime;echo " ";ps ax | grep -v grep | grep ddc;ps ax | grep -v grep | grep smartd;ps ax | grep -v grep | grep natd;echo "bhyve vms:";ls -l /dev/vmm Fri Aug 26 11:55:03 CEST 2016 dev.cpu.0.temperature: 31.0C dev.cpu.1.temperature: 41.0C Device 1K-blocks Used Avail Capacity /dev/ada0p3 3974068 0B 3.8G 0% Aug 26 11:54:04 kg-vm3 getty[1268]: open /dev/ttyv5: No such file or directory Aug 26 11:54:04 kg-vm3 getty[1269]: open /dev/ttyv6: No such file or directory Aug 26 11:54:04 kg-vm3 getty[1266]: open /dev/ttyv3: No such file or directory Aug 26 11:54:04 kg-vm3 getty[1267]: open /dev/ttyv4: No such file or directory Aug 26 11:54:04 kg-vm3 getty[1270]: open /dev/ttyv7: No such file or directory Aug 26 11:54:13 kg-vm3 kernel: tap1: link state changed to UP Aug 26 11:54:13 kg-vm3 devd: Executing '/etc/rc.d/dhclient quietstart tap1' Aug 26 11:54:13 kg-vm3 kernel: tap0: link state changed to UP Aug 26 11:54:13 kg-vm3 devd: Executing '/etc/rc.d/dhclient quietstart tap0' Aug 26 11:54:45 kg-vm3 su: tingo to root on /dev/pts/2 Sep 19 01:35:25 kg-vm3 newsyslog[478]: logfile first created Filesystem Size Used Avail Capacity Mounted on /dev/ada0p2 105G 3.5G 93G 4% / devfs 1.0K 1.0K 0B 100% /dev /dev/da0p1 1.8T 5.7G 1.6T 0% /zs 11:55AM up 1 min, 3 users, load averages: 2.17, 0.73, 0.28 bhyve vms: total 0 crw------- 1 root wheel 0x55 Aug 26 11:54 bhyve_bvm1 crw------- 1 root wheel 0x5c Aug 26 11:54 bhyve_bvm2
nice.
2016-08-25: uptime status:
root@kg-vm3# date;uptime Thu Aug 25 23:05:47 CEST 2016 11:05PM up 96 days, 2:05, 5 users, load averages: 0.07, 0.03, 0.00
ok.
2016-06-18: ada0p2 - bhyve - change memory size of bvm2 from 512M to 1024M by adding
bhyve_bvm2_memsize="1024"
to /etc/rc.conf.local. Complete /etc/rc.conf.local:
root@kg-vm3# cat /etc/rc.conf.local # bhyve - configuration for virtual machines bhyve_profiles="bvm1 bvm2" bhyve_bvm1_tapdev="tap0" bhyve_bvm1_diskdev="/zs/vms/vm1/guest-vm1.img" bhyve_bvm1_ncpu="2" bhyve_bvm2_tapdev="tap1" bhyve_bvm2_diskdev="/zs/vms/bvm2/guest-bvm2.img" bhyve_bvm2_ncpu="2" bhyve_bvm2_memsize="1024"
next I will reboot the bvm2 machine. Ok, a reboot didn't work, I need to restart it:
root@kg-vm3# service bhyve status ===> bhyve profile: bvm1 bhyve_bvm1 is running. ===> bhyve profile: bvm2 bhyve_bvm2 is running. root@kg-vm3# service bhyve restart bvm2 Stopping bhyve_bvm2. Starting bhyve. root@kg-vm3# service bhyve status ===> bhyve profile: bvm1 bhyve_bvm1 is running. ===> bhyve profile: bvm2 bhyve_bvm2 is not running.
Hmm, that's odd.
root@kg-vm3# service bhyve start bvm2 Starting bhyve. root@kg-vm3# service bhyve status ===> bhyve profile: bvm1 bhyve_bvm1 is running. ===> bhyve profile: bvm2 bhyve_bvm2 is running.
that worked.
2016-05-21: ada0p2 - bhyve - set up a new machine bvm2 (2 cpu, 512M, 6 G) that will be used for a wiki machine. It will use tap1 interface.
root@kg-vm3# cd /zs/vms
create a directory for it:
root@kg-vm3# mkdir bvm2
make a file for a disk:
root@kg-vm3# truncate -s 6G bvm2/guest-bvm2.img
verify
root@kg-vm3# ll -h bvm2 total 104 drwxr-xr-x 2 root wheel 512B May 21 22:07 ./ drwxr-xr-x 4 root wheel 512B May 21 22:04 ../ -rw-r--r-- 1 root wheel 6.0G May 21 22:07 guest-bvm2.img
ok. Next is the install process:
root@kg-vm3# sh /usr/share/examples/bhyve/vmrun.sh -c 2 -t tap1 -d /zs/vms/bvm2/guest-bvm2.img -i -I /zs/tingo/dl/bsd/FreeBSD-10.3-RELEASE-amd64-disc1.iso bhyve_vm2
it starts the boot, asks for a terminal type, I choose xterm, get to the menu and start the install process. Norwegian keymap, name the machine wiki.kg4.no, unselect games, lib32, ports tree. Guided disk setup, entire disk, I modify it so that I get a 5 G freebsd-ufs and a 1G freebsd-swap. Install continues. Network configuration DHCP, services sshd, ntpd, dumpdev. I fix /etc/dhclient.conf so tha the machine will get a static ip, and that finishes the install. On exit, it reboots, just select "reboot" from the boot menu.
Next I add it to /etc/rc.conf.local. Completed:
root@kg-vm3# more /etc/rc.conf.local # bhyve - configuration for virtual machines bhyve_profiles="bvm1 bvm2" bhyve_bvm1_tapdev="tap0" bhyve_bvm1_diskdev="/zs/vms/vm1/guest-vm1.img" bhyve_bvm1_ncpu="2" bhyve_bvm2_tapdev="tap1" bhyve_bvm2_diskdev="/zs/vms/bvm2/guest-bvm2.img" bhyve_bvm2_ncpu="2"
Start the machine:
root@kg-vm3# service bhyve start bvm2 Starting bhyve.
verify
root@kg-vm3# service bhyve status ===> bhyve profile: bvm1 bhyve_bvm1 is running. ===> bhyve profile: bvm2 bhyve_bvm2 is running.
seems ok.
2016-05-21: ada0p2 - bhyve - and the virtual machine autostarted after boot as it should.
2016-05-21: ada0p2 - after a reboot, the machine now runs FreeBSD 10.3-release-p3. dmesg output: normal, verbose.
root@kg-vm3# freebsd-version -ku 10.3-RELEASE-p3 10.3-RELEASE-p3 root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 10.3-RELEASE-p3 FreeBSD 10.3-RELEASE-p3 #0: Tue May 17 08:43:55 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
ok.
Set up verbose boot for next boot:
root@kg-vm3# nextboot -o "-v"
this creates /boot/nextboot.conf:
root@kg-vm3# more /boot/nextboot.conf nextboot_enable="YES" kernel_options="-v"
reboot to test. It worked.
2016-05-21: ada0p2 - bhyve - add more interfaces to /etc/rc.conf: before:
root@kg-vm3# sysrc cloned_interfaces cloned_interfaces: bridge0 tap0 root@kg-vm3# sysrc ifconfig_bridge0 ifconfig_bridge0: addm re0 addm tap0
after:
root@kg-vm3# sysrc cloned_interfaces cloned_interfaces: bridge0 tap0 tap1 tap2 tap3 root@kg-vm3# sysrc ifconfig_bridge0 ifconfig_bridge0: addm re0 addm tap0 addm tap1 addm tap2 addm tap3
ok.
2016-05-21: ada0p2 - install upgrades:
root@kg-vm3# 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.
ok. After reboot:
root@kg-vm3# uname -a FreeBSD kg-vm3.kg4.no 10.3-RELEASE-p3 FreeBSD 10.3-RELEASE-p3 #0: Tue May 17 08:43:55 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
install the rest of the updates
root@kg-vm3# freebsd-update install src component not installed, skipped Installing updates... done.
ok.
2016-05-21: ada0p2 - try to upgrade the os via freebsd-update:
root@kg-vm3# freebsd-update upgrade src component not installed, skipped freebsd-update: Release target must be specified via -r option.
ok
root@kg-vm3# freebsd-update upgrade -r 10.3 src component not installed, skipped Looking up update.FreeBSD.org mirrors... 4 mirrors found. Fetching public key from update4.freebsd.org... done. Fetching metadata signature for 10.2-RELEASE from update4.freebsd.org... done. Fetching metadata index... done. Fetching 2 metadata files... done. Inspecting system... done. The following components of FreeBSD seem to be installed: kernel/generic world/base world/lib32 The following components of FreeBSD do not seem to be installed: world/doc world/games Does this look reasonable (y/n)? y Fetching metadata signature for 10.3-RELEASE from update4.freebsd.org... done. Fetching metadata index... done. Fetching 1 metadata patches. done. Applying metadata patches... done. Fetching 1 metadata files.. done. Inspecting system... done. Fetching files from 10.2-RELEASE for merging... done. Preparing to download files... done. Fetching 11041 patches.....10... [...] 10960....10970....10980....10990....11000....11010....11020....11030....11040 done. Applying patches... done. Fetching 135 files... done. Attempting to automatically merge changes in files... done. The following files are affected by updates, but no changes have been downloaded because the files have been modified locally: /.profile /root/.profile The following files will be removed as part of updating to 10.3-RELEASE-p3: /boot/kernel/ataadaptec.ko /boot/kernel/ataadaptec.ko.symbols /boot/kernel/ataahci.ko /boot/kernel/ataahci.ko.symbols /boot/kernel/isp_1040_it.ko /boot/kernel/isp_1040_it.ko.symbols /boot/kernel/isp_1080_it.ko /boot/kernel/isp_1080_it.ko.symbols /boot/kernel/isp_12160_it.ko /boot/kernel/isp_12160_it.ko.symbols /boot/kernel/isp_2400_multi.ko /boot/kernel/isp_2400_multi.ko.symbols /boot/kernel/isp_2500_multi.ko /boot/kernel/isp_2500_multi.ko.symbols /usr/bin/sgsmsg /usr/include/lzma/lzma.h /usr/sbin/unbound-control-setup /usr/share/examples/etc/snmpd.config /usr/share/examples/iscsi /usr/share/examples/netgraph/bluetooth /usr/share/man/man9/MEXTFREE.9.gz /usr/share/man/man9/MEXT_ADD_REF.9.gz /usr/share/man/man9/MEXT_IS_REF.9.gz /usr/share/man/man9/MEXT_REM_REF.9.gz /usr/share/man/man9/MFREE.9.gz The following files will be added as part of updating to 10.3-RELEASE-p3: /boot/kernel/ismt.ko /boot/kernel/ismt.ko.symbols /boot/kernel/linux64.ko /boot/kernel/linux64.ko.symbols /boot/kernel/linux_common.ko /boot/kernel/linux_common.ko.symbols /boot/kernel/mlx5.ko /boot/kernel/mlx5.ko.symbols /boot/kernel/mlx5en.ko /boot/kernel/mlx5en.ko.symbols /boot/kernel/plasma_saver.ko /boot/kernel/plasma_saver.ko.symbols /boot/kernel/systrace_linux.ko /boot/kernel/systrace_linux.ko.symbols /etc/mtree/BSD.debug.dist /etc/ntp/leap-seconds /etc/periodic/daily/480.leapfile-ntpd /lib/libnv.so.0 /rescue/iscsictl /rescue/iscsid /usr/bin/ld.bfd /usr/bin/timeout /usr/include/devctl.h /usr/include/dnv.h /usr/include/lzma/lzma12.h /usr/include/net/paravirt.h /usr/include/net/sff8436.h /usr/include/netinet/tcp_fastopen.h /usr/include/nv.h /usr/include/sys/dnv.h /usr/include/sys/nv.h /usr/include/sys/nv_impl.h /usr/include/sys/nvlist_impl.h /usr/include/sys/nvpair_impl.h /usr/include/x86/metadata.h /usr/lib/libdevctl.a /usr/lib/libdevctl.so /usr/lib/libdevctl.so.5 /usr/lib/libdevctl_p.a /usr/lib/libnv.a /usr/lib/libnv.so /usr/lib/libnv_p.a /usr/lib32/libdevctl.a /usr/lib32/libdevctl.so /usr/lib32/libdevctl.so.5 /usr/lib32/libdevctl_p.a /usr/lib32/libnv.a /usr/lib32/libnv.so /usr/lib32/libnv.so.0 /usr/lib32/libnv_p.a /usr/libdata/ldscripts/elf_i386_fbsd.x /usr/libdata/ldscripts/elf_i386_fbsd.xbn /usr/libdata/ldscripts/elf_i386_fbsd.xc /usr/libdata/ldscripts/elf_i386_fbsd.xd /usr/libdata/ldscripts/elf_i386_fbsd.xdc /usr/libdata/ldscripts/elf_i386_fbsd.xdw /usr/libdata/ldscripts/elf_i386_fbsd.xn /usr/libdata/ldscripts/elf_i386_fbsd.xr /usr/libdata/ldscripts/elf_i386_fbsd.xs /usr/libdata/ldscripts/elf_i386_fbsd.xsc /usr/libdata/ldscripts/elf_i386_fbsd.xsw /usr/libdata/ldscripts/elf_i386_fbsd.xu /usr/libdata/ldscripts/elf_i386_fbsd.xw /usr/libdata/pkgconfig/liblzma.pc /usr/sbin/camdd /usr/sbin/devctl /usr/sbin/sesutil /usr/sbin/vigr /usr/share/dtrace/watch_execve /usr/share/dtrace/watch_kill /usr/share/dtrace/watch_vop_remove /usr/share/man/man1/timeout.1.gz /usr/share/man/man2/futimens.2.gz /usr/share/man/man2/utimensat.2.gz /usr/share/man/man3/LIST_CLASS_ENTRY.3.gz /usr/share/man/man3/LIST_CLASS_HEAD.3.gz /usr/share/man/man3/LIST_FOREACH_FROM_SAFE.3.gz /usr/share/man/man3/SLIST_CLASS_ENTRY.3.gz /usr/share/man/man3/SLIST_CLASS_HEAD.3.gz /usr/share/man/man3/SLIST_FOREACH_FROM_SAFE.3.gz /usr/share/man/man3/STAILQ_CLASS_ENTRY.3.gz /usr/share/man/man3/STAILQ_CLASS_HEAD.3.gz /usr/share/man/man3/STAILQ_FOREACH_FROM_SAFE.3.gz /usr/share/man/man3/TAILQ_CLASS_ENTRY.3.gz /usr/share/man/man3/TAILQ_CLASS_HEAD.3.gz /usr/share/man/man3/TAILQ_FOREACH_FROM_SAFE.3.gz /usr/share/man/man3/TAILQ_FOREACH_REVERSE_FROM_SAFE.3.gz /usr/share/man/man3/au_get_state.3.gz /usr/share/man/man3/au_notify.3.gz /usr/share/man/man3/au_notify_initialize.3.gz /usr/share/man/man3/au_notify_terminate.3.gz /usr/share/man/man3/devctl.3.gz /usr/share/man/man3/kinfo_getvmobject.3.gz /usr/share/man/man3/libnv.3.gz /usr/share/man/man3/localeconv_l.3.gz /usr/share/man/man3/nv.3.gz /usr/share/man/man3/nvlist.3.gz /usr/share/man/man3/nvlist_add_binary.3.gz /usr/share/man/man3/nvlist_add_bool.3.gz /usr/share/man/man3/nvlist_add_descriptor.3.gz /usr/share/man/man3/nvlist_add_null.3.gz /usr/share/man/man3/nvlist_add_number.3.gz /usr/share/man/man3/nvlist_add_nvlist.3.gz /usr/share/man/man3/nvlist_add_string.3.gz /usr/share/man/man3/nvlist_add_stringf.3.gz /usr/share/man/man3/nvlist_add_stringv.3.gz /usr/share/man/man3/nvlist_clone.3.gz /usr/share/man/man3/nvlist_create.3.gz /usr/share/man/man3/nvlist_destroy.3.gz /usr/share/man/man3/nvlist_dump.3.gz /usr/share/man/man3/nvlist_empty.3.gz /usr/share/man/man3/nvlist_error.3.gz /usr/share/man/man3/nvlist_exists.3.gz /usr/share/man/man3/nvlist_exists_binary.3.gz /usr/share/man/man3/nvlist_exists_bool.3.gz /usr/share/man/man3/nvlist_exists_descriptor.3.gz /usr/share/man/man3/nvlist_exists_null.3.gz /usr/share/man/man3/nvlist_exists_number.3.gz /usr/share/man/man3/nvlist_exists_nvlist.3.gz /usr/share/man/man3/nvlist_exists_string.3.gz /usr/share/man/man3/nvlist_exists_type.3.gz /usr/share/man/man3/nvlist_fdump.3.gz /usr/share/man/man3/nvlist_flags.3.gz /usr/share/man/man3/nvlist_free.3.gz /usr/share/man/man3/nvlist_free_binary.3.gz /usr/share/man/man3/nvlist_free_bool.3.gz /usr/share/man/man3/nvlist_free_descriptor.3.gz /usr/share/man/man3/nvlist_free_null.3.gz /usr/share/man/man3/nvlist_free_number.3.gz /usr/share/man/man3/nvlist_free_nvlist.3.gz /usr/share/man/man3/nvlist_free_string.3.gz /usr/share/man/man3/nvlist_free_type.3.gz /usr/share/man/man3/nvlist_get_binary.3.gz /usr/share/man/man3/nvlist_get_bool.3.gz /usr/share/man/man3/nvlist_get_descriptor.3.gz /usr/share/man/man3/nvlist_get_number.3.gz /usr/share/man/man3/nvlist_get_nvlist.3.gz /usr/share/man/man3/nvlist_get_parent.3.gz /usr/share/man/man3/nvlist_get_string.3.gz /usr/share/man/man3/nvlist_move_binary.3.gz /usr/share/man/man3/nvlist_move_descriptor.3.gz /usr/share/man/man3/nvlist_move_nvlist.3.gz /usr/share/man/man3/nvlist_move_string.3.gz /usr/share/man/man3/nvlist_next.3.gz /usr/share/man/man3/nvlist_pack.3.gz /usr/share/man/man3/nvlist_recv.3.gz /usr/share/man/man3/nvlist_send.3.gz /usr/share/man/man3/nvlist_set_error.3.gz /usr/share/man/man3/nvlist_size.3.gz /usr/share/man/man3/nvlist_take_binary.3.gz /usr/share/man/man3/nvlist_take_bool.3.gz /usr/share/man/man3/nvlist_take_descriptor.3.gz /usr/share/man/man3/nvlist_take_number.3.gz /usr/share/man/man3/nvlist_take_nvlist.3.gz /usr/share/man/man3/nvlist_take_string.3.gz /usr/share/man/man3/nvlist_unpack.3.gz /usr/share/man/man3/nvlist_xfer.3.gz /usr/share/man/man4/cfi.4.gz /usr/share/man/man4/cfid.4.gz /usr/share/man/man4/ismt.4.gz /usr/share/man/man4/mce.4.gz /usr/share/man/man4/mlx5en.4.gz /usr/share/man/man4/pmspcv.4.gz /usr/share/man/man8/bhyvectl.8.gz /usr/share/man/man8/camdd.8.gz /usr/share/man/man8/devctl.8.gz /usr/share/man/man8/sesutil.8.gz /usr/share/man/man8/vigr.8.gz /usr/share/man/man9/bus_get_resource.9.gz /usr/share/man/man9/m_collapse.9.gz /usr/share/man/man9/make_dev_s.9.gz /usr/share/man/man9/pci_find_pcie_root_port.9.gz /usr/share/man/man9/pci_msix_pba_bar.9.gz /usr/share/man/man9/pci_msix_table_bar.9.gz /usr/share/man/man9/pcie_adjust_config.9.gz /usr/share/man/man9/pcie_read_config.9.gz /usr/share/man/man9/pcie_write_config.9.gz /usr/share/man/man9/rw_unlock.9.gz /usr/share/openssl/man/man3/BUF_MEM_new_ex.3.gz /usr/share/openssl/man/man3/BUF_memdup.3.gz /usr/share/openssl/man/man3/BUF_strlcat.3.gz /usr/share/openssl/man/man3/BUF_strlcpy.3.gz /usr/share/openssl/man/man3/BUF_strndup.3.gz /usr/share/openssl/man/man3/DTLSv1_client_method.3.gz /usr/share/openssl/man/man3/DTLSv1_method.3.gz /usr/share/openssl/man/man3/DTLSv1_server_method.3.gz /usr/share/openssl/man/man3/EVP_SignInit_ex.3.gz /usr/share/openssl/man/man3/SSL_CTX_clear_extra_chain_certs.3.gz /usr/share/openssl/man/man3/SSL_CTX_set_tlsext_status_arg.3.gz /usr/share/openssl/man/man3/SSL_CTX_set_tlsext_status_cb.3.gz /usr/share/openssl/man/man3/SSL_get_tlsext_status_ocsp_resp.3.gz /usr/share/openssl/man/man3/SSL_set_tlsext_status_ocsp_resp.3.gz /usr/share/openssl/man/man3/SSL_set_tlsext_status_type.3.gz /usr/share/openssl/man/man3/SSLv23_client_method.3.gz /usr/share/openssl/man/man3/SSLv23_method.3.gz /usr/share/openssl/man/man3/SSLv23_server_method.3.gz /usr/share/openssl/man/man3/SSLv2_client_method.3.gz /usr/share/openssl/man/man3/SSLv2_method.3.gz /usr/share/openssl/man/man3/SSLv2_server_method.3.gz /usr/share/openssl/man/man3/SSLv3_client_method.3.gz /usr/share/openssl/man/man3/SSLv3_method.3.gz /usr/share/openssl/man/man3/SSLv3_server_method.3.gz /usr/share/openssl/man/man3/TLSv1_1_client_method.3.gz /usr/share/openssl/man/man3/TLSv1_1_method.3.gz /usr/share/openssl/man/man3/TLSv1_1_server_method.3.gz /usr/share/openssl/man/man3/TLSv1_2_client_method.3.gz /usr/share/openssl/man/man3/TLSv1_2_method.3.gz /usr/share/openssl/man/man3/TLSv1_2_server_method.3.gz /usr/share/openssl/man/man3/TLSv1_client_method.3.gz /usr/share/openssl/man/man3/TLSv1_method.3.gz /usr/share/openssl/man/man3/TLSv1_server_method.3.gz /usr/share/zoneinfo/America/Fort_Nelson /var/db/etcupdate/current/etc/mtree/BSD.debug.dist /var/db/etcupdate/current/etc/ntp /var/db/etcupdate/current/etc/ntp/leap-seconds /var/db/etcupdate/current/etc/periodic/daily/480.leapfile-ntpd /var/db/ntp The following files will be updated as part of updating to 10.3-RELEASE-p3: /.cshrc /COPYRIGHT /bin/[ /bin/cat /bin/chflags /bin/chio /bin/chmod /bin/cp /bin/csh /bin/date /bin/dd /bin/df /bin/domainname /bin/echo /bin/ed /bin/expr /bin/freebsd-version /bin/getfacl /bin/hostname /bin/kenv /bin/kill /bin/link /bin/ln /bin/ls /bin/mkdir /bin/mv /bin/pax /bin/pgrep /bin/pkill /bin/ps /bin/pwait /bin/pwd /bin/rcp /bin/realpath /bin/red /bin/rm /bin/rmail /bin/rmdir /bin/setfacl /bin/sh /bin/sleep /bin/stty /bin/sync /bin/tcsh /bin/test /bin/unlink /bin/uuidgen /boot/beastie.4th /boot/boot /boot/boot1.efi /boot/boot1.efifat /boot/boot2 /boot/brand-fbsd.4th /boot/brand.4th /boot/check-password.4th /boot/color.4th /boot/defaults/loader.conf /boot/delay.4th /boot/device.hints /boot/frames.4th /boot/gptboot /boot/gptzfsboot /boot/kernel/aac.ko /boot/kernel/aac.ko.symbols [...] /var/db/etcupdate/current/root/.profile /var/db/etcupdate/log /var/db/mergemaster.mtree /var/yp/Makefile.dist To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
ok.
2016-02-21: ada0p2 - bhyve - configuration, first part in /etc/rc.conf:
# network configuration for bhyve cloned_interfaces="bridge0 tap0" ifconfig_bridge0="addm re0 addm tap0" # enable bhyve - further configuration in rc.conf.local bhyve_enable="YES"
and /etc/rc.conf.local:
root@kg-vm3# more /etc/rc.conf.local # bhyve - configuration for virtual machines bhyve_profiles="bvm1" bhyve_bvm1_tapdev="tap0" bhyve_bvm1_diskdev="/zs/vms/vm1/guest-vm1.img" bhyve_bvm1_ncpu="2"
a bit arbitrarily, but still.
2016-02-20: ada0p2 - ports - installed portupgrade:
Feb 20 18:12:44 kg-vm3 pkg-static: libffi-3.2.1 installed Feb 20 18:13:06 kg-vm3 pkg-static: libyaml-0.1.6_2 installed Feb 20 18:13:35 kg-vm3 pkg-static: libedit-3.1.20150325_1 installed Feb 20 18:31:54 kg-vm3 pkg-static: ruby-2.1.8,1 installed Feb 20 18:46:49 kg-vm3 pkg-static: db5-5.3.28_3 installed Feb 20 18:49:43 kg-vm3 pkg-static: ruby21-bdb-0.6.6_4 installed Feb 20 18:49:44 kg-vm3 pkg-static: portupgrade-2.4.14,2 installed
ok.
2016-02-20: ada0p2 - ports - upgrade pkg:
Feb 20 18:11:17 kg-vm3 pkg-static: pkg-1.6.4 installed
ok.
2016-02-20: ada0p2 - ports - install bhyve-rc, this install a bunch of dependencies:
Feb 20 17:18:10 kg-vm3 pkg-static: dialog4ports-0.1.5_2 installed Feb 20 17:18:25 kg-vm3 pkg-static: pkgconf-0.9.12_1 installed Feb 20 17:19:35 kg-vm3 pkg-static: indexinfo-0.2.4 installed Feb 20 17:19:38 kg-vm3 pkg-static: m4-1.4.17_1,1 installed Feb 20 17:21:05 kg-vm3 pkg-static: gettext-runtime-0.19.7 installed Feb 20 17:28:02 kg-vm3 pkg-static: gettext-tools-0.19.7 installed Feb 20 17:32:45 kg-vm3 su: tingo to root on /dev/pts/0 Feb 20 17:43:15 kg-vm3 pkg-static: perl5-5.20.3_8 installed Feb 20 17:43:33 kg-vm3 pkg-static: p5-Locale-gettext-1.06 installed Feb 20 17:43:54 kg-vm3 pkg-static: gmake-lite-4.1_1 installed Feb 20 17:43:59 kg-vm3 pkg-static: help2man-1.43.3_1 installed Feb 20 17:46:41 kg-vm3 pkg-static: gmake-4.1_2 installed Feb 20 17:46:57 kg-vm3 pkg-static: autoconf-wrapper-20131203 installed Feb 20 17:46:58 kg-vm3 pkg-static: autoconf-2.69 installed Feb 20 17:47:09 kg-vm3 pkg-static: automake-wrapper-20131203 installed Feb 20 17:47:11 kg-vm3 pkg-static: automake-1.15_1 installed Feb 20 17:47:31 kg-vm3 pkg-static: libtool-2.4.6 installed Feb 20 17:49:12 kg-vm3 pkg-static: libevent2-2.0.22_1 installed Feb 20 17:49:47 kg-vm3 pkg-static: tmux-2.1_1 installed Feb 20 17:58:54 kg-vm3 pkg-static: bhyve-rc-3 installed
here is the pkg-message output:
Installing bhyve-rc-3... Configuration is done completely though rc.conf. The rc script won't touch any devices for you (neither disk, nor tap) so you need to make sure all of those have been initialized properly. General setup: kldload vmm net.link.tap.up_on_open=1 Make it persistent: echo "net.link.tap.up_on_open=1" >> /etc/sysctl.conf cat >> /boot/loader.conf << EOF vmm_load="YES" EOF Minimal example: cat >> /etc/rc.conf << EOF cloned_interfaces="tap0 bridge0" bhyve_enable="YES" bhyve_diskdev="/dev/zvol/tank/bhyve/virt" EOF ifconfig tap0 create ifconfig bridge0 create service bhyve start tmux list-sessions tmux attach -t bhyve service bhyve status service bhyve stop Multi profile configuration example: cat >> /etc/rc.conf << EOF cloned_interfaces="tap0 tap1 bridge0" bhyve_enable="YES" bhyve_profiles="virt1 virt2" bhyve_virt1_diskdev="/dev/zvol/tank/bhyve/virt1" bhyve_virt2_tapdev="tap1" bhyve_virt2_diskdev="/dev/zvol/tank/bhyve/virt2" bhyve_virt2_memsize="8192" bhyve_virt2_ncpu="4" EOF ifconfig tap0 create ifconfig tap1 create ifconfig bridge0 create service bhyve start # start all service bhyve start virt2 # start individual tmux attach -t bhyve_virt1 tmux attach -t bhyve_virt1 service bhyve stop virt2 # stop individual service bhyve stop # stop all (by default ctrl-b d detaches from tmux). ===> Cleaning for tmux-2.1_1 ===> Cleaning for bhyve-rc-3
good to know.
2016-02-20: ada0p2 - make a distfiles directory on the hard drive, and link it:
root@kg-vm3# mkdir /zs/distfiles root@kg-vm3# ln -s /zs/distfiles /usr/ports/
Next I fixed /etc/make.conf.
2016-02-20: ada0p2 - get a ports tree on the machine via portsnap fetch; portsnap extract
.
2016-01-23: ada0p2 - create my first VM: 512MB RAM, 4 G disk
root@kg-vm3# cd /zs/vms root@kg-vm3# mkdir vm1
create disk image:
root@kg-vm3# truncate -s 4G guest-vm1.img
whoops, wrong directory, fix:
root@kg-vm3# mv guest-vm1.img ./vm1 root@kg-vm3# cd vm1 root@kg-vm3# l -lh total 104 drwxr-xr-x 2 root wheel 512B Jan 23 22:12 ./ drwxr-xr-x 3 root wheel 512B Jan 23 22:12 ../ -rw-r--r-- 1 root wheel 4.0G Jan 23 22:11 guest-vm1.img
better.
create
root@kg-vm3# sh /usr/share/examples/bhyve/vmrun.sh -c 2 -m 512M -t tap0 -d ./guest-vm1.img -i -I /home/tingo/dl/bsd/FreeBSD-9.3-RELEASE-amd64-disc1.iso bvm1
(it boots and shows this)
Welcome to FreeBSD! Please choose the appropriate terminal type for your system. Common console types are: ansi Standard ANSI terminal vt100 VT100 or compatible terminal xterm xterm terminal emulator (or compatible) cons25w cons25w terminal Console type [vt100]:
(I press ENTER - whoops, that didn't work out to well, xterm is better)
I installed FreeBSD, rebooted. Now see if I can start the machine:
root@kg-vm3# sh /usr/share/examples/bhyve/vmrun.sh -c 2 -m 512M -t tap0 -d ./guest-vm1.img bvm1
that works, but it hogs the terminal session. Anyway, from my other session I can see this:
root@kg-vm3# pgrep -lf bhyve 1586 bhyve: bvm1 1579 sh /usr/share/examples/bhyve/vmrun.sh -c 2 -m 512M -t tap0 -d ./guest-vm1.img bvm1
and the /dev/vmm directory:
root@kg-vm3# ll /dev/vmm total 1 dr-xr-xr-x 2 root wheel 512 Jan 23 22:34 ./ dr-xr-xr-x 21 root wheel 512 Jan 23 20:49 ../ crw------- 1 root wheel 0x51 Jan 23 22:34 bvm1
nice.
Try to boot the machine with a serial console:
root@kg-vm3# sh /usr/share/examples/bhyve/vmrun.sh -c 2 -m 512M -C /dev/nmdm0A -t tap0 -d ./guest-vm1.img bvm1 Launching virtual machine "bvm1" ...
it works, but it still hogs the terminal session.
and cu still doesn't want to connect a normal user:
tingo@kg-vm3$ cu -l /dev/nmdm0B /var/spool/lock/LCK..nmdm0B: No such file or directory Can't open lock file. all ports busy
as root it works
root@kg-vm3# cu -l /dev/nmdm0B Connected
oh well. Adding myself to the dialer group gets me a step further
root@kg-vm3# pw groupshow dialer dialer:*:68: root@kg-vm3# pw groupmod dialer -m tingo root@kg-vm3# pw groupshow dialer dialer:*:68:tingo
test
tingo@kg-vm3$ cu -l /dev/nmdm0B /dev/nmdm0B: Permission denied link down
permissions (or owner / group) isn't correct for the nmdm devices:
root@kg-vm3# ll /dev/nmdm* crw------- 1 root wheel 0x51 Jan 23 23:17 /dev/nmdm0A crw------- 1 root wheel 0x58 Jan 23 23:17 /dev/nmdm0B
fix
root@kg-vm3# chmod g+w /dev/nmdm* root@kg-vm3# chmod g+r /dev/nmdm* root@kg-vm3# ll /dev/nmdm* crw-rw---- 1 root wheel 0x51 Jan 23 23:17 /dev/nmdm0A crw-rw---- 1 root wheel 0x58 Jan 23 23:17 /dev/nmdm0B
now it works:
tingo@kg-vm3$ cu -l /dev/nmdm0B can't open log file /var/log/aculog. Connected
good.
Hint: if you change the ssh escape character before you log into the vm host, you won't have cu escape close your ssh connection.
Example: tingo@kg-core1$ ssh -e ^ vm3
now terminate session is '^.' instead of '~.'
VM stats:
root@kg-vm3# bhyvectl --get-stats --vm=bvm1 vcpu0 stats: number of times %cr access was intercepted 2 number of times rdmsr was intercepted 3 number of times wrmsr was intercepted 1 number of monitor trap exits 0 number of times pause was intercepted 467216 vm exits due to interrupt window opening 4277 vm exits due to nmi window opening 0 number of times in/out was intercepted 465190 number of times cpuid was intercepted 16 vm exits due to nested page fault 27479 vm exits for instruction emulation 2534312 number of vm exits for unknown reason 0 number of times astpending at exit 8621 number of times idle requested at exit 0 number of vm exits handled in userspace 3662784 number of times rendezvous pending at exit 0 number of vm exits due to exceptions 0 number of ticks vcpu was idle 3586618 number of NMIs delivered to vcpu 0 number of ExtINTs delivered to vcpu 0 EOI without any in-service interrupt 0 error interrupts generated by vlapic 0 timer interrupts generated by vlapic 146399 corrected machine check interrupts generated by vlapic 0 lvts triggered[0] 0 lvts triggered[1] 0 lvts triggered[2] 0 lvts triggered[3] 0 lvts triggered[4] 0 lvts triggered[5] 0 lvts triggered[6] 0 ipis sent to vcpu[0] 0 ipis sent to vcpu[1] 19481 ipis sent to vcpu[2] 0 ipis sent to vcpu[3] 0 ipis sent to vcpu[4] 0 ipis sent to vcpu[5] 0 ipis sent to vcpu[6] 0 ipis sent to vcpu[7] 0 ipis sent to vcpu[8] 0 ipis sent to vcpu[9] 0 ipis sent to vcpu[10] 0 ipis sent to vcpu[11] 0 ipis sent to vcpu[12] 0 ipis sent to vcpu[13] 0 ipis sent to vcpu[14] 0 ipis sent to vcpu[15] 0 Resident memory 26681344 Wired memory 0 vcpu total runtime 38979187884 Number of vpid invalidations saved 1177 Number of vpid invalidations done 46266 vcpu migration across host cpus 47443 total number of vm exits 3700973 vm exits due to external interrupt 33890 number of times hlt was intercepted 168587
very cool.
2016-01-23: ada0p2 - set up a filesystem on the external drive (da0), to store files, vm images etc. How does it look?
root@kg-vm3# gpart show -p da0 => 63 3907029104 da0 MBR (1.8T) 63 1985 - free - (993K) 2048 3907027119 da0s1 ntfs [active] (1.8T)
NTFS is no good. Remove that partition and destroy:
root@kg-vm3# gpart delete -i 1 da0 da0s1 deleted root@kg-vm3# gpart destroy da0 da0 destroyed create a GPT scheme and add a freebsd-ufs partition: root@kg-vm3# gpart create -s GPT da0 da0 created root@kg-vm3# gpart add -t freebsd-ufs da0 da0p1 added
now it looks like this:
root@kg-vm3# gpart show -p da0 => 34 3907029100 da0 GPT (1.8T) 34 6 - free - (3.0K) 40 3907029088 da0p1 freebsd-ufs (1.8T) 3907029128 6 - free - (3.0K)
add a filesystem:
root@kg-vm3# newfs -Uj /dev/da0p1 /dev/da0p1: 1907729.0MB (3907029088 sectors) block size 32768, fragment size 4096 using 3048 cylinder groups of 626.09MB, 20035 blks, 80256 inodes. with soft updates super-block backups (for fsck_ffs -b #) at: 192, 1282432, 2564672, 3846912, 5129152, 6411392, 7693632, 8975872, 10258112, 11540352, 12822592, 14104832, 15387072, 16669312, 17951552, 19233792, 20516032, 21798272, 23080512, 24362752, 25644992, 26927232, 28209472, 29491712, 30773952, 32056192, 33338432, 34620672, 35902912, 37185152, 38467392, 39749632, 41031872, 42314112, 43596352, 44878592, 46160832, 47443072, 48725312, 50007552, 51289792, 52572032, 53854272, 55136512, 56418752, 57700992, 58983232, 60265472, 61547712, 62829952, 64112192, 65394432, 66676672, 67958912, 69241152, 70523392, 71805632, 73087872, 74370112, 75652352, 76934592, 78216832, 79499072, 80781312, 82063552, 83345792, 84628032, 85910272, 87192512, 88474752, 89756992, 91039232, 92321472, 93603712, 94885952, 96168192, 97450432, 98732672, [...] 3894163072, 3895445312, 3896727552, 3898009792, 3899292032, 3900574272, 3901856512, 3903138752, 3904420992, 3905703232, 3906985472 Using inode 4 in cg 0 for 33554432 byte journal newfs: soft updates journaling set
create a mountpoint:
root@kg-vm3# mkdir /zs
mount it:
root@kg-vm3# mount /dev/da0p1 /zs
I also added an entry to /etc/fstab. Complete fstab:
root@kg-vm3# more /etc/fstab # Device Mountpoint FStype Options Dump Pass# /dev/ada0p2 / ufs rw 1 1 /dev/ada0p3 none swap sw 0 0 /dev/da0p1 /zs ufs rw 2 2
ok. Create a few directories in the new filesystem. One for a normal user:
root@kg-vm3# mkdir /zs/tingo root@kg-vm3# chown tingo /zs/tingo
ok. As my user:
tingo@kg-vm3$ mkdir /zs/tingo/dl tingo@kg-vm3$ ln -s /zs/tingo/dl tingo@kg-vm3$ mkdir dl/bsd
then I have a place to store install images. Create a directory to store vms:
root@kg-vm3# mkdir /zs/vms
ok.
2016-01-23: ada0p2 - I insert the external usb drive again, and verify that it is connected with usb 3.0 speed:
root@kg-vm3# usbconfig -d ugen0.3 ugen0.3: <BUP Slim BK Seagate> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (36mA)
good.
2016-01-23: ada0p2 - booting up the machine without a display connected (I moved the machine to another location) I get these in /var/log/messages:
Jan 23 19:49:49 kg-vm3 getty[893]: open /dev/ttyv2: No such file or directory Jan 23 19:49:49 kg-vm3 getty[892]: open /dev/ttyv1: No such file or directory Jan 23 19:49:49 kg-vm3 getty[895]: open /dev/ttyv4: No such file or directory Jan 23 19:49:49 kg-vm3 getty[891]: open /dev/ttyv0: No such file or directory Jan 23 19:49:49 kg-vm3 getty[894]: open /dev/ttyv3: No such file or directory Jan 23 19:49:49 kg-vm3 getty[897]: open /dev/ttyv6: No such file or directory Jan 23 19:49:49 kg-vm3 getty[896]: open /dev/ttyv5: No such file or directory Jan 23 19:49:49 kg-vm3 getty[898]: open /dev/ttyv7: No such file or directory
verify:
root@kg-vm3# ls -l /dev/tty* ls: /dev/tty*: No such file or directory
I'm not sure why, because the console is detected:
Jan 23 19:49:48 kg-vm3 kernel: vgapci0: <VGA-compatible display> port 0xf000-0xf03f mem 0x90000000-0x90ffffff,0x80000000-0x8fffffff irq 16 at device 2.0 on pci0 Jan 23 19:49:48 kg-vm3 kernel: vgapci0: Boot video device
pciconf
root@kg-vm3# pciconf -lv | grep -B 3 VGA vgapci0@pci0:0:2:0: class=0x030000 card=0x22b11849 chip=0x22b18086 rev=0x21 hdr=0x00 vendor = 'Intel Corporation' class = display subclass = VGA
hmm, well, the machine is going to be headless anyway.
2016-01-22: ada0p2 - connecting a usb 3.0 external hard drive gives this in /var/log/messages:
Jan 22 15:49:33 kg-vm3 kernel: ugen0.2: <Seagate> at usbus0 Jan 22 15:49:33 kg-vm3 kernel: umass0: <Seagate BUP Slim BK, class 0/0, rev 3.00/1.00, addr 4> on usbus0 Jan 22 15:49:33 kg-vm3 kernel: umass0: SCSI over Bulk-Only; quirks = 0xc101 Jan 22 15:49:33 kg-vm3 kernel: umass0:2:0:-1: Attached to scbus2 Jan 22 15:49:33 kg-vm3 kernel: da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 Jan 22 15:49:33 kg-vm3 kernel: da0: <Seagate BUP Slim BK 0304> Fixed Direct Access SPC-4 SCSI device Jan 22 15:49:33 kg-vm3 kernel: da0: Serial Number NA7QYJ0W Jan 22 15:49:33 kg-vm3 kernel: da0: 400.000MB/s transfers Jan 22 15:49:33 kg-vm3 kernel: da0: 1907729MB (3907029167 512 byte sectors: 255H 63S/T 243201C) Jan 22 15:49:33 kg-vm3 kernel: da0: quirks=0x2<NO_6_BYTE>
and usbconfig says:
root@kg-vm3# usbconfig ugen0.1: <XHCI root HUB 0x8086> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) ugen0.4: <Bluetooth Radio Realtek> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA) ugen0.2: <BUP Slim BK Seagate> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (36mA)
device description:
root@kg-vm3# usbconfig -d ugen0.2 dump_device_desc ugen0.2: <BUP Slim BK Seagate> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (36mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0300 bDeviceClass = 0x0000 <Probed by interface class> bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0009 idVendor = 0x0bc2 idProduct = 0xab24 bcdDevice = 0x0100 iManufacturer = 0x0002 <Seagate> iProduct = 0x0003 <BUP Slim BK> iSerialNumber = 0x0001 <NA7QYJ0W> bNumConfigurations = 0x0001
current config
root@kg-vm3# usbconfig -d ugen0.2 dump_curr_config_desc ugen0.2: <BUP Slim BK Seagate> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (36mA) Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0079 bNumInterfaces = 0x0001 bConfigurationValue = 0x0001 iConfiguration = 0x0000 <no string> bmAttributes = 0x0080 bMaxPower = 0x0012 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x0008 <Mass storage> bInterfaceSubClass = 0x0006 bInterfaceProtocol = 0x0050 iInterface = 0x0000 <no string> Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 <IN> bmAttributes = 0x0002 <BULK> wMaxPacketSize = 0x0400 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Additional Descriptor bLength = 0x06 bDescriptorType = 0x30 bDescriptorSubType = 0x0f RAW dump: 0x00 | 0x06, 0x30, 0x0f, 0x00, 0x00, 0x00 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0002 <OUT> bmAttributes = 0x0002 <BULK> wMaxPacketSize = 0x0400 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Additional Descriptor bLength = 0x06 bDescriptorType = 0x30 bDescriptorSubType = 0x0f RAW dump: 0x00 | 0x06, 0x30, 0x0f, 0x00, 0x00, 0x00 Interface 0 Alt 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0001 bNumEndpoints = 0x0004 bInterfaceClass = 0x0008 <Mass storage> bInterfaceSubClass = 0x0006 bInterfaceProtocol = 0x0062 iInterface = 0x0000 <no string> Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 <IN> bmAttributes = 0x0002 <BULK> wMaxPacketSize = 0x0400 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Additional Descriptor bLength = 0x06 bDescriptorType = 0x30 bDescriptorSubType = 0x0f RAW dump: 0x00 | 0x06, 0x30, 0x0f, 0x05, 0x00, 0x00 Additional Descriptor bLength = 0x04 bDescriptorType = 0x24 bDescriptorSubType = 0x03 RAW dump: 0x00 | 0x04, 0x24, 0x03, 0x00 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0002 <OUT> bmAttributes = 0x0002 <BULK> wMaxPacketSize = 0x0400 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Additional Descriptor bLength = 0x06 bDescriptorType = 0x30 bDescriptorSubType = 0x0f RAW dump: 0x00 | 0x06, 0x30, 0x0f, 0x05, 0x00, 0x00 Additional Descriptor bLength = 0x04 bDescriptorType = 0x24 bDescriptorSubType = 0x04 RAW dump: 0x00 | 0x04, 0x24, 0x04, 0x00 Endpoint 2 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0083 <IN> bmAttributes = 0x0002 <BULK> wMaxPacketSize = 0x0400 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Additional Descriptor bLength = 0x06 bDescriptorType = 0x30 bDescriptorSubType = 0x0f RAW dump: 0x00 | 0x06, 0x30, 0x0f, 0x05, 0x00, 0x00 Additional Descriptor bLength = 0x04 bDescriptorType = 0x24 bDescriptorSubType = 0x02 RAW dump: 0x00 | 0x04, 0x24, 0x02, 0x00 Endpoint 3 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0004 <OUT> bmAttributes = 0x0002 <BULK> wMaxPacketSize = 0x0400 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Additional Descriptor bLength = 0x06 bDescriptorType = 0x30 bDescriptorSubType = 0x00 RAW dump: 0x00 | 0x06, 0x30, 0x00, 0x00, 0x00, 0x00 Additional Descriptor bLength = 0x04 bDescriptorType = 0x24 bDescriptorSubType = 0x01 RAW dump: 0x00 | 0x04, 0x24, 0x01, 0x00
gpart says:
root@kg-vm3# gpart show -p da0 => 63 3907029104 da0 MBR (1.8T) 63 1985 - free - (993K) 2048 3907027119 da0s1 ntfs [active] (1.8T)
that's it.
2016-01-17: ada0p2 - a quick reboot later:
root@kg-vm3# date;temp;swapinfo -h;echo " ";df -h;echo " ";uptime Sun Jan 17 20:58:07 CET 2016 dev.cpu.0.temperature: 43.0C dev.cpu.1.temperature: 51.0C Device 1K-blocks Used Avail Capacity /dev/ada0p3 3974068 0B 3.8G 0% Filesystem Size Used Avail Capacity Mounted on /dev/ada0p2 105G 997M 95G 1% / devfs 1.0K 1.0K 0B 100% /dev 8:58PM up 4 mins, 1 user, load averages: 0.05, 0.19, 0.10
and gpart says:
root@kg-vm3# gpart show -p => 34 234441581 ada0 GPT (112G) 34 1024 ada0p1 freebsd-boot (512K) 1058 226492416 ada0p2 freebsd-ufs (108G) 226493474 7948141 ada0p3 freebsd-swap (3.8G)
great.
2016-01-17: ada0p2 - use dump / restore to copy stuff: mount
root@kg-vm3# mount /dev/ada1p2 /mnt root@kg-vm3# cd /mnt
dump and restore
root@kg-vm3# dump -C16 -0aLf - /dev/ada0p2 | restore -rf - mksnap_ffs: Cannot create snapshot //.snap/dump_snapshot: /: Snapshots are not yet supported when running with journaled soft updates: Operation not supported dump: Cannot create //.snap/dump_snapshot: No such file or directory Tape is not a dump tape
ok, try without 'L' then:
root@kg-vm3# dump -C16 -0af - /dev/ada0p2 | restore -rf - DUMP: WARNING: should use -L when dumping live read-write filesystems! DUMP: Date of this level 0 dump: Sun Jan 17 20:39:28 2016 DUMP: Date of last level 0 dump: the epoch DUMP: Dumping /dev/ada0p2 (/) to standard output DUMP: mapping (Pass I) [regular files] DUMP: Cache 16 MB, blocksize = 65536 DUMP: mapping (Pass II) [directories] DUMP: estimated 976257 tape blocks. DUMP: dumping (Pass III) [directories] DUMP: dumping (Pass IV) [regular files] warning: ./.snap: File exists ./.sujournal: cannot create file: Operation not permitted DUMP: DUMP: 975764 tape blocks DUMP: finished in 31 seconds, throughput 31476 KBytes/sec DUMP: DUMP IS DONE
well, did it work? Only one way to find out.
2016-01-17: ada0p2 - configure ada1 and copy everything over: What do we have?
root@kg-vm3# gpart show -p => 34 468862061 ada0 GPT (224G) 34 1024 ada0p1 freebsd-boot (512K) 1058 230686720 ada0p2 freebsd-ufs (110G) 230687778 8388608 ada0p3 freebsd-swap (4.0G) 239076386 229785709 - free - (110G)
only ada0. create GPT on ada1:
root@kg-vm3# gpart create -s GPT ada1 ada1 created
now we have
root@kg-vm3# gpart show -p => 34 468862061 ada0 GPT (224G) 34 1024 ada0p1 freebsd-boot (512K) 1058 230686720 ada0p2 freebsd-ufs (110G) 230687778 8388608 ada0p3 freebsd-swap (4.0G) 239076386 229785709 - free - (110G) => 34 234441581 ada1 GPT (112G) 34 234441581 - free - (112G) => 34 234441581 diskid/DISK-CVLI317501Y7120B GPT (112G) 34 234441581 - free - (112G)
both ada0 and ada1 good.
add boot partition
root@kg-vm3# gpart add -t freebsd-boot -s 512K ada1 ada1p1 added
add bootcode
root@kg-vm3# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada1 bootcode written to ada1
ok. add a ufs partition
root@kg-vm3# gpart add -t freebsd-ufs -s 108G ada1 ada1p2 added
add a swap partition
root@kg-vm3# gpart add -t freebsd-swap ada1 ada1p3 added
what does it look like?
root@kg-vm3# gpart show -p ada1 => 34 234441581 ada1 GPT (112G) 34 1024 ada1p1 freebsd-boot (512K) 1058 226492416 ada1p2 freebsd-ufs (108G) 226493474 7948141 ada1p3 freebsd-swap (3.8G)
looks ok. Check the filesystem details of ada0p2:
root@kg-vm3# dumpfs -m /dev/ada0p2 # newfs command for /dev/ada0p2 (/dev/ada0p2) newfs -O 2 -U -a 4 -b 32768 -d 32768 -e 4096 -f 4096 -g 16384 -h 64 -i 8192 -j -k 6408 -m 8 -o time -s 230686720 /dev/ada0p2
create a filesystem on ada1p2:
root@kg-vm3# newfs -U -j /dev/ada1p2 /dev/ada1p2: 110592.0MB (226492416 sectors) block size 32768, fragment size 4096 using 177 cylinder groups of 626.09MB, 20035 blks, 80256 inodes. with soft updates super-block backups (for fsck_ffs -b #) at: 192, 1282432, 2564672, 3846912, 5129152, 6411392, 7693632, 8975872, 10258112, 11540352, 12822592, 14104832, 15387072, 16669312, 17951552, 19233792, 20516032, 21798272, 23080512, 24362752, 25644992, 26927232, 28209472, 29491712, 30773952, 32056192, 33338432, 34620672, 35902912, 37185152, 38467392, 39749632, 41031872, 42314112, 43596352, 44878592, 46160832, 47443072, 48725312, 50007552, 51289792, 52572032, 53854272, 55136512, 56418752, 57700992, 58983232, 60265472, 61547712, 62829952, 64112192, 65394432, 66676672, 67958912, 69241152, 70523392, 71805632, 73087872, 74370112, 75652352, 76934592, 78216832, 79499072, 80781312, 82063552, 83345792, 84628032, 85910272, 87192512, 88474752, 89756992, 91039232, 92321472, 93603712, 94885952, 96168192, 97450432, 98732672, 100014912, 101297152, 102579392, 103861632, 105143872, 106426112, 107708352, 108990592, 110272832, 111555072, 112837312, 114119552, 115401792, 116684032, 117966272, 119248512, 120530752, 121812992, 123095232, 124377472, 125659712, 126941952, 128224192, 129506432, 130788672, 132070912, 133353152, 134635392, 135917632, 137199872, 138482112, 139764352, 141046592, 142328832, 143611072, 144893312, 146175552, 147457792, 148740032, 150022272, 151304512, 152586752, 153868992, 155151232, 156433472, 157715712, 158997952, 160280192, 161562432, 162844672, 164126912, 165409152, 166691392, 167973632, 169255872, 170538112, 171820352, 173102592, 174384832, 175667072, 176949312, 178231552, 179513792, 180796032, 182078272, 183360512, 184642752, 185924992, 187207232, 188489472, 189771712, 191053952, 192336192, 193618432, 194900672, 196182912, 197465152, 198747392, 200029632, 201311872, 202594112, 203876352, 205158592, 206440832, 207723072, 209005312, 210287552, 211569792, 212852032, 214134272, 215416512, 216698752, 217980992, 219263232, 220545472, 221827712, 223109952, 224392192, 225674432 Using inode 4 in cg 0 for 33554432 byte journal newfs: soft updates journaling set
verify
root@kg-vm3# dumpfs -m /dev/ada1p2 # newfs command for /dev/ada1p2 (/dev/ada1p2) newfs -O 2 -U -a 4 -b 32768 -d 32768 -e 4096 -f 4096 -g 16384 -h 64 -i 8192 -j -k 6408 -m 8 -o time -s 226492416 /dev/ada1p2
ok.
2016-01-17: ada0p2 - when booted with the mSATA SSD installed, I get this in /var/log/messages:
ada1 at ahcich1 bus 0 scbus1 target 0 lun 0 ada1: <INTEL SSDMCEAC120A3 LLGi> ACS-2 ATA SATA 3.x device ada1: Serial Number CVLI317501Y7120B ada1: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada1: Command Queueing enabled ada1: 114473MB (234441648 512 byte sectors: 16H 63S/T 16383C) ada1: Previously was known as ad6
ok.
2015-11-14: ada0p2 - change to new firewall noted in /var/log/messages:
Nov 14 13:48:26 kg-vm3 kernel: arp: 10.1.10.1 moved from 00:10:4b:e3:38:8b to 80:ee:73:60:61:0c on re0
that's all.
2015-10-15: ada0p2 - configuring the box for bhyve on boot (from the FreeBSD as a Host with bhyve chapter in the FreeBSD Handbook). to /boot/loader.conf I added vmm, nmdm, if_bridge and if_tap. Complete file:
root@kg-vm3# more /boot/loader.conf coretemp_load="YES" vmm_load="YES" nmdm_load="YES" if_bridge_load="YES" if_tap_load="YES" to /etc/sysctl.conf I added: net.link.tap.up_on_open=1
the file was empty before this.
to /etc/rc.conf I added these three lines:
# network configuration for bhyve
cloned_interfaces="bridge0 tap0"
ifconfig_bridge0="addm re0 addm tap0"
the physical interface on this machine is re0.
Do a manual setup as a test:
root@kg-vm3# kldload vmm root@kg-vm3# ifconfig tap0 create root@kg-vm3# sysctl net.link.tap.up_on_open=1 net.link.tap.up_on_open: 0 -> 1 root@kg-vm3# ifconfig bridge0 create root@kg-vm3# ifconfig bridge0 addm re0 addm tap0 ifconfig: BRDGADD re0: File exists root@kg-vm3# ifconfig bridge0 up
How does the network interfaces look?
root@kg-vm3# ifconfig re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=82099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE> ether 60:02:92:b5:cd:2c inet 10.1.150.29 netmask 0xffff0000 broadcast 10.1.255.255 nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet autoselect (1000baseT <full-duplex>) status: active lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6> inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> tap0: flags=8902<BROADCAST,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=80000<LINKSTATE> ether 00:bd:27:fd:86:00 nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet autoselect status: no carrier bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether 02:50:da:09:e9:00 nd6 options=9<PERFORMNUD,IFDISABLED> id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: tap0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> ifmaxaddr 0 port 3 priority 128 path cost 2000000 member: re0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> ifmaxaddr 0 port 1 priority 128 path cost 20000
like that.
2015-09-19: ada0p2 - test virtualization by loading bhyve's vmm:
root@kg-vm3# kldload vmm
and in /var/log/messages, I get:
Sep 19 11:45:32 kg-vm3 kernel: pci0: driver added Sep 19 11:45:32 kg-vm3 kernel: found-> vendor=0x8086, dev=0x2298, revid=0x21 Sep 19 11:45:32 kg-vm3 kernel: domain=0, bus=0, slot=26, func=0 Sep 19 11:45:32 kg-vm3 kernel: class=10-80-00, hdrtype=0x00, mfdev=0 Sep 19 11:45:32 kg-vm3 kernel: cmdreg=0x0106, statreg=0x0010, cachelnsz=0 (dwords) Sep 19 11:45:32 kg-vm3 kernel: lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) Sep 19 11:45:32 kg-vm3 kernel: intpin=a, irq=21 Sep 19 11:45:32 kg-vm3 kernel: powerspec 3 supports D0 D3 current D0 Sep 19 11:45:32 kg-vm3 kernel: MSI supports 1 message Sep 19 11:45:32 kg-vm3 kernel: pci0:0:26:0: reprobing on driver added Sep 19 11:45:32 kg-vm3 kernel: found-> vendor=0x8086, dev=0x2292, revid=0x21 Sep 19 11:45:32 kg-vm3 kernel: domain=0, bus=0, slot=31, func=3 Sep 19 11:45:32 kg-vm3 kernel: class=0c-05-00, hdrtype=0x00, mfdev=0 Sep 19 11:45:32 kg-vm3 kernel: cmdreg=0x0003, statreg=0x0290, cachelnsz=0 (dwords) Sep 19 11:45:32 kg-vm3 kernel: lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) Sep 19 11:45:32 kg-vm3 kernel: intpin=b, irq=18 Sep 19 11:45:32 kg-vm3 kernel: powerspec 3 supports D0 D3 current D0 Sep 19 11:45:32 kg-vm3 kernel: pci0:0:31:3: reprobing on driver added Sep 19 11:45:32 kg-vm3 kernel: pci1: driver added Sep 19 11:45:32 kg-vm3 kernel: found-> vendor=0x10ec, dev=0x8821, revid=0x00 Sep 19 11:45:32 kg-vm3 kernel: domain=0, bus=1, slot=0, func=0 Sep 19 11:45:32 kg-vm3 kernel: class=02-80-00, hdrtype=0x00, mfdev=0 Sep 19 11:45:32 kg-vm3 kernel: cmdreg=0x0007, statreg=0x0010, cachelnsz=0 (dwords) Sep 19 11:45:32 kg-vm3 kernel: lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) Sep 19 11:45:32 kg-vm3 kernel: intpin=a, irq=16 Sep 19 11:45:32 kg-vm3 kernel: powerspec 3 supports D0 D1 D2 D3 current D0 Sep 19 11:45:32 kg-vm3 kernel: MSI supports 1 message, 64 bit Sep 19 11:45:32 kg-vm3 kernel: pci0:1:0:0: reprobing on driver added Sep 19 11:45:32 kg-vm3 kernel: pci2: driver added
interesting. Or not.
root@kg-vm3# kldstat Id Refs Address Size Name 1 27 0xffffffff80200000 179ddb0 kernel 2 1 0xffffffff81a11000 2baa uhid.ko 3 1 0xffffffff81a14000 358e ums.ko 4 1 0xffffffff81a18000 4e84 ng_ubt.ko 5 5 0xffffffff81a1d000 b9db netgraph.ko 6 1 0xffffffff81a29000 93a2 ng_hci.ko 7 3 0xffffffff81a33000 1077 ng_bluetooth.ko 8 1 0xffffffff81a35000 c32f ng_l2cap.ko 9 1 0xffffffff81a42000 1a6d4 ng_btsocket.ko 10 1 0xffffffff81a5d000 3832 ng_socket.ko 11 1 0xffffffff81a61000 29fd coretemp.ko 12 1 0xffffffff81a64000 1b1baf vmm.ko
kldstat shows that the module is loaded at least.
2015-09-19: ada0p2 - checking if the coretemp module works:
root@kg-vm3# kldload coretemp
check
root@kg-vm3# sysctl dev.cpu dev.cpu.1.temperature: 63.0C dev.cpu.1.coretemp.throttle_log: 0 dev.cpu.1.coretemp.tjmax: 90.0C dev.cpu.1.coretemp.resolution: 1 dev.cpu.1.coretemp.delta: 27 dev.cpu.1.cx_usage: 100.00% 0.00% 0.00% last 5604us dev.cpu.1.cx_lowest: C1 dev.cpu.1.cx_supported: C1/1/1 C2/2/500 C3/3/5000 dev.cpu.1.%parent: acpi0 dev.cpu.1.%pnpinfo: _HID=none _UID=0 dev.cpu.1.%location: handle=\_PR_.CPU1 dev.cpu.1.%driver: cpu dev.cpu.1.%desc: ACPI CPU dev.cpu.0.temperature: 56.0C dev.cpu.0.coretemp.throttle_log: 0 dev.cpu.0.coretemp.tjmax: 90.0C dev.cpu.0.coretemp.resolution: 1 dev.cpu.0.coretemp.delta: 34 dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 396us dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_supported: C1/1/1 C2/2/500 C3/3/5000 dev.cpu.0.freq_levels: 1041/2000 1040/2000 960/1800 880/1600 800/1400 720/1200 640/1000 560/800 480/600 dev.cpu.0.freq: 1040 dev.cpu.0.%parent: acpi0 dev.cpu.0.%pnpinfo: _HID=none _UID=0 dev.cpu.0.%location: handle=\_PR_.CPU0 dev.cpu.0.%driver: cpu dev.cpu.0.%desc: ACPI CPU dev.cpu.%parent:
looks like it works.
2015-09-19: ada0p2 - FreeBSD 10.2-release installed. dmesg output: normal, verbose.
tingo@kg-vm3$ uname -a FreeBSD kg-vm3.kg4.no 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 tingo@kg-vm3$ freebsd-version 10.2-RELEASE
disk layout
tingo@kg-vm3$ df -h Filesystem Size Used Avail Capacity Mounted on /dev/ada0p2 107G 915M 97G 1% / devfs 1.0K 1.0K 0B 100% /dev tingo@kg-vm3$ swapinfo -h Device 1K-blocks Used Avail Capacity /dev/ada0p3 4194304 0B 4.0G 0%
partition info
tingo@kg-vm3$ gpart show -p ada0 => 34 468862061 ada0 GPT (224G) 34 1024 ada0p1 freebsd-boot (512K) 1058 230686720 ada0p2 freebsd-ufs (110G) 230687778 8388608 ada0p3 freebsd-swap (4.0G) 239076386 229785709 - free - (110G)
ok. PCI info
tingo@kg-vm3$ pciconf -lv hostb0@pci0:0:0:0: class=0x060000 card=0x22b11849 chip=0x22808086 rev=0x21 hdr=0x00 vendor = 'Intel Corporation' class = bridge subclass = HOST-PCI vgapci0@pci0:0:2:0: class=0x030000 card=0x22b11849 chip=0x22b18086 rev=0x21 hdr=0x00 vendor = 'Intel Corporation' class = display subclass = VGA ahci0@pci0:0:19:0: class=0x010601 card=0x22a31849 chip=0x22a38086 rev=0x21 hdr=0x00 vendor = 'Intel Corporation' class = mass storage subclass = SATA xhci0@pci0:0:20:0: class=0x0c0330 card=0x22b51849 chip=0x22b58086 rev=0x21 hdr=0x00 vendor = 'Intel Corporation' class = serial bus subclass = USB none0@pci0:0:26:0: class=0x108000 card=0x22981849 chip=0x22988086 rev=0x21 hdr=0x00 vendor = 'Intel Corporation' class = encrypt/decrypt hdac0@pci0:0:27:0: class=0x040300 card=0x02831849 chip=0x22848086 rev=0x21 hdr=0x00 vendor = 'Intel Corporation' class = multimedia subclass = HDA pcib1@pci0:0:28:0: class=0x060400 card=0x22c81849 chip=0x22c88086 rev=0x21 hdr=0x01 vendor = 'Intel Corporation' class = bridge subclass = PCI-PCI pcib2@pci0:0:28:1: class=0x060400 card=0x22ca1849 chip=0x22ca8086 rev=0x21 hdr=0x01 vendor = 'Intel Corporation' class = bridge subclass = PCI-PCI isab0@pci0:0:31:0: class=0x060100 card=0x229c1849 chip=0x229c8086 rev=0x21 hdr=0x00 vendor = 'Intel Corporation' class = bridge subclass = PCI-ISA none1@pci0:0:31:3: class=0x0c0500 card=0x22921849 chip=0x22928086 rev=0x21 hdr=0x00 vendor = 'Intel Corporation' class = serial bus subclass = SMBus none2@pci0:1:0:0: class=0x028000 card=0x882110ec chip=0x882110ec rev=0x00 hdr=0x00 vendor = 'Realtek Semiconductor Co., Ltd.' class = network re0@pci0:2:0:0: class=0x020000 card=0x81681849 chip=0x816810ec rev=0x11 hdr=0x00 vendor = 'Realtek Semiconductor Co., Ltd.' device = 'RTL8111/8168B PCI Express Gigabit Ethernet controller' class = network subclass = ethernet
usb info
root@kg-vm3:~ # usbconfig ugen0.1: <XHCI root HUB 0x8086> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) ugen0.2: <HID compliant keyboard Logitech> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA) ugen0.3: <Express Mouse Microsoft> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA) ugen0.4: <Bluetooth Radio Realtek> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA)
ok.
2015-09-19: I installed FreeBSD 10.2-release on the ssd (ada0). Norwegian keymap, named the machine kg-vm3.kg4.no, I removed games and ports from additional components, I used Guided diisk setup, selected ada0, Partition, GPT, which gave me a 512kB freebsd-boot, 220GB freebsd-ufs and 3.6 GB freebsd-swap. I changed freebsd-ufs to 110GB and freebsd-swap to 4 GB. After writing partitions, the install started. After extracting everything, it was set a root password, select network interface (re0), IPv4, DHCP, I said no to IPv6, Then it was sshd, ntpd, and users setup. For final modifications, I added a send dhcp-client-identifier line to /etc/dhclient.conf.
2015-09-19: I booted FreeBSD 10.2-release off a usb stick. dmesg output: normal, verbose. I had the machine connected via Ethernet. To get it on the network I did
dhclient re0
and that was it. I used kbdmap
(menu driven) to get a Norwegian keyboard layout.
2015-09-18: I booted FreeBSD 10.1-release off a usb stick. dmesg output: normal, verbose. I had the machine connected via Ethernet. To get it on the network I did
dhclient re0
and that was it. I used kbdmap
(menu driven) to get a Norwegian keyboard layout.