Linux on bhyve

uefivncなしでインストールする場合はブートオプションを変更する。

ubuntu 20

bhyveでUbuntu仮想マシンを作る | FreeBSD Days 2020

loader="uefi"
CUIインストールする

eを押す
vmlinuz行の quiet を削除し text console=ttyS0,115200 を追加
qのところまでカーソルをすすめてdel
text console=ttyS0,115200 を追加して Ctrl-xですすめる

CentOS 7

loader="uefi"
CUIインストールする

7. bhyveでCentOSとUbuntuを動かす — KnotsCotsDiary 1 documentation

.iso/CentOS-7-x86_64-DVD-1908.iso 

# cat .templates/centos7cui.conf
loader="uefi"
graphics="no"
xhci_mouse="no"
cpu=1
memory=512M
network0_type="virtio-net"
network0_switch="public"
disk0_type="virtio-blk"
disk0_name="disk0.img"
utctime="yes"


sudo vm create -t centos7cui -s 20G -m 2G test
sudo vm install test CentOS-7-x86_64-DVD-1908.iso
sudo vm cosole test

‘e’を押して編集

setparams 'Test this media & install CentOS 7'                                  
                                                                               
        linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS\x207\x20x\
86_64 rd.live.check quiet                                                      
        initrdefi /images/pxeboot/initrd.img 

を
setparams 'Test this media & install CentOS 7'                                  
                                                                               
        linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS\x207\x20x\
86_64 text console=ttyS0,115200                                                      
        initrdefi /images/pxeboot/initrd.img 

にしてCtrl-x

Installation

 1) [x] Language settings                 2) [x] Time settings
        (English (United States))                (Asia/Tokyo timezone)
 3) [x] Installation source               4) [x] Software selection
        (Local media)                            (Minimal Install)
 5) [x] Installation Destination          6) [x] Kdump
        (Automatic partitioning                  (Kdump is enabled)
        selected)                         8) [x] Root password
 7) [ ] Network configuration                    (Password is set.)
        (Not connected)
 9) [ ] User creation
        (No user will be created)
でインストール

・ネットワークは後で設定
・ 5) [x] Installation Destination は 
[x] 1) : 20 GiB (vda)
[x] 2) Use All Space
[x] 1) Standard Partition

reboot後にrootログインして
cp -i /boot/efi/EFI/centos/grubx64.efi /boot/efi/EFI/BOOT

sudo vm stop test
sudo vm start test
で起動確認