ports@,

I'm working for months to make using qemu-baes VMs with OpenBSD simple.

Now I'm at the point when I'd like to add my work to ports because I think
it can be quite usefull for others.

Here my script which allows me to run my VMs as disposable on demand, or as
long running services.

Disposable usuall runs as:

    obsd.sh -s -i octeon

to instal one and after that just

    obsd.sh octeon

and I run it as services, under _vmd user by this was.

To install:

    doas su -c obsd_octeon -s /bin/sh _vmd /usr/local/bin/obsd.sh -d /var/vm -s 
-i octeon

make a services

    doas ln -s /etc/rc.d/obsd /etc/rc.d/obsd_octeon
    doas cp /etc/login.conf.d/obsd /etc/login.conf.d/obsd_octeon
    doas sed -i 's/^obsd:/obsd_octeon:/' /etc/login.conf.d/obsd_octeon
    doas rcctl enable obsd_octeon
    doas rcctl set obsd_octeon flags -p 22222 octeon

after that I can connect to that VM via ssh with following conifg:

    Host obsd-octeon.some-host
      HostKeyAlias obsd-octeon.some-host
      Port 22222

    Host obsd-*.some-host
      ProxyJump some-host
      HostName 127.0.0.1
      User obsd
      IdentityFile /usr/local/share/examples/obsd.sh/obsd_ed25519.pem

and at host to connect to its console:

    doas -u _vmd tmux -N -S /var/vm/obsd_octeon.sock attach-session

Ok to import?

-- 
wbr, Kirill

Attachment: obsd.sh.tgz
Description: Binary data

Reply via email to