Читать книгу Mastering Linux System Administration - Richard Blum - Страница 89

Real World Scenario SETTING UP A CentOS CONFIGURATION WITHIN ORACLE VirtualBox

Оглавление

Prior to installing CentOS as a VM within the VirtualBox hypervisors, you need to perform a few basic tasks to create and configure a place for the new VM within the VirtualBox app. After you have completed these tasks, on your host machine you will have a folder for the new VM as well as two files within the folder—one file for the VM configuration information and one file acting as a hard disk for the VM.

Follow these steps to configure the CentOS VM. There are only a few steps needed to complete this part of the installation project, but they are important! So, don't skim through this exercise.

1 Open the Oracle VirtualBox app on your host system. How this is accomplished depends on the configuration you chose when installing the VirtualBox software. You may have to find it via the menu search feature on Windows 10 or simply click the VirtualBox icon on the desktop or taskbar. Once you have the app open, you should see a window showing the Oracle VirtualBox Manager that looks similar to this (note that you may or may not have an Ubuntu Server VM showing in your Manager window):

2 In the VirtualBox Manager window, using the top menu within the window, select Machine ➢ New. This will start the process of configuring the CentOS VM and produce the following Create Virtual Machine window:

3 Enter the name CentOS Server in the Create Virtual Machine window's Name box.

4 Click the Next button to reach the Memory Size window, which looks similar to the following:

5 By either typing in the memory setting box or using the up‐arrow button, change the CentOS Server memory to 2048 MB.

6 Click the Next button in the Memory Size window to reach the Hard Disk window.

7 Double‐check that the Create A Virtual Hard Disk Now option is selected. (You can tell that a particular option is selected by the circle next to it being filled with a dark color, as shown in the previous figure.) If you need to select Create A Virtual Hard Disk Now, click the empty circle next to the option.

8 Click the Create button in the Hard Disk window, which will open another configuration window called Hard Disk File Type.

9 Within the Hard Disk File Type window, ensure that the VirtualBox Disk Image (VDI) is selected.

10 Click the Next button, and the Storage On Physical Hard Disk window will appear. This configuration window looks similar to the following:

11 Double‐check that the Dynamically Allocated setting is chosen.

12 Click the Next button to open the File Location And Size window. In this window, you will see where the VM's virtual disk file is created as well as its size. This configuration window looks similar to the following:

13 Change the file size to 20 GB by typing 20 within the size box.

14 You are now ready to create the basic configuration and virtual disk file of the VM. Do so by clicking the Create button.You should now be back at the VirtualBox Manager window with the CentOS Server VM in the left pane, as shown here:We have a few more configuration steps to take before the VM is completely configured.

15 Click the Settings button in the VirtualBox Manager's top‐right pane, which opens the Settings window for the CentOS Server VM.

16 In the Settings window, click Network in the left pane to open the Network Settings window for the CentOS Server.The next few steps help you to set up a second network interface card (NIC) on the CentOS Server. This allows your VM to act as an independent node on your network.

17 In the Network Settings window's right pane, click the Adapter 2 tab.

18 In the Adapter 2 tab window, click the empty box next to Enable Network Adapter.

19 Still in the Network Settings’ Adapter 2 tab window, use the arrow to open the drop‐down menu in the Attached To box, and select Bridged Adapter. Except for the Name box, your selections should look similar to the following:

20 Click System in the left pane to open the System Settings window for the CentOS Server.

21 In the Pointing Device selection, click the down arrow and select USB Tablet from the drop‐down menu. This is a critical step that will avoid problems with your mouse working inside and outside of the virtual machine.

22 Click the OK button to save the changes you made to the CentOS VM settings.You should now be back to the VirtualBox Manager window. Pat yourself on the back! You have successfully configured the CentOS Server VM.

Your hard work is about to pay off. You are now ready to install the CentOS distribution on the virtual machine you just configured within VirtualBox.

Mastering Linux System Administration

Подняться наверх