On Sat, Aug 19, 2017 at 10:24:57PM -0700, Mike Larkin wrote:
> On Thu, Aug 17, 2017 at 01:36:33PM -0700, Carlos Cardenas wrote:
> > Thanks Bryan and Mike.
> >
> > I'll stick to what y'all are suggesting.
> >
> > Is there a page for the vmm roadmap? I am interested in advancing vmm and
> > would like to participate in its development.
> >
>
> not really. people work on what they want to work on, like most of the rest of
> openbsd.
>
> that being said, diffs to fix bugs like the ones below are welcome. that
> would
> be a good way to get started.
>
> -ml
>
PS, the following content in /etc/vm.conf (based on yours) works fine for me.
ramdisk="/bsd.rd"
switch "x" {
add vether0
}
vm "tester" {
boot $ramdisk
memory 512M
disable
interface { switch "x" }
}
-ml
> > +--+
> > Carlos
> >
> > On Aug 17, 2017 12:48, "Mike Larkin" <[email protected]> wrote:
> >
> > On Wed, Aug 16, 2017 at 07:50:59PM -0700, Carlos Cardenas 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
> > >
> >
> > You can't yet specify part of the parameter list in vm.conf and override or
> > supplement that later with command line arguments to vmctl. So the thing
> > that
> > is breaking you is the -b option on your command line.
> >
> > I don't know why the macro expansion is failing.
> >
> > Note that the ability to supplement config options is something we planned
> > to
> > do at some point, just haven't got there yet. There are questions to be
> > answered about how that interacts with the "owner" concept. For now, either
> > specify all the VM config on the command line, or all of it in vm.conf.
> > Don't
> > mix and match.
> >
> > -ml
>