Continuing to set up our lab environment we configure networking, hostname, and name resolution for both rhhost1 and rhhost2 virtual machines. We also install the acpid service and enable it. When done we create snapshots to provide a future base to roll back to.
- [Instructor] To configure your VM settings, click on rhhost1 in the VirtualBox manager window, and click on start. Go to full screen mode by pressing the host key plus f. The host key is listed in the bottom right-hand corner of the window. In my case, it's the right control key. Full screen mode will make navigating the desktop much easier. Once your VM has booted, log in when prompted. On the desktop click on the top right-hand menu. Click on wired and then click on wired settings.
Click the slider gadget to turn the network on, and note the IP address. In my case, it's 192.168.1.86. Then, click the settings gear in the bottom right-hand corner. Click on identity in the left-hand pane, and then click on connect automatically. Now, click on apply. You can close the window now. Let's also set the host name for our new VM. Click on applications, favorites, and terminal. I'm gonna make mine full screen, and then run the host name CTL command. Type in sudo, space, host name CTL, space, set dash host name space rhhost one dot localnet.com and hit enter.
Type in your password when prompted. For better shutdown support let's also run the ACPID service. First we need to install it. Type in sudo space yum space install space dash y space acpid and hit enter. Once it's installed type in clear and then let's enable it. Type in sudo space systemctl space enable space acpid and hit enter. We'll also wanna start it. So bring your line back and change enable to start. It should read sudo space systemctl space start space acpid and hit enter.
Now press your host key plus f to go out of full screen mode and press your host key again to release your mouse pointer. And we'll flip back over the VirtualBox manager window and we'll start up rhhost2 so we can configure it. Click on start. Press your host key plus f again to go into full screen mode. Log in when prompted and then on the desktop go to the top right-hand menu. Click on wired and click on wired settings. Click the slider gadget to turn the networking on.
And note your IP address. Mine is 192.168.1.187. Now click on the gear icon in the bottom right-hand corner, and then in the left-hand pane click on identity and click the connect automatically checkbox. Click apply and then close the window. We'll also set the hosting for a new VM. Click on applications, click on favorites, click on terminal. I'll make mine full screen and I'll run the host name ctl command. Type in sudo space hostnamectl space set dash hostname space rhhost2.localnet.com and hit enter.
Type in your password when prompted. For better shutdown support we'll also run the ACPID service which we need to install. Type in sudo space yum space install space dash y space acpid and hit enter. Now type in clear and we'll enable the service. Type in sudo space systemctl space enable space acpid and hit enter. Now let's bring the line back and we'll start the service by changing enable to start. The line should read sudo space systemctl space start space acpid.
Now let's also add local name resolution to our etc host file. We'll need both the IP address of rhhost1 and rhhost2. Type in sudo space vi space slash etc slash hosts and hit enter. Gonna go ahead and go into insert mode by pressing the i key. And then we'll go to the end of the file and add a line. Now type in the IP address of rhhost1. In my case it's 192.168.1.86 space rhhost1 dot localnet dot com space rhhost1.
Now hit enter and type in the IP address of rhhost2. In my case it's 192.168.1.87. So you wanna type in your IP address of your rhhost2 here. Space rhhost2 dot local net dot come space rhhost2. Save and exit by pressing escape, colon x, exclamation point, and hitting enter. Now let's test connectivity by pinging rhhost1 by name. Type in ping space rhhost1 and hit enter. After it sends a couple of ping packets press control c to cancel.
If it successfully pings rhhost1 you can continue with this course. If not, go over the steps in this video until you get it to work. Do not proceed on until the step works otherwise the rest of the course cannot be completed. Now let's copy this file to rhhost1 so we have local name resolution on both machines. Type in clear, then type in sudo space scp space slash etc slash hosts space rhhost1 colon slash etc slash hosts and hit enter.
Type in yes and then type in rhhost1's root password. Once this is done close the terminal window and create a snapshot by pressing your host key plus the letter t. Name the snapshot Network Configured and click on OK. Now you can shut down rhhost2 by going out of full screen mode by pressing your host key and the letter f. Now click the close gadget and make sure restore current snapshot is selected. Now go back to your rhhost1 VM and create a snapshot by pressing your host key plus the letter t.
Name the snapshot Network Configured and click on OK. Power the VM down by pressing the close gadget, select power off the machine, and make sure restore current snapshot network configured is selected. And click on OK. We now have two VMs named rhhost1 and rhhost2 with host names configured as well as network settings. Both VMs have local name resolution configured so they can reach each other by name.
- NFS overview
- NFS commands
- Configuring NFS share
- Mounting an NFS share
- NFS client options
- Delayed mounting
- Monitoring NFS
- Samba configuration
- Samba client tools
- Mounting shares with Samba