readme.txt for VirtualBox internetworking exercise

Provided here are 2 scripts:

vmconfigure.bat
vmconfigure-destroy.bat

for Windows, or:

vmconfigure.sh
vmconfigure-destroy.sh

for the bash shell, used in linux and Apple.

They are intended to be used after you have installed the "fedora36-summer22" virtual machine in your copy of VirtualBox. You do that by using the fedora36-summer22.ova file distributed to you, as the object of VirtualBox's "Import appliance" operation on its main File menu. These scripts are for modifying and utilizing the "fedora36-summer22" VM so it needs to be in place first. Run the scripts as a non-root/administrator user.

The scripts call and rely upon vboxmanage (or vboxmanage.exe), a VirtualBox utility program. For them to find vboxmanage successfully, its containing folder must be in the PATH environment variable. By default, installing VitrualBox in linux places vboxmanage in /usr/bin. In linux this folder is almost always in the PATH variable already so you will not have to put it there. Nothing to do. But in Windows vboxmanage is placed in C:\Program Files\Oracle\VirtualBox, which is probably not in the PATH variable. So you have to put it there. Here is a web page that tells how to add a folder to PATH in Windows:

https://www.computerhope.com/issues/ch000549.htm

With that detail taken care of, you should run vmconfigure (.bat or .sh depending on your platform), which will spin off 8 clones of fedora36-summer22. They are named Router-1, Router-2, Router-3, Router-4, PC-1, PC-2, PC-3, and PC-4. They are the subjects of this internetworking exercise.

There is a machine name issue. VirtualBox knows VMs by the names it gave them, e.g. Router-1, PC-2, etc. These names appear in the title bar of a windowed VM when it runs. Separately, linux keeps a "hostname" for a machine. That name appears visually as part of the command prompt. Because Router-1 et. al. are all clones of a machine whose linux hostname was "fedora30," they all have that hostname and display "fedora30" in their command prompts. It would be better if VirtualBox's and linux's names for a machine were the same. If not, it's OK, but an invitation to confusion. You could easily get the VMs mixed up. If you wish to change the linux hostname to match the VM's name you can do so, once a VM is running, by running the "hostnamectl" command at the linux command prompt. So for example at first Router-1 will have hostname fedora30. But then if you run:

hostnamectl set-hostname Router-1

your Router-1 will have hostname Router-1. The two names will conform. Doing this is optional, but a good idea and it will persist in the machine across reboots so you won't need to do it a second time.

If things get messed up over time you can un-do and start over (by destroying your machines with vmconfigure-destroy then re-running vmconfigure).
If running vmconfigure-destroy yields any errors you can always kill an individual VM from the command line by:

   vboxmanage unregistervm --delete <VM>

Ultimately a VM consists of a set of files and "destroying" amounts to removing the files
Their default location is in either

   C:\Users\<username>\VirtualBox VMs  for Windows

or

   /home/<username>/VirtualBox VMs     for linux

(note the filename contains a space. That's sometimes troublesome in linux. There, when you type the name of the file surround it by double-quotes.) Purging the files for a given VM within that directory, manually outside of VirtualBox, erases the VM from VirtualBox's awareness (i.e., destroys).
