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'>
  <forward mode='nat'>
      <port start='1024' end='65535'/>
  <bridge name='brdefault' stp='off' delay='0'/>
  <mac address='52:54:00:ea:11:ce'/>
  <ip address='' netmask=''>
      <range start='' end=''/>

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:


$ 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

name: eth0
nictype: bridged
parent: brdefault
type: nic
name: iscsi01
nictype: bridged
parent: iscsi01
type: nic
name: iscsi02
nictype: bridged
parent: iscsi02
type: nic

More information about the ubuntu-server mailing list