Random tools I've found interesting
Rafael David Tinoco
rafaeldtinoco at ubuntu.com
Fri Mar 6 16:20:20 UTC 2020
> On Fri, Mar 6, 2020 at 12:47 PM Ryan Harper <ryan.harper at canonical.com> wrote:
> > # /home/rharper/.ssh/config.defaults
> > Host *.lxd
> > User ubuntu
> > IdentityFile /home/rharper/.ssh/id_rsa
> > StrictHostKeyChecking no
> > UserKnownHostsFile /dev/null
> > ProxyCommand nc $(lxc list -c s4 $(basename %h .lxd) | awk '/RUNNING/ {print $4}') %p
>
> I'm sad because DNS resolution used to work out of the box for *.lxd
> domains in the past. It was easy to configure "Hey, for this domain
> lxd, use that nameserver". I haven't been able to configure this
> anymore in recent ubuntu releases. The best I got was a dns loop and
> 100% cpu usage.
I loved using the proxy command for it. I've been putting lxd network
into kvm network and using the NSS libvirt plugins to solve lxc names:
rafaeldtinoco at workstation:~$ virsh net-dumpxml default
<network connections='4'>
<name>default</name>
<uuid>c6d5e95a-6c5a-4e17-9ae3-38f43c386c0d</uuid>
<forward mode='nat'>
<nat>
<port start='1024' end='65535'/>
</nat>
</forward>
<bridge name='brdefault' stp='off' delay='0'/>
<mac address='52:54:00:ea:11:ce'/>
<ip address='10.250.99.1' netmask='255.255.255.0'>
<dhcp>
<range start='10.250.99.10' end='10.250.99.254'/>
</dhcp>
</ip>
</network>
rafaeldtinoco at workstation:~$ cat /etc/nsswitch.conf | grep hosts
hosts: files libvirt_guest libvirt dns
rafaeldtinoco at workstation:~$ lxc profile show default | grep -B2 brdefault
name: eth0
nictype: bridged
parent: brdefault
So nss would solve all libvirt virtual machine names first, then
hostnames got by the dhcp leases from virtual machines AND lxd
containers and then all th rest. But I guess I can use .lxd and .kvm
(virsh list --all) and it will be better.
For the LXD profiles, I have a few depending on different needs:
https://github.com/rafaeldtinoco/provision/tree/master/lxd/profiles
$ lxc launch ubuntu-daily:focal apache2fix
$ lxc launch -p debian-default images:XXXX debian
$ lxc launch -p cluster ubuntu-daily:focal pacemakerdev
and all my networks are libvirt networks so I can have LXD and KVM
guests in the same bridges, like when using the cluster yaml profile
definition:
devices:
eth0:
name: eth0
nictype: bridged
parent: brdefault
type: nic
iscsi01:
name: iscsi01
nictype: bridged
parent: iscsi01
type: nic
iscsi02:
name: iscsi02
nictype: bridged
parent: iscsi02
type: nic
...
More information about the ubuntu-server
mailing list