So, one thing that I have been thinking about is having a local name resolution for the VMs. So, I wanted something like this to work:

vm1 => 172.17.42,1

vm2 => 172.17.42,2

and so on …

To achieve this and reverse dns to work, we will add the entries in file “/etc/NetworkManager/dnsmasq.d/hostnames“. Just one more problem, adding so many entries manually? So, to help you with that, I created this small script:

Description : The goals of ShellCheck are:
:
: * To point out and clarify typical beginner’s syntax issues,
: that causes a shell to give cryptic error messages.
:
: * To point out and clarify typical intermediate level semantic
: problems, that causes a shell to behave strangely and
: counter-intuitively.
:
: * To point out subtle caveats, corner cases and pitfalls, that may
: cause an advanced user’s otherwise working script to fail under
: future circumstances.