Rocky Linux 10 Tutorial / Create a VirtualBox lab VM with recovery console access

The Rocky Linux 10 practice virtual machine is created using a new virtual disk separated from operational data, and a console accessible even if the network is disconnected. In this article, based on VirtualBox 7.2 on a Windows host, we configure 2 CPUs, 4GB memory, 40GB dynamic disk, and network address translation (NAT) networking. These numbers are examples for this tutorial's practice and should be adjusted according to the host's available resources and the services to be practiced.

Distinguish between host, guest, and virtual disk first

The host is the physical computer running VirtualBox, and the guest is the Rocky Linux installed inside it. The guest shows separate CPU, memory, disk, and network devices, but the actual resources are taken from the host. Allocating a lot of memory to the VM does not create new physical memory.

In this exercise, instead of directly connecting the host's operating disk, a new VirtualBox Disk Image (VDI) file will be created. Even if you initialize the disk during the guest installation screen, this is to ensure that the target is a dedicated virtual disk. Shared folders and the clipboard will not be connected initially and will be reviewed separately only if necessary.

CPU compatibility is a separate requirement. The x86-64-v3 features required by Rocky Linux 10 for x86_64 must also be provided to the guest. Simply selecting a "64-bit operating system" does not add CPU instructions. Use the files verified for CPU compatibility and the installation ISO .

Determine the resources for the exercise and the storage location.

Items Examples in this article Points to check when selecting
CPU 2 virtual CPUs Leave execution resources for the host and separately check CPU feature compatibility.
Memory 4096MB Consider memory of the host and other programs
Disk VDI, dynamically allocated, 40960MB Maximum capacity and current host file size are different. Available actual storage space required
Firmware EFI Decide before installation and do not switch to BIOS after installation without planning the boot consequences
Network Adapter 1, NAT Differentiate between external access of the guest and access from host to guest
Recovery console VirtualBox VM window Must be operable with VM screen and keyboard even without SSH connection

Dynamic allocation disks do not initially fill files to their maximum capacity. The host's disk file grows as the guest writes data. Even if data is deleted from the guest, the host file does not always shrink immediately. Make sure to secure enough space to store ISO files, VM disks, and snapshots that will be created later.

It is convenient to place VM folders in locations where they are less likely to conflict during synchronization or be opened simultaneously on multiple computers. Also, keep them separate from folders containing company operational data or the only backups. Name the VM so that its operating system and purpose are recognizable, like Rocky10-Lab.

Settings to check when creating from the screen

Based on the procedure of VirtualBox 7.2 New VM Creation Guide. Menu wording may differ depending on the installed version and display language.

  1. In VirtualBox Manager, open Home → New and specify the name, VM folder, and verified ISO. If the automatic detection result is incorrect, check the Linux category and the Red Hat 10.x (64-bit) profile for the relevant architecture. Selecting this profile does not replace the Rocky Linux ISO.
  2. In this practice, where you will follow the installation screen directly, we will disable Install OS Using Unattended Installation. If automatic installation is enabled, the account and installation process may differ from the manual installation procedure of this course.
  3. Specify memory and CPU, and create a new dynamic virtual disk. Do not select an existing virtual disk used for the operating system. You also decide whether to use EFI at this time.
  4. After selecting the created VM, check the files connected to the disk and optical drive in Settings → Storage. In Network, ensure that Adapter 1 is NAT.

The on-screen procedure above and the command examples below are two methods for the same purpose. If you have already created the VM on the screen, there is no need to create a VM with the same name using the command example. Command examples are used when you want to precisely record and reproduce the configuration.

Full example of creating the same configuration in PowerShell

Open PowerShell with VirtualBox installed on Windows. The example below uses VBoxManage.exe in the default installation path. If your installation path is different, replace the first line with the actual path. The VM and disk will be stored in VirtualBox-Labs under the user folder, and it is configured to stop if an existing name or folder exists.

$vbox = 'C:\Program Files\Oracle\VirtualBox\VBoxManage.exe'
$vmName = 'Rocky10-Lab'
$labRoot = Join-Path $env:USERPROFILE 'VirtualBox-Labs'
$vmFolder = Join-Path $labRoot $vmName
$diskPath = Join-Path $vmFolder 'system.vdi'

if (-not (Test-Path -LiteralPath $vbox)) {
    throw 'Check the path to VBoxManage.exe.'
}
function Invoke-VBox {
    & $vbox @args
    if ($LASTEXITCODE -ne 0) { throw 'The VirtualBox command failed.' }
}
$existing = Invoke-VBox list vms
if (($existing | Select-String -SimpleMatch ('"' + $vmName + '"')) -or
    (Test-Path -LiteralPath $vmFolder)) {
    throw 'The name or folder already exists. Inspect the existing VM.'
}
New-Item -ItemType Directory -Force -Path $labRoot | Out-Null
Invoke-VBox createvm --name $vmName --ostype RedHat10_64 --basefolder $labRoot --register
Invoke-VBox modifyvm $vmName --memory 4096 --cpus 2 --firmware efi --nic1 nat --boot1 dvd --boot2 disk --boot3 none --boot4 none --graphicscontroller vmsvga
Invoke-VBox createmedium disk --filename $diskPath --size 40960 --format VDI --variant Standard
Invoke-VBox storagectl $vmName --name SATA --add sata --controller IntelAhci
Invoke-VBox storageattach $vmName --storagectl SATA --port 0 --device 0 --type hdd --medium $diskPath
Invoke-VBox storageattach $vmName --storagectl SATA --port 1 --device 0 --type dvddrive --medium emptydrive
Invoke-VBox showvminfo $vmName --machinereadable

In the last check, verify memory 4096, CPU 2, EFI, NAT, and that the power is off. To check the logical capacity of the disk separately, use the following command. If the command fails midway, do not rerun from the beginning; first check the VirtualBox Manager list and the settings of the created VM.

Invoke-VBox showmediuminfo disk $diskPath

The source lesson’s November 12, 2026 test used VirtualBox 7.2.10r174163 on a Windows host with a separate lab name and folder to create a VM, attach its dynamic disk and inspect its configuration. The scope of validation at this step is the configuration of a powered-off VM. It does not mean that Rocky Linux installation is complete or that guest CPU feature execution is verified. Command syntax can be checked in VBoxManage official command reference as well.

Connect the ISO and verify console access.

The optical drive in the CLI example is empty. In the VirtualBox manager, open Settings → Storage for that VM, select the empty optical drive, and use the file selection function of the disk icon to attach the verified Rocky ISO. Do not confuse the device connecting the virtual hard disk and the ISO.

To attach via command, you can enter the actual absolute path of the ISO in the same PowerShell session and execute it. First, check that the path exists.

$isoPath = Read-Host 'Absolute path to the verified Rocky ISO'
if (-not (Test-Path -LiteralPath $isoPath -PathType Leaf)) {
    throw 'The ISO file was not found.'
}
Invoke-VBox storageattach $vmName --storagectl SATA --port 1 --device 0 --type dvddrive --medium $isoPath

Select the VM in the manager and press Start to open the VM console window. If it boots from the ISO, you can see the installation menu. Before starting the installation, double-check the VM name and the attached virtual disk and ISO. The host key is indicated in the window status bar, and familiarize yourself with how to return to host control when the mouse or keyboard is captured by the guest.

The console is a different access path from SSH. Even if the guest's IP address or firewall settings are incorrect, you should still be able to open the VirtualBox window to recover the network. VM execution and status bar guidance allow you to check the console and keyboard control methods.

Distinguish between NAT and host-only networks.

NAT is a method where the guest goes out to the external network through VirtualBox's address translation feature. It provides a starting point for reaching package repositories after installation. Just because the guest is connected to the Internet does not mean you can directly enter the guest's SSH port from the host. For connections from outside the NAT into the guest, separate configurations such as port forwarding are required.

A host-only network can be used for communication between the host and the lab VM, but by itself, it does not provide Internet connectivity. Bridged mode connects the VM as if it were a computer on the real network to which the host is connected, so it is not chosen by default. You need to check the address policies and service exposure scope of the company network.

In this article, we configure only one adapter and NAT, and SSH access is checked separately after the guest installation and server setup are completed. Determine the connection scope for each mode based on VirtualBox official virtual network description.

If problems occur, check the configuration one by one.

  • VM has been created but will not start: Check the error message, the host's available memory, and the hardware virtualization support status. Do not disable host security settings all at once to avoid problems.
  • CPU Requirement Error: Check the architecture of the host and guest, and the exposure of x86-64-v3 features. Increasing the number of virtual CPUs will not resolve instruction compatibility.
  • No Boot Media: Verify that the correct ISO is connected to the optical drive and that the boot order is correct.
  • Installation Target Disk Not Visible: In Storage, check whether the new VDI is connected to the SATA controller. Do not attempt to resolve this by temporarily connecting a host physical disk.
  • Cannot Change Settings: Check whether the VM is running or in a saved state. Properly shut down the guest, then change the necessary items, and be especially careful with firmware or controller changes after installation.

The completion criteria are that you can describe the resources, disks, and network of the dedicated VM, the correct ISO is connected, and you can access the console window without SSH. After installation, use normal shutdown as standard, and do not consider snapshots as a replacement for independent backups.