From 90421e77d212dd81f551979700ab946a47128753 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Wed, 17 Feb 2021 20:29:14 -0600 Subject: [PATCH] pyrocufflink-dhcp: DHCP reservations for VM hosts When there is a network issue that prevents DNS names from being resolved, it can be difficult to troubleshoot. For example, last night, the Samba domain controller crashed, so *pyrocufflink.blue* names were unavailable. Furthermore, the domain controller VM was apparently locked up, so I could not SSH into it directly, and it needed to be rebooted. Since the VM host's name did not resolve, I could not find its address to log into it and reboot the VM. I resorted to scanning the SSH keys of every IP address on the network until I found the one that matched the cached key in ~/.ssh/known_hosts. This was cumbersome and annoying. Assigning DHCP reservations to the VM hosts will ensure that when a situation like this arises again, I can quickly connect to the correct VM host and manage its virtual machines, as its address is recorded in the configuration policy. --- group_vars/pyrocufflink-dhcp.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/group_vars/pyrocufflink-dhcp.yml b/group_vars/pyrocufflink-dhcp.yml index 0ad7952..40770e1 100644 --- a/group_vars/pyrocufflink-dhcp.yml +++ b/group_vars/pyrocufflink-dhcp.yml @@ -84,6 +84,12 @@ dhcp_reservations: - host: logs0.pyrocufflink.blue ip_addr: 172.30.0.17 mac_addr: 52:54:00:b1:84:98 +- host: vmhost0.pyrocufflink.blue + ip_addr: 172.30.0.18 + mac_addr: e0:d5:5e:a2:2e:1a +- host: vmhost1.pyrocufflink.blue + ip_addr: 172.30.0.19 + mac_addr: e0:d5:5e:6e:ad:ac # Management - host: unifi0