Lesson 3 - Creating a Virtual Machine in VirtualBox

26/06/2024 - 6 phút

Follow  on Google News

Welcome to the series on practical Linux, from basic to advanced. In this article, we will explore how to create a new virtual machine for Ubuntu Server on Oracle VM VirtualBox and configure important parameters such as RAM, CPU, virtual hard disk, and network settings.

Oracle VM VirtualBox is a powerful and flexible tool that allows us to easily create and manage virtual machines. Creating a virtual machine enables you to practice and experiment with configurations without affecting your main system.

Step 1: Open Oracle VM VirtualBox

  • Double-click the Oracle VM VirtualBox icon on the desktop or search for it in the Start menu.

Step 2: Start Creating a New Virtual Machine

  • Click the “New” button on the toolbar. The “Create Virtual Machine” window will appear.

Step 3: Name and Choose the Operating System

  • In this window, enter a name for your virtual machine (e.g., “Ubuntu Server”).
  • For “Type,” select “Linux.”
  • For “Version,” select “Ubuntu (64-bit).”
  • Click “Next” to continue.

Configure RAM and CPU

  • In the “Base Memory” section, use the slider or directly enter the amount of RAM you want to allocate to the virtual machine (recommended at least 1024 MB), here we set it to 4096 MB.
  • In the “Processor” section, you can adjust the number of CPUs (recommended at least 1 CPU), here we set it to 2 CPUs.
  • Click “Next” to continue.

Configure Virtual Hard Disk

  • Select “Create a virtual hard disk now.”
  • Set the maximum size for the virtual hard disk (recommended at least 10 GB), here we set it to 50 GB. Click “Next” to finalize the virtual hard disk setup.

Confirm and Finish

  • Click “Finish” to create the new virtual machine with the selected settings.
  • The new virtual machine will appear in the list of virtual machines on the main interface of Oracle VM VirtualBox.

Configure Network

  • In the “Settings” window, go to the “Network” section.
  • Select “Attached to: NAT” so the virtual machine can access the internet through the host’s network.
  • Click “OK” to save the network settings.

By following these steps, you have successfully created a new virtual machine for Ubuntu Server on Oracle VM VirtualBox and configured its main parameters. This setup allows you to experiment with Linux configurations in a safe and isolated environment.