[00:42] <MIF> does anyone know a way to put a openbsd VPS on my ubuntu server?
[00:47] <sarnold> MIF: I think, install virt-manager libvirt-daemon-system -- make sure your user can do libvirt things (maybe just logging in again), run virt-manager, and then make a new VM
[00:48] <MIF> ok thanks sarnold 
[13:38] <punkgeek> Anyone can help me this problem? I couldn't find any article
[13:38] <punkgeek> ~# virsh -c qemu+libssh2://root@192.168.1.2/system?sshauth=123456 error: failed to connect to the hypervisor error: libssh2 transport support was not enabled: Function not implemented
[13:47] <leftyfb> punkgeek: sudo apt install libssh2-1
[13:48] <punkgeek> leftyfb; I've installed but didin't work
[13:49] <cpaelzer> punkgeek: libssh2 isn't fully supported (https://help.ubuntu.com/community/Repositories/Ubuntu) and therefore disabled in our qemu builds
[13:49] <cpaelzer> punkgeek: but that does not mean it can't do ssh
[13:49] <cpaelzer> the format you used isn't right for normal ssh, let me check my logs
[13:50] <cpaelzer> virsh -c qemu+ssh://root@192.168.1.2 should do
[13:50] <cpaelzer> with a user that can log in there
[13:50] <punkgeek> cpaelzer: Thank you, I want to connect without using ssh key or other ways,
[13:50] <punkgeek> cpaelzer: This methods required to enter password, but I want to use it in the api method
[13:51] <cpaelzer> keys is what I see everyone (including myself) use
[13:51] <cpaelzer> which allows non PW API calls as you'd want to
[13:52] <cpaelzer> to be clear even upstream qemu in 2019 switched to libssh (vs libssh2) so I guess they should be somewhat feature comparable
[13:52] <cpaelzer> this was where libssh2 promotion to main was discussed https://bugs.launchpad.net/ubuntu/+source/libssh2/+bug/681423
[13:53] <cpaelzer> but really the question for you now is how do you want to ssh log-in - I've not yet seen this ?sshauth=123456  yet - what is it supposed to do?
[13:53] <punkgeek> cpaelzer:  shauth  libssh2, libssh  A comma separated list of authentication methods to use. Default (is "agent,privkey,password,keyboard-interactive". The order of the methods is preserved. Some methods may require additional parameters.   https://libvirt.org/uri.html
[13:54] <cpaelzer> but that is listed for non-2 libssh as well
[13:54] <cpaelzer> so did you try that (your original example but s/libssh2/ssh/ )
[13:55] <cpaelzer> oh I seeh ssh <-> libssh is also different
[13:56] <cpaelzer> hmm we clearly have --enable-libssh set
[13:56] <cpaelzer> maybe not in libvirt ... checking ...
[13:58] <punkgeek> pardon me?
[13:59] <cpaelzer> there is libssh and libssh2 and they are not as "one is the old and one the new one" as one might think
[13:59] <cpaelzer> libssh is in main and threfore enabled in e.g. qemu
[13:59] <cpaelzer> but since you use virsh that is from source of libvirt
[13:59] <cpaelzer> so I need to check what is enabled there
[13:59] <cpaelzer> maybe we still need to make the swicth there following qemu (at conigure/build time)
[14:00] <punkgeek> how can I do that?
[14:01] <cpaelzer> if that is really the case you'd need to rebuild libvirt
[14:01] <cpaelzer> I can do that in the coming release and going forward if that is really a problem
[14:01] <cpaelzer> but since it is adding a new feature I can't help you in an active release as that would violate https://wiki.ubuntu.com/StableReleaseUpdates
[14:02] <cpaelzer> but before any panic I'd want to check if that is really the underlying issue here
[14:02] <cpaelzer> and for you - right now - I'd recommend to tune the genreal setup to work with qemu+ssh: which is what everyone seems to use
[14:02] <cpaelzer> although that might mean key setup insetad whatever libssh would have required you to set up in advance
[14:05] <punkgeek> Thank you sir, 
[14:10] <cpaelzer> punkgeek: I've filed a bug for this and the next Ubuntu release should have that functionality https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1939416
[14:10] <cpaelzer> via https://launchpad.net/~canonical-server/+archive/ubuntu/server-backports that will also be somewhat available for LTSes shortly after
[15:43] <punkgeek> paelzer: Thank you so much. With VMware's PowerCLI you can invoke a script inside a guest, even before the guest has network connectivity, using the Invoke-VMScript Cmdlet (requires vmtools to be installed). Is there a similar mechanism available for invoking scripts inside KVM guests, before networking is available? I need to run a bash script after VM is powered on.
[15:45] <punkgeek> cpaelzer:
[15:45] <cpaelzer> there is an independent way to do that and much more on any cloud/VM or otherwise via https://cloudinit.readthedocs.io/en/latest/
[15:46] <cpaelzer> you can provide a datasource with instructions and if it finds on initializing a cloud image it will execute them
[15:46] <cpaelzer> I don't know much about your setup, but in most cases that ist the best solution for what I think you ask for
[15:50] <punkgeek> cpaelzer: Thank you but I don't want to use cloud-init method. Is there any other methods? I want to run a shell script after vm boot up for only one time
[15:53] <cpaelzer> sorry punkgeek there might be things, but nothing comes to mind as whenever myself or someone needed it eventually they needed all the power that cloud-init gave them, so I have never bothered to look into alternatives much
[15:53] <cpaelzer> I mean get your instructions in a virtual disk, attach it to the system and that is it - passing a datasource isn't that hard
[15:54] <cpaelzer> not everone needs a net-scaled per system config
[15:54] <cpaelzer> you can use the same datasource image for all your systems
[17:32] <rbasak> punkgeek: cloud-init is the method we provide to let users run what they need on boot. That's the supported method. You can hack up your own unsupported method if you want, but cloud-init is the solution we use and recommend (as do many other distros).
[17:34] <rbasak> You might as well say "How do I open this wine bottle?" -> Us: "Here, use this corkscrew" -> You: "I don't want to use a corkscrew" -> Us: "?"
[17:46] <punkgeek> rbasak: In our control panel, we want to provide something like recipes, which clients can run a shell script  for install or config something. So in our case, cloud-init is not a good method. If you know any other method, I'll be thank ful.
[17:48] <punkgeek> for example, clients can select directadmin shell script to install and config it after the VM has been created. 
[17:51] <leftyfb> punkgeek: why isn't clout-init a good method for you?
[17:52] <leftyfb> punkgeek: oh, for a complete deployment solution. I'm pretty sure cloud-init is mainly a bootstrap to get some basic stuff configured. Something like ansible or chef or salt should be used beyond that
[17:53] <rbasak> punkgeek: so use cloud-init to initialise a more specialist agent suited to what you need.
[17:54] <rbasak> Even just to install a management ssh key or something, and then use ssh and ansible.
[17:54] <leftyfb> punkgeek: in your particular case, I use ansible to spin up lxd containers with no or wrong network info and then use ansible's delegate plugin to setup network and users which ansible then uses to connect directly to the container