/srv/irclogs.ubuntu.com/2021/08/10/#ubuntu-server.txt

MIFdoes anyone know a way to put a openbsd VPS on my ubuntu server?00:42
sarnoldMIF: 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 VM00:47
MIFok thanks sarnold 00:48
=== Thumpxr4 is now known as Thumpxr
=== blackro0t is now known as blackroot
=== fjmorazan_ is now known as fjmorazan
=== paride6 is now known as paride
=== Beret- is now known as Beret
=== arif-ali_ is now known as arif-ali
=== jelly-home is now known as jelly
punkgeekAnyone can help me this problem? I couldn't find any article13: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 implemented13:38
leftyfbpunkgeek: sudo apt install libssh2-113:47
punkgeekleftyfb; I've installed but didin't work13:48
cpaelzerpunkgeek: libssh2 isn't fully supported (https://help.ubuntu.com/community/Repositories/Ubuntu) and therefore disabled in our qemu builds13:49
cpaelzerpunkgeek: but that does not mean it can't do ssh13:49
cpaelzerthe format you used isn't right for normal ssh, let me check my logs13:49
cpaelzervirsh -c qemu+ssh://root@192.168.1.2 should do13:50
cpaelzerwith a user that can log in there13:50
punkgeekcpaelzer: Thank you, I want to connect without using ssh key or other ways,13:50
punkgeekcpaelzer: This methods required to enter password, but I want to use it in the api method13:50
cpaelzerkeys is what I see everyone (including myself) use13:51
cpaelzerwhich allows non PW API calls as you'd want to13:51
cpaelzerto be clear even upstream qemu in 2019 switched to libssh (vs libssh2) so I guess they should be somewhat feature comparable13:52
cpaelzerthis was where libssh2 promotion to main was discussed https://bugs.launchpad.net/ubuntu/+source/libssh2/+bug/68142313:52
ubottuLaunchpad bug 681423 in libssh2 (Ubuntu) "[MIR] libssh2" [Undecided, Invalid]13:52
cpaelzerbut 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
punkgeekcpaelzer:  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.html13:53
cpaelzerbut that is listed for non-2 libssh as well13:54
cpaelzerso did you try that (your original example but s/libssh2/ssh/ )13:54
cpaelzeroh I seeh ssh <-> libssh is also different13:55
cpaelzerhmm we clearly have --enable-libssh set13:56
cpaelzermaybe not in libvirt ... checking ...13:56
punkgeekpardon me?13:58
cpaelzerthere is libssh and libssh2 and they are not as "one is the old and one the new one" as one might think13:59
cpaelzerlibssh is in main and threfore enabled in e.g. qemu13:59
cpaelzerbut since you use virsh that is from source of libvirt13:59
cpaelzerso I need to check what is enabled there13:59
cpaelzermaybe we still need to make the swicth there following qemu (at conigure/build time)13:59
punkgeekhow can I do that?14:00
cpaelzerif that is really the case you'd need to rebuild libvirt14:01
cpaelzerI can do that in the coming release and going forward if that is really a problem14:01
cpaelzerbut since it is adding a new feature I can't help you in an active release as that would violate https://wiki.ubuntu.com/StableReleaseUpdates14:01
cpaelzerbut before any panic I'd want to check if that is really the underlying issue here14:02
cpaelzerand for you - right now - I'd recommend to tune the genreal setup to work with qemu+ssh: which is what everyone seems to use14:02
cpaelzeralthough that might mean key setup insetad whatever libssh would have required you to set up in advance14:02
punkgeekThank you sir, 14:05
cpaelzerpunkgeek: I've filed a bug for this and the next Ubuntu release should have that functionality https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/193941614:10
ubottuLaunchpad bug 1939416 in libvirt (Ubuntu) "please enable libssh support" [Undecided, New]14:10
cpaelzervia https://launchpad.net/~canonical-server/+archive/ubuntu/server-backports that will also be somewhat available for LTSes shortly after14:10
=== sarnold_ is now known as sarnold
punkgeekpaelzer: 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:43
punkgeekcpaelzer:15:45
cpaelzerthere is an independent way to do that and much more on any cloud/VM or otherwise via https://cloudinit.readthedocs.io/en/latest/15:45
cpaelzeryou can provide a datasource with instructions and if it finds on initializing a cloud image it will execute them15:46
cpaelzerI don't know much about your setup, but in most cases that ist the best solution for what I think you ask for15:46
punkgeekcpaelzer: 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 time15:50
cpaelzersorry 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 much15:53
cpaelzerI mean get your instructions in a virtual disk, attach it to the system and that is it - passing a datasource isn't that hard15:53
cpaelzernot everone needs a net-scaled per system config15:54
cpaelzeryou can use the same datasource image for all your systems15:54
=== kees_ is now known as kees
rbasakpunkgeek: 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:32
rbasakYou 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:34
punkgeekrbasak: 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:46
punkgeekfor example, clients can select directadmin shell script to install and config it after the VM has been created. 17:48
leftyfbpunkgeek: why isn't clout-init a good method for you?17:51
leftyfbpunkgeek: 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 that17:52
rbasakpunkgeek: so use cloud-init to initialise a more specialist agent suited to what you need.17:53
rbasakEven just to install a management ssh key or something, and then use ssh and ansible.17:54
leftyfbpunkgeek: 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 17:54
=== genii is now known as genii-core

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!