FreeBSD bhyve guest server

bhyveがサポートする仮想環境

virtio-blk

FreeBSD 8.4-RELEASE and newer, including CURRENT
bhyve - FreeBSD Wiki

FreeBSD 8.4-RELEASE以降 → virtio-blk

ahci-hd

HISTORY
The ahci driver first appeared in FreeBSD 8.0.
https://www.freebsd.org/cgi/man.cgi?ahci(4)

FreeBSD 8.0以降 → ahci-hdでいけるかも?

Best way to virtualize some old servers : freebsd

8.1で動作確認。ホスト側のcpu system使うので調査中

CentOS 5.5

https://github.com/churchers/vm-bhyve/blob/master/sample-templates/centos6.conf

https://github.com/churchers/vm-bhyve/wiki/Supported-Guest-Examples#centos-6-lvm

Solved - CentOS 5.5 in bhyve? | The FreeBSD Forums

https://github.com/churchers/vm-bhyve/wiki/Configuring-Grub-Guests

CentOS 5.5 VMkvmからbhyveに移行して動いた。

loader="grub"
cpu=1
memory=2G
network0_type="virtio-net"
network0_switch="public"
disk0_type="virtio-blk"
disk0_name="disk0.img"
grub_install0="linux /isolinux/vmlinuz acpi=off"
grub_install1="initrd /isolinux/initrd.img"
grub_run0="linux /vmlinuz-2.6.18-194.26.1.el5 ro root=/dev/VolGroup00/LogVol00 acpi=off"
grub_run1="initrd /initrd-2.6.18-194.26.1.el5.img"

grub_run は /boot/grub/grub.conf あたりで確認。カーネル更新時に要変更?

時刻がずれる問題がある?

cat /sys/devices/system/clocksource/clocksource0/current_clocksource
jiffies 
cat /sys/devices/system/clocksource/clocksource0/available_clocksource
jiffies

未解決 2022/7/13

CentOS 5 rescueモード
vm install test-vm CentOS-5.5-x86_64-bin-1of8.iso

grubでe
linux /isolinux/vmlinuz acpi=off を resucue acpi=off にして起動

                             GNU GRUB  version 2.00

 +--------------------------------------------------------------------------+
 | setparams 'test-vm (bhyve install)'                                      |
 |                                                                          |
 |     root=cd0                                                             |
 |     linux /isolinux/vmlinuz rescue acpi=off                              |
 |     initrd /isolinux/initrd.img                                          |
 |                                                                          |