Date: Mon, 17 Jun 2024 16:12:51 +0200 From: Mario Marietto <marietto2008@gmail.com> To: Odhiambo Washington <odhiambo@gmail.com> Cc: FreeBSD virtualization <freebsd-virtualization@freebsd.org> Subject: Re: How to launch a bhyve vm as normal user,without being root Message-ID: <CA%2B1FSijLiq0WMdCvJfQC%2BvtBxXc6iSMD6WQAMavGpg%2BsmCuTFg@mail.gmail.com> In-Reply-To: <CAAdA2WPrtG_VaLuE8UfBwxanyfNzgLqeBCvpJMvRETdcUSmMEg@mail.gmail.com> References: <CA%2B1FSiimo=-0s80QeGMuLnJAzxi53-V6s303YuW36UkYnqfB-g@mail.gmail.com> <CAAdA2WPrtG_VaLuE8UfBwxanyfNzgLqeBCvpJMvRETdcUSmMEg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000ad6f6a061b16916e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Nice idea,but it does not work : nano /home/marietto/.zshrc # ~/.zshrc # zsh autocompletion for sudo and doas zstyle ":completion:*:(sudo|su|doas):*" command-path /usr/local/bin /usr/local/sbin /usr/sbin /usr/bin /bin /sbin /bhyve nano doas.conf permit nopass marietto as root cmd bhyve-lin permit nopass marietto as root cmd bhyve-win nano 10-Debian-Now_wine-tkg-vm10 doas /usr/sbin/./bhyve-lin -S -c sockets=3D2,cores=3D2,threads=3D2 -m 8G -w= -H -A \ -s 0,hostbridge \ -s 1,ahci-hd,/mnt/zroot-133/bhyve/img/Linux/Debian-now-wine-tkg.img,bootindex= =3D1 \ -s 11,hda,play=3D/dev/dsp,rec=3D/dev/dsp \ -s 13,virtio-net,tap10 \ -s 14,virtio-9p,sharename=3D/ \ -s 29,fbuf,tcp=3D0.0.0.0:5910,w=3D1600,h=3D950,wait \ -s 30,xhci,tablet \ -s 31,lpc \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd \ vm0:10 < /dev/null & sleep 2 && vncviewer 0:10 =3D doas: Operation not permitted On Mon, Jun 17, 2024 at 2:24=E2=80=AFPM Odhiambo Washington <odhiambo@gmail= .com> wrote: > > > On Mon, Jun 17, 2024 at 2:19=E2=80=AFPM Mario Marietto <marietto2008@gmai= l.com> > wrote: > >> Hello. >> >> someone of you has been able to launch a bhyve vm as user using doas ? >> >> I'm trying but without success. First of all I created my doas.conf : >> >> >> nano /usr/local/etc/doas.conf >> >> permit nopass :marietto cmd bhyve >> permit nopass :marietto cmd vm-create >> >> > permit nopass marietto as root cmd bhyve > > -- > Best regards, > Odhiambo WASHINGTON, > Nairobi,KE > +254 7 3200 0004/+254 7 2274 3223 > In an Internet failure case, the #1 suspect is a constant: DNS. > "Oh, the cruft.", egrep -v '^$|^.*#' =C2=AF\_(=E3=83=84)_/=C2=AF :-) > [How to ask smart questions: > http://www.catb.org/~esr/faqs/smart-questions.html] > --=20 Mario. --000000000000ad6f6a061b16916e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Nice idea,but it does not work :</div><div><br></div>= <div>nano /home/marietto/.zshrc</div><div><br></div><div># ~/.zshrc<br># zs= h autocompletion for sudo and doas<br>zstyle ":completion:*:(sudo|su|d= oas):*" command-path /usr/local/bin /usr/local/sbin /usr/sbin /usr/bin= /bin /sbin /bhyve</div><div><br></div><div>nano doas.conf</div><div><br></= div><div>permit nopass marietto as root cmd bhyve-lin<br>permit nopass mari= etto as root cmd bhyve-win</div><div><br></div><div></div><div>nano 10-Debi= an-Now_wine-tkg-vm10<br></div><div><br></div><div>doas /usr/sbin/./bhyve-li= n -S -c sockets=3D2,cores=3D2,threads=3D2 -m 8G -w -H -A \<br>-s 0,hostbrid= ge \<br>-s 1,ahci-hd,/mnt/zroot-133/bhyve/img/Linux/Debian-now-wine-tkg.img= ,bootindex=3D1 \<br>-s 11,hda,play=3D/dev/dsp,rec=3D/dev/dsp \<br>-s 13,vir= tio-net,tap10 \<br>-s 14,virtio-9p,sharename=3D/ \<br>-s 29,fbuf,tcp=3D<a h= ref=3D"http://0.0.0.0:5910" target=3D"_blank">0.0.0.0:5910</a>,w=3D1600,h= =3D950,wait \<br>-s 30,xhci,tablet \<br>-s 31,lpc \<br>-l bootrom,/usr/loca= l/share/uefi-firmware/BHYVE_UEFI_CODE.fd \<br>vm0:10 < /dev/null & s= leep 2 && vncviewer 0:10</div><div><br></div><div>=3D<br></div><div= ><br></div><div>doas: Operation not permitted</div></div><br><div class=3D"= gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Jun 17, 2024 at = 2:24=E2=80=AFPM Odhiambo Washington <<a href=3D"mailto:odhiambo@gmail.co= m" target=3D"_blank">odhiambo@gmail.com</a>> wrote:<br></div><blockquote= class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so= lid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><b= r></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr= ">On Mon, Jun 17, 2024 at 2:19=E2=80=AFPM Mario Marietto <<a href=3D"mai= lto:marietto2008@gmail.com" target=3D"_blank">marietto2008@gmail.com</a>>= ; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px= 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div di= r=3D"ltr"> =20 <span> =20 </span> =20 =20 =20 <div> <div> <div id=3D"m_-478838054079622550m_-7454093540265596212m_-894476881096= 8800024gmail-t3_1dgm9w5-post-rtjson-content"> <p> Hello. </p><p> someone of you has been able to launch a bhyve vm as user using doas ? </p><p> I'm trying but without success. First of all I created my doas.conf= :</p><p><br></p><p></p><pre>nano /usr/local/etc/doas.conf permit nopass :marietto cmd bhyve permit nopass :marietto cmd vm-create<br></pre></div></div></div></div></bl= ockquote><div></div></div><div><br></div>permit nopass marietto as root cmd= bhyve<br><div><br></div><span class=3D"gmail_signature_prefix">-- </span><= br><div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr"><div dir=3D"= ltr"><div>Best regards,<br>Odhiambo WASHINGTON,<br>Nairobi,KE<br>+254 7 320= 0 0004/+254 7 2274 3223</div><div><span style=3D"color:rgb(34,34,34)">=C2= =A0In=C2=A0</span><span style=3D"color:rgb(34,34,34)">an Internet failure c= ase, the #1 suspect is a constant: DNS.</span><br>"<span style=3D"font= -size:12.8px">Oh, the cruft.</span><span style=3D"font-size:12.8px">",= =C2=A0</span><span style=3D"font-size:12.8px">egrep -v '^$|^.*#'=C2= =A0</span><span style=3D"background-color:rgb(34,34,34);color:rgb(238,238,2= 38);font-family:"Lucida Console",Consolas,"Courier New"= ,monospace;font-size:13.6px">=C2=AF\_(=E3=83=84)_/=C2=AF</span><span style= =3D"font-size:12.8px">=C2=A0:-)</span></div><div><span style=3D"font-size:1= 2.8px">[How to ask smart questions:=C2=A0</span><span style=3D"font-size:12= .8px"><a href=3D"http://www.catb.org/~esr/faqs/smart-questions.html" target= =3D"_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a>]</span><= /div></div></div></div></div> </blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre= fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Mario.<br></d= iv> --000000000000ad6f6a061b16916e--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSijLiq0WMdCvJfQC%2BvtBxXc6iSMD6WQAMavGpg%2BsmCuTFg>