From the course: Linux System Engineer: Mail Systems Using Postfix

Virtual machine configuration

From the course: Linux System Engineer: Mail Systems Using Postfix

Start my 1-month free trial

Virtual machine configuration

- In order to configure and test Lynx mail servers using Virtual Box, we need to have more than one virtual machine. It doesn't matter if you're using the VM we created in the first course of this series, RHCECertPrep Networking in SSH, or if you've created a new VM for the course. Either way, you'll need to make multiple clones to complete the exercises in the upcoming videos. In this course, we'll have a mail server, a mail relay server and a mail client. As such, we'll need three virtual machines. In preparing for this course, I've created a new CentOS7 virtual machine, using the installation video of the first course in this series: RHCECertPrep Networking and SSH. Note that this VM is not running. If your VM is running, shut it down before preceding. We will also need to have all VMs on the same network. To configure the network settings, click on the VM you intend on using, and then go to settings and then network. Change the "Attached to NAT" to "Attached to Bridged Adapter." Make sure you select a physical network adapter of your host machine that has access to the internet. In my case, the host is running on Lynx so I'm going to choose enp0s25, which is the name that my Lynx host installation has chosen for it. Once that's done, click on Ok. We also need to discard the saved state so our VMs boot up fresh for the first time. If it's ghosted out, then skip this step. Now, let's boot up the CentOS7 full DVD VM and configure its network. After your VM boots up, log in when prompted. (typing) On the desktop, click on the top right-hand menu, click on wired and then wired settings. Click the on/off slider to turn on the network. And then click on the gear icon next to the slider. Take note of the IP address as we will need it later to ensure connectivity. Mine is 192.168.1.119. Now select connect automatically at the bottom of the window. Click on apply and close the dialogue. You may have noticed that my VM is running in a larger screen mode. This is because when I created my VM image, I also installed Virtual Box guest editions. If you want better screen resolutions, improved copy/paste functionality and a seamless mouse, then install Virtual Box guest editions. You can do this at any time, but if you do it now, then your cloned VMs will also have guest editions installed. To install guest editions, pause this video and then refer to the installation chapter of RHCECertPrep Netowkring and SSH for instructions. This is not required to complete this course but makes using virtual machines nicer. Also, before moving on, let's create a VM snapshot by pressing the host key plus T. In my case, the host key is the right control key. (typing) Name the snapshot "Network Configured." (typing) And then click on Ok. Now shut down the VM and select "Restore Current Snapshot (Network Configured)" and click on Ok. After it shuts down, click on the discard button to discard the saved state. If we don't do this, our cloned VMs may all have the same IP address. Now that we're done configuring our virtual machine, we need to make multiple clones. In the Virtual Box manager window, right-click the VM and select clone. A dialogue box asking for the VM name should appear. Let's name this "RHHost1". (typing) Now we have to choose what type of clone we want. For our purposes, making a linked clone is perfectly fine, it uses less disk space. Also click the box to reinitialize the MAC address on all network cards. This is so all network cards have unique MAC addresses, so even though the rest of the VM will be identical, the MAC address won't be. Now click on clone. Do this two more times, creating clones named "RHHost2" and "RHHost3". Once that's done, we're ready to continue.

Contents