Solved vm-bhyve cannot install Linux - loader.lua no such file

When trying to install Devuan Linux as a bhyve virtual machine, there's an error:

Code:
# vm install -f devuan devuan_beowulf_3.1.1_amd64_desktop-live.iso
Starting devuan
* found guest in /zroot/vm/devuan
* booting...
Consoles: userboot 

FreeBSD/amd64 User boot lua, Revision 1.2
ERROR: cannot open /boot/lua/loader.lua: no such file or directory.

Type '?' for a list of commands, 'help' for more detailed help.
OK quit
unknown command
OK quit

The template devuan.conf is:

Code:
# grep -v '^#' devuan.conf 
loader="grub"
loader_timeout="3"
cpu=1
memory=2G
wired_memory="yes" 
utctime="yes" 
network0_type="virtio-net" 
network0_switch="public" 
disk0_type="ahci-hd" 
disk0_name="disk0" 
disk0_dev="file" 
grub_run_partition="1" 
grub_run_dir="/boot/grub" 
virt_random="2"
I've enabled AMD_Vi passthrough in /boot/loader.conf as it's said to be disable by default:
I've enabled AMD_Vi passthrough in /boot/loader.conf as it's said to be disable by default:
Code:
hw.vmm.amdvi.enable=1
 
Last edited by a moderator:
Probably there is something wrong with the desktop live ISO you used. I've done a quick installation using minimal netinstall.iso and works to me:
Code:
# vm iso | grep devuan
default             devuan_beowulf_3.1.1_amd64_netinstall.iso

Template devuan.conf :
Code:
loader="grub"
cpu=2
memory=2048M
network0_type="virtio-net"
network0_switch="public"
disk0_type="ahci-hd"
disk0_name="disk0.img"
grub_run_partition="1"
grub_run_dir="/boot/grub"

Here a screenshot...

1632530991425.png
 
For some reason, I got the idea that vm create devuan would use the .template/devuan.conf.
But it uses the default.conf. It's this file that gets copied to the devuan/ directory.
This problem is solved, although I'm encountering others.
 
For some reason, I got the idea that vm create devuan would use the .template/devuan.conf.
Add the -t option to create a VM with a specific template.

vm create -t devuan mydevuanvm

Code:
     create [-d datastore] [-t template] [-s size] name
             Create a new virtual machine.

             Unless specified, the default.conf template will be used and a
             20GB virtual disk image is created.  This command will create the
             virtual machine directory $vm_dir/$name, and create the
             configuration file and empty disk image within.

             -d datastore  Specify the datastore to create this virtual
                           machine under.  If not specified, the default
                           dataset will be used, which is the location
                           specified in /etc/rc.conf.

             -t template   Specifies the template to use from within the
                           $vm_dir/.templates directory.  The .conf suffix is
                           not required.

             -s size       The size of disk image to create in bytes.  Unless
                           specified, the guest image will be a sparse file
                           20GB in size.
vm(8)
 
Back
Top