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

Real World Scenario SETTING UP AN UBUNTU SERVER CONFIGURATION WITHIN ORACLE VirtualBox

Оглавление

Prior to installing Ubuntu Server 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, you will have a folder on your host machine 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 VM. Though only a few steps are needed to complete this part of the installation project, 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 you can 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:

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

3 Enter the name Ubuntu 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 Ubuntu 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 the Create A Virtual Hard Disk Now option, click the empty circle next to it.

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 selected.

12 Click the Next button to open the File Location And Size window.

13 Click the Next button, and the Storage On Physical Hard Disk window will appear. In this window, you will see where the VM's virtual disk file will be created as well as its size. This configuration window looks similar to the following:

14 Change the file size to 16 GB by typing 16 within the size box.

15 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 Ubuntu Server VM in the left pane, as shown here:We have a few more configuration items to accomplish before the VM is completely configured.

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

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

18 In the Network settings window's right pane, click the Adapter 2 tab.

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

20 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:

21 Click the OK button to save the network settings.You should now be back to the VirtualBox Manager window. Pat yourself on the back! You have successfully configured the Ubuntu Server VM.

All this hard work will soon pay off. You are now ready to install the Ubuntu Server distribution on the virtual machine you just configured within VirtualBox.

Mastering Linux System Administration

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