I have a jail with the configuration at
I setup it with the following commands:
Now I procced to install alpine linux
finally when I start the vm and try to enter the console I get the error:
/etc/jail.conf
Code:
acme {
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.consolelog = "/var/log/jail_console_${name}.log";
allow.raw_sockets;
allow.vmm;
enforce_statfs = 2;
securelevel = 2;
exec.clean;
mount.devfs;
devfs_ruleset = 25;
path = "/jails/${name}";
host.hostname = "${name}";
$id = "5";
$ip = "192.168.0.${id}/24";
$gateway = "192.168.0.1";
$bridge = "bridge0";
$epair = "epair${id}";
vnet;
vnet.interface = "${epair}b";
exec.prestart = "/sbin/ifconfig ${epair} create up";
exec.prestart += "/sbin/ifconfig ${epair}a up descr jail:${name}";
exec.prestart += "/sbin/ifconfig ${bridge} addm ${epair}a up";
exec.start += "/sbin/ifconfig ${epair}b ${ip} up";
exec.start += "/sbin/route add default ${gateway}";
exec.poststop = "/sbin/ifconfig ${bridge} deletem ${epair}a";
exec.poststop += "/sbin/ifconfig ${epair}a destroy";
}
Code:
bsdinstall jail /jails/acme
pkg -j acme install vm-bhyve bhyve-firmware edk2-bhyve grub2-bhyve
jexec acme sysrc vm_enable="YES"
jexec acme mkdir /vms
jexec acme sysrc vm_dir="/vms"
jexec acme vm init
jexec acme cp /usr/local/share/examples/vm-bhyve/* /vms/.templates/
jexec acme vm switch create public
jexec acme vm switch add public epair5b
jexec acme vm iso https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86_64/alpine-virt-3.20.3-x86_64.iso
jexec acme vm create -t alpine acme
jexec acme sed -i .bak "s/vanilla/virt/g" /vms/acme/acme.conf
jexec acme vm install -f acme alpine-virt-3.20.3-x86_64.iso
finally when I start the vm and try to enter the console I get the error:
Code:
vm console acme
/dev/nmdm-acme.1B: No such file or directory
link down
Last edited: