Guest mode. You can read posts without signing up. Comments, ratings, job contacts and your own posts open after you sign up and accept the rules. What is Kommit →

Редакция КоммитРедакция портала
commit fee141f · 18 days ago

Linux and KVM, Part 1: What is a server and a hypervisor, what hardware is needed, and how to make a bootable flash drive

🌐 Machine-translated from Russian. Show original

In this part:

In simple terms#

  • A server is a computer that does something for others around the clock: stores files, maintains the website, the 1C database, and mail.
  • Linux server — a server with the Linux operating system. Free, stable, without a graphical desktop: managed by network commands.
  • A virtual machine (VM) is a "computer within a computer": with its own disk, memory, and OS. On one physical server, you can keep a dozen VMs — Windows, Linux, anything.
  • A hypervisor is a program that launches a VM and divides the processor, memory, and disks among them.
  • KVM is a hypervisor built directly into the Linux kernel. It is free, running Proxmox, OpenStack, and many clouds.

Along with KVM, the following are always included:

ComponentWhat does
KVM (kernel module)uses hardware virtualization of the
QEMUemulates VM hardware: disks, network cards, BIOS,
libvirtunified VM management: virshcommands, API, rights,
virt-manager / Cockpitgraphical and web interface over libvirt

Which iron is suitable#

An old PC or laptop is enough for studying; for work—a server or a reliable PC.

Minimum for studyingFor a small group
Processor4 cores with Intel VT-x or AMD-V8–16 cores, Xeon / EPYC / Ryzen
Memory8 GB64 GB or more, better than ECC
DrivesSSD 256 GB2 SSD/NVMe mirrored (RAID 1) + disk or NAS for backups
Network1 Gbps2 ports 1–10 Gbps
Other—UPS, remote control (iDRAC, iLO, IPMI),

Memory calculation rule: total memory of all VMs + 4–8 GB to the host. More CPU cores can be "given" than there are, but not memory.

Step 1. Check virtualization support#

In BIOS/UEFI, find and enable:

  • Intel: Intel Virtualization Technology (VT-x), for device deployment — VT-d;
  • AMD: SVM Mode (AMD-V), for a break — IOMMU.

Usually, this is in the Advanced → CPU Configuration sections. At the same time, enable boot in UEFI mode and, if necessary, disable Secure Boot only if the installer does not boot (Ubuntu with Secure Boot works).

Step 2. Choose a distribution (all free)#

DistributionWho is suitableSupport version
Ubuntu Server 24.04 LTSthe best start: lots of instructions, fresh packages5 years free, up to 12 years with Ubuntu Pro
Debian 12/13conservative and stable, Proxmox foundation~5 years
AlmaLinux / Rocky Linux 9–10compatible with RHEL, familiar to those who have worked with CentOS10 years

In this series, we use Ubuntu Server 24.04 LTS. Choose LTS versions with long-term support.

Where to download (official websites only):

A file of the type ubuntu-24.04.x-live-server-amd64.iso is required (~3 GB).

Step 3. Check that the image is not corrupted#

Next to the image on releases.ubuntu.com lies the SHA256SUMSfile. Compare the checksum:

# Windows (PowerShell)
Get-FileHash .\ubuntu-24.04.5-live-server-amd64.iso -Algorithm SHA256
# Linux / macOS
sha256sum ubuntu-24.04.5-live-server-amd64.iso

The amount must match the line in SHA256SUMS. If it doesn't match — download it again.

Step 4. Save the bootable flash drive#

You'll need a flash drive of at least 8 GB — all data on it will be erased.

OSProgramFeatures of
RufusWindowsfast, GPT schema for UEFI
balenaEtcherWindows, macOS, Linux,simplest: choose an image → flash drive → Flash
VentoyWindows, Linuxformat the flash drive once and simply copy several ISOs to it — convenient for admin

In Rufus: Device → flash drive, Select → ISO, GPT partition schema, UEFI target system, Start. When asked about write mode, select an ISO image (recommended).

Step 5. Prepare everything else#

  • Network connection: server — cable to the router or switch. Check the network network (or in the router) for free static IP, mask, gateway, and DNS.
  • SSH client on your computer: Windows 10/11 already has ssh command in PowerShell and Windows Terminal; alternatives — PuTTY or MobaXterm.
  • VirtIO driver image for Windows VM (useful in part 3): virtio-win.iso.

No separate server?#

Practice VMs on your PC: VirtualBox or Hyper-V on Windows. For KVMs inside the VM, enable nested virtualization (in VirtualBox: VM Settings → System → Processor → "Enable Nested VT-x/AMD-V").

Next — Linux and KVM, part 2: installing Ubuntu Server 24.04 and the first 30 minutes after it.

Comments 00 участников · 0 гостей🔒 Rate and discuss after signing up

Comments · 0

No comments yet.Sign in to comment, rate and see all comments.