These scripts are used for simple management of hostnames for several VirtualBox VMs comprising a test or sandbox environment on your local machine.
Architecture:
-
each VM is configured to use bridged network adapter, so all VMs and the host can see each other
-
a script is installed in each VM to run on post-ifup, which grabs VM's IP, puts "$IP $desired-hostname $desired-fully-qualified-hostname" into /etc/hosts, changes hostname correspondingly, and puts VM's hostname and fq-hostname into VM's properties
-
a script is used on the host machine, which loops through running VMs, and updates /etc/hosts on the host machine and on the VMs