Hi
Your issue "persistent networking issue while setting up Moodle" is a networking issue, right? Moodle is a (web) application, it depends on many things below the ladder, networking is one of them. The whole list of questions that follow are all on how to set up the network on Ubuntu Linux. Have you done that independently (before starting to run a Moodle server)? Some obvious questions like "Network config to persist after reboot" say, you haven't.
You should consult Ubuntu documentation and forums and confirm that the VM has a valid and stable network connection. By that I mean the (old-school) commands like ifconfig, route, host behaving as expected. That in turn means, they should behave as set in config files like /etc/hosts, /etc/network/interfaces (since Ubuntu is a Debian derivative), /etc/hosts.conf, etc. This is not "best practice", it is _the_ practice.
Your issue "persistent networking issue while setting up Moodle" is a networking issue, right? Moodle is a (web) application, it depends on many things below the ladder, networking is one of them. The whole list of questions that follow are all on how to set up the network on Ubuntu Linux. Have you done that independently (before starting to run a Moodle server)? Some obvious questions like "Network config to persist after reboot" say, you haven't.
You should consult Ubuntu documentation and forums and confirm that the VM has a valid and stable network connection. By that I mean the (old-school) commands like ifconfig, route, host behaving as expected. That in turn means, they should behave as set in config files like /etc/hosts, /etc/network/interfaces (since Ubuntu is a Debian derivative), /etc/hosts.conf, etc. This is not "best practice", it is _the_ practice.
Considering the flowery language and the fancy formatting, have you got the help of AI by any chance? The Code of conduct here says, "If you use AI to help write your question or reply, then add a note to your post 'AI used to help write this post'" (in which case, I wouldn't have joined.)