--------------- <> -----------------
--- KHOA HỌC - CÔNG NGHỆ - GIÁO DỤC - VIỆC LÀM ---
--- Học để đi cùng bà con trên thế giới ---

Tìm kiếm trong Blog

Kiến trúc máy tính (4) - Tạo máy tính ảo

Bài trước: Kiến trúc máy tính (3) - Phần mềm tạo máy ảo
-----

4. Tạo máy tính ảo

Ở bài học trước, bạn đã cài đặt được một phần mềm để tạo máy tính ảo, tên của phần mềm là VirtualBox.

Trong bài học này, chúng ta sẽ dùng phần mềm VirtualBox để tạo ra một cái máy tính (tất nhiên là máy tính giả lập).

Dù là máy tính giả lập, nhưng nó hoạt động giống như một máy tính thật, gồm có phần cứng và phần mềm.

4.1 Tạo máy tính ảo trên VirtualBox

Bạn thực hiện theo từng bước sau:

- Mở ứng dụng Oracle VM VirtualBox Manager

- Trong giao diện của Oracle VM VirtualBox Manager > bấm vào nút New để mở hộp thoại Create Virtual Machine

- Trong cửa sổ New Virtual Machine:

    + Mục Name: Đặt tên cho máy ảo của bạn (ví dụ: May1)

    + Bấm Next, hệ thống sẽ xuất hiện cửa sổ Specify virtual hardware

- Trong cửa sổ Specify virtual hardware:

    + Mục Base Memory cho phép bạn thiết lập dung lượng RAM mà máy ảo sẽ sử dụng. Bạn nên thiết lập ít nhất là 2048 MB (2 GB). Tuy nhiên, cũng không nên thiết lập vượt quá vùng màu xanh lá. Bạn có thể thiết lập bằng cách nhập số trực tiếp vào mục Base Memory hoặc dùng thanh trượt

    + Mục Number of CPUs cho phép bạn thiết lập số lượng nhân CPU mà máy ảo có thể sử dụng. Nên cấp phát tối thiểu 2 nhân

    + Mục Disk Size cho phép bạn thiết lập dung lượng của đĩa cứng, bạn có thể để mặc định hoặc thiết lập là 40GB

    + Bấm Next, hệ thống sẽ xuất hiện bảng Summary, mô tả tóm tắt các thông tin mà bạn vừa thiết lập. Bấm Back nếu bạn muốn thay đổi các thiết lập, hoặc bấm Finish để tạo ra máy tính

- Vậy là bạn đã tạo ra được một máy tính hoàn chỉnh, gồm các thành phần phổ biến. Xem hình minh họa,

4.2 Bài tập và câu hỏi

Bài tập

Bài tập 4a. Thực hành tạo máy tính ảo như hướng dẫn trong bài học.

Bài tập 4b. Trong ổ đĩa D:\, tạo thư mục có tên MayAo để lưu các tập tin của máy ảo sẽ tạo. Nếu máy bạn không có ổ đĩa D:\ thì có thể chọn ổ đĩa khác.

Bài tập 4c. Trong giao diện của May1 ở hình minh họa, vào mục Details, hãy cho biết các mục tô đậm cho bạn biết thông tin gì về máy tính (ví dụ: General, System, Display,...v.v). Viết câu trả lời vào sổ tay môn học của bạn (tập tin Microsoft word hoặc Google Docs).

Câu hỏi

Câu 4.1: Khi tiến hành cấu hình phần cứng cho máy tính ảo trong cửa sổ 'Specify virtual hardware' của phần mềm VirtualBox, thông số 'Base Memory' được khuyến nghị nên thiết lập dung lượng tối thiểu là bao nhiêu?

A. 4096 MB (4 GB)

B. 1024 MB (1 GB)

C. 40 GB

D. 2048 MB (2 GB)

Câu 4.2: Trong quá trình tạo máy tính ảo bằng VirtualBox, khi bạn tùy chỉnh các thông số kỹ thuật như Base Memory, Number of CPUs, và Disk Size thực chất có ý nghĩa gì đối với hệ thống?

A. Trích một phần tài nguyên phần cứng sẵn có của máy tính thật (RAM, nhân CPU, dung lượng ổ cứng) để cấp phát cho máy ảo sử dụng

B. Nâng cấp tốc độ xử lý của CPU và làm tăng dung lượng lưu trữ thực tế của ổ cứng vật lý đang có

C. Tự động kích hoạt và lắp đặt thêm các linh kiện phần cứng vật lý mới vào bên trong thùng máy tính thật

D. Cài đặt trực tiếp một hệ điều hành hoàn chỉnh và các phần mềm ứng dụng văn phòng vào ổ đĩa hệ thống của máy thật

Câu 4.3: Tại sao tài liệu hướng dẫn cấu hình RAM (Base Memory) và CPU (Number of CPUs) cho máy ảo trong VirtualBox lại lưu ý bạn 'không nên thiết lập vượt quá vùng màu xanh lá'?

A. Vì nếu chiếm dụng quá nhiều RAM và nhân CPU vượt mức an toàn, máy tính thật sẽ không còn đủ tài nguyên để duy trì hoạt động và dẫn đến bị treo

B. Vì phần màu cam và đỏ biểu thị mức tài nguyên quá thấp, không đủ dung lượng để khởi động máy tính ảo

C. Vì vượt quá vùng màu xanh lá sẽ làm phần mềm VirtualBox bị lỗi bản quyền và tự động đóng lại

D. Vì hệ điều hành của máy ảo bắt buộc phải lưu trữ toàn bộ dữ liệu trên màn hình hiển thị màu xanh lá cây

Câu 4.4: Giả sử máy tính thật của bạn có cấu hình phần cứng gồm: CPU 4 nhân, RAM 4GB (4096 MB) và ổ cứng HDD còn trống 100GB dữ liệu. Dựa trên các nguyên tắc thiết lập an toàn trong tài liệu, cấu hình máy ảo nào sau đây là hợp lý nhất để cả máy thật và máy ảo đều hoạt động ổn định?

A. Base Memory: 4096 MB (4 GB) | Number of CPUs: 4 nhân | Disk Size: 40 GB

B. Base Memory: 2048 MB (2 GB) | Number of CPUs: 2 nhân | Disk Size: 40 GB

C. Base Memory: 1024 MB | Number of CPUs: 1 nhân | Disk Size: 120 GB

D. Base Memory: 3500 MB | Number of CPUs: 3 nhân | Disk Size: 40 GB

4. Creating a Virtual Machine

In the previous lesson, you successfully installed a software called VirtualBox to create virtual machines. 

In this lesson, we will use VirtualBox to create a computer (which is, of course, a simulated one).

Despite being simulated, it functions exactly like a physical computer, consisting of both hardware and software components.

4.1 Creating a Virtual Machine on VirtualBox

Follow these step-by-step instructions:

- Launch the Oracle VM VirtualBox Manager application

- On the Oracle VM VirtualBox Manager interface, click the New button to open the Create Virtual Machine wizard

- In the Create Virtual Machine window:

    + Name: Enter a name for your virtual machine (e.g., May1)

    + Click Next, and the Specify virtual hardware window will appear

- In the Specify virtual hardware window:

    + Base Memory: This field allows you to allocate the amount of RAM that the virtual machine will use. You should allocate at least 2048 MB (2 GB). However, do not exceed the green zone on the slider. You can configure this by entering the value directly into the Base Memory field or by using the slider

    + Processors (Number of CPUs): This allows you to allocate the number of CPU cores for the virtual machine. It is recommended to allocate at least 2 cores

    + Disk Size: This allows you to set the virtual hard disk capacity. You can leave it at the default value or set it to 40 GB

    + Click Next to proceed to the Summary screen, which displays a brief overview of your configured settings. Click Back if you need to modify any settings, or click Finish to successfully create the virtual machine

- You have now created a complete virtual machine with standard hardware components. See the illustration below:


4.2 Exercises and Questions

Exercises

- Exercise 4a. Practice creating a virtual machine by following the step-by-step instructions provided in this lesson.

- Exercise 4b. In your D:\ drive, create a new folder named MayAo to store the virtual machine files. If your computer does not have a D:\ drive, you may select an alternative drive.

- Exercise 4c. On the interface of May1 shown in the illustration, navigate to the Details section. Explain what information each bolded category provides about the computer (e.g., General, System, Display, etc.). Write your answers in your course notebook (using a Microsoft Word file or Google Docs).

Questions

Question 4.1: When configuring the virtual machine hardware in the 'Specify virtual hardware' window of VirtualBox, what is the recommended minimum capacity you should set for the 'Base Memory' parameter? 

A. 4096 MB (4 GB) 

B. 1024 MB (1 GB) 

C. 40 GB 

D. 2048 MB (2 GB)

Question 4.2: During the process of creating a virtual machine with VirtualBox, what is the actual systemic effect of customizing specifications such as Base Memory, Number of CPUs, and Disk Size? 

A. It allocates a portion of the host machine's physical hardware resources (RAM, CPU cores, hard drive capacity) to be used by the virtual machine. 

B. It upgrades the CPU processing speed and increases the actual storage capacity of the physical hard drive. 

C. It automatically activates and installs new physical hardware components inside the host computer's chassis. 

D. It directly installs a complete operating system and office applications onto the host machine's system drive.

Question 4.3: Why does the documentation for configuring RAM (Base Memory) and CPU (Number of CPUs) in VirtualBox advise you 'not to exceed the green zone'? 

A. Because if the VM consumes too much RAM and too many CPU cores beyond the safe limit, the host machine will lack sufficient resources to run its own processes, leading to system freezes. 

B. Because the orange and red zones indicate resource levels that are too low to boot the virtual machine. 

C. Because exceeding the green zone will trigger a licensing error in VirtualBox, causing the application to force close. 

D. Because the virtual machine's operating system is strictly required to store all data on a green-colored display interface.

Question 4.4: Suppose your physical host computer has the following hardware specifications: a 4-core CPU, 4 GB (4096 MB) of RAM, and 100 GB of free space on the HDD. Based on the safe configuration guidelines in the text, which of the following virtual machine configurations is the most reasonable to ensure both the host and guest systems operate stably? 

A. Base Memory: 4096 MB (4 GB) | Number of CPUs: 4 cores | Disk Size: 40 GB 

B. Base Memory: 2048 MB (2 GB) | Number of CPUs: 2 cores | Disk Size: 40 GB 

C. Base Memory: 1024 MB | Number of CPUs: 1 core | Disk Size: 120 GB 

D. Base Memory: 3500 MB | Number of CPUs: 3 cores | Disk Size: 40 GB

-----

Bài sau: