From the course: Linux System Engineer: Network Filesystems Using NFS and Samba

Lab setup

- [Instructor] In order to configure and test Linux, iSCSI storage area networks using VirtualBox, we need more than one virtual machine. We'll need two VMs, and we want to have both VMs to be able to access each other's network interfaces. We may also want to have the VirtualBox host, or other computers on the physical network to have network connectivity with the VM guests. In order to do this, we'll need to configure the VM network and interfaces. In order to clone your VM, you need to make sure that it is shut down. If your VM is running, shut it down now, using the VirtualBox Manager. Once it's shut down, you can continue. To configure the network settings, click on VM, and then click on Settings, and then Network. Change Attached to NAT, to Attached to Bridged Adapter. In the Name section, make sure you select the physical network adapter of your host machine that has access to the Internet. In my case, the host is running on Linux, and I'm using the wired network adapter. So I'm going to choose enp0s25, which is the name that my Linux host installation has chosen for it. If you're using Mac OS or Windows, choose the appropriate network interface that your host is using. Once that's done, click on OK. We also need to discard the safe state so our VMs boot up fresh for the first time. If you don't do this, then all of your VMs will boot up and assume the same IP address, because that is a live setting in RAM, which is included in the Safe state. Make sure your VM is selected, and then click on Discard. Click on Discard again. Once we have our VM network adapter configured, we want to clone the VM. In the VirtualBox Manager window, go to the Machine menu and select Clone, and a dialogue box asking for the VM name should appear. Let's call it rhhost1. Also click the box to reinitialize the MAC addresses of all network cards. This is so all network cards have unique MAC addresses so even though the rest of the VM is identical, the MAC addresses won't be. Now we have to choose the type of clone we want. A full clone makes a completely independent VM that can be moved without the original, but also takes up an equal amount of disk space as the original. If you foresee moving one VM without the other, you may want to choose Full Clone here. However, for our purposes, making a linked clone is perfectly fine and uses less disk space. I'm going to choose Lined Clone. Now click on Clone. Now let's click on the original VM again and create a second linked clone. Select Machine, and then Clone. Let's name this one rhhost2. Click on Linked Clone and Reinitialize the MAC address of all network cards. And then click on Clone. Now we should have two virtual machines named rhhost1 and rhhost2.

Contents