Re: vmm workflow
I found the problem with my config. 6.1 release doesn't have this commit: commit 6b03ca832af8774eea914a99e4e49c232b169cd4 Author: reyk Date: Thu Apr 6 21:35:22 2017 + "kernel" got renamed to "boot" in vm.conf but I didn't commit the parse.y bits. Found by Pontus Lundkvist OK deraadt So I just renamed "boot" to "kernel" and everything is golden. Verified that -current works with the original config (using "boot"). On 08/19/17 22:32, Mike Larkin wrote: > 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" 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 >> +--+ Carlos
Re: vmm workflow
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" 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 >
Re: vmm workflow
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 > +--+ > Carlos > > On Aug 17, 2017 12:48, "Mike Larkin" 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
Re: vmm workflow
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. +--+ Carlos On Aug 17, 2017 12:48, "Mike Larkin" 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
Re: vmm workflow
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
Re: vmm workflow
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 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 > >
vmm workflow
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