From the course: Linux System Engineer: iSCSI Storage Area Networks

Configure VM settings

From the course: Linux System Engineer: iSCSI Storage Area Networks

Start my 1-month free trial

Configure VM settings

- [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 + F. The Host key is listed in the bottom right hand corner of the window. In my case it's the right Ctrl key. Full screen mode will make navigating the desktop much easier. Once your VM has booted login 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 hostnamectl command. Type in sudo space hostnamectl space set-hostname space rhhost1.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 -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 + 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 to the Virtualbox Manager window, and we'll start up rhhost2 so we can configure it. Click on Start, press your Host key + 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.87. Now click on the gear icon on the bottom right hand corner, and then on 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 host name for our new VM. Click on Applications, click on Favorites, click on Terminal. I'll make mine full screen, and I'll run the hostnamectl command. Type in sudo space hostnamectl space set-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 -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 your 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 /etc/hosts and hit Enter. Going to 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 that's 192.168.1.86 space rhhost1.localnet.com space rhhost1. Now hit Enter and type in the IP address of rhhost2. In my case that's 192.168.1.87. You wanna type in your IP address of your rhhost2 here. Space rhhost2.localnet.com space rhhost2. Save, and exit by pressing Escape + : + X + ! 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 Ctrl + 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 and then type in sudo space scp space /etc/hosts space rhhost1:/etc/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.

Contents