I had the same issue with boot option in vm.conf and never solved my
difficulty using the vm.conf file itself (I assumed I must have
misunderstood the doc). Instead I used the command line option for vmctl
starting the machine. After I installed the O/S using bsd.rd I did not
need that option anymore.
My vm.conf looks like this.
switch "my_switch" {
# interface bridge0
add vether0
}
vm "vm1" {
memory 512M
disk /home/VM/disk.img
owner user:group
interface tap {
switch "my_switch"
}
disable
}
And the commands which seem to work (as root) are like so.
vmctl create /home/VM/disk2.img -s 10G
vmctl start vm2 -c -b /home/user/bsd.rd -m 512m -n my_switch -d
/home/VM/disk2.img
V/r,
Bryan
On Wed, Aug 16, 2017 at 10:50 PM, Carlos Cardenas <[email protected]>
wrote:
> Howdy.
>
> I've been playing around with vmm(4) on 6.1 and have noticed a few
> things that seem odd.
>
> Take the following vm.conf:
> ramdisk="/home/los/vmm/bsd.rd-current"
> switch "local" {
> add vether0
> }
> vm "test.vm" {
> boot $ramdisk
> disable
> owner los
> memory 2G
> disk "/home/los/vmm/test.vm.img"
> interface { switch "local" }
> }
>
> Doing vmd -n yields:
> /etc/vm.conf:6: syntax error
>
> Removing the boot line yields a warning about unused macro (referring
> to ramdisk).
>
> So now my config is:
> switch "local" {
> add vether0
> }
> vm "test.vm" {
> disable
> owner los
> memory 2G
> disk "/home/los/vmm/test.vm.img"
> interface { switch "local" }
> }
>
> vmd(8) is happy and am expecting
> vmctl start "test.vm" -b "/home/los/vmm/bsd.rd-current" -c
> to work since all the other params have been defined in vm.conf.
>
> Instead I get:
> vmctl: starting without disks
> vmctl: starting without network interfaces
> vmctl: start vm command failed: Operation not permitted
>
> Increasing verbose log on vmd gets me:
> startup
> /etc/vm.conf:4: switch "local" registered
> /etc/vm.conf:11: vm "test.vm" registered (disabled)
> vm_priv_brconfig: interface bridge0 description switch1-local
> vm_priv_brconfig: interface bridge0 add vether0
> vmd_configure: not creating vm test.vm (disabled)
> denied request 3 from uid 1000
>
> However, if I perform a "doas vmctl start...." first (along with
> install) and then define it in vm.conf, "vmctl start 'test.vm'" works as
> expected.
>
> What is the expected workflow for vmm?
>
> Any ideas on why the boot $ramdisk line is error'ing out?
>
> +--+
> Carlos
>
>