Guide · Virtual machines

Create and manage KVM virtual machines.

Every virtual machine in LexiVirt runs on KVM through libvirt. This guide goes from an install image to a running guest, then through the everyday work: templates, cloud-init, resizing, snapshots, clones and exports.

By · Checked against LexiVirt 2.1 on

Put an install image in the library

  1. Open Nodes → ISO Library.
  2. Upload an ISO or a disk image, or give its URL and choose Download to all nodes. An optional sha256 is checked on arrival.
  3. The image is copied to every online node, because the VM may be placed on any of them.

The installer can also fetch a few images for you at install time, each checked against its publisher's SHA256: Ubuntu Server 22.04 and 24.04, Debian 12 and 13, CentOS Stream 9 and AlmaLinux 9.

Create a VM

  1. Open Virtual Machines and choose Create VM. The wizard walks through Name & placement, Source, Resources, Networking, Guest setup, Project & owner and Review.
  2. Under Source, pick an Installer ISO or a Disk image.
  3. Choose Create. Before it starts, the console checks that some node has the network, the image and the space the VM needs, and says which node lacks what if none does. Leave the node unchosen and the scheduler places the VM where there is room.
  4. Open the VM's screen from its row and install the operating system as on real hardware.

UEFI or BIOS is chosen from the installer itself: an ISO that cannot boot under UEFI gets BIOS. Several network cards, each on its own network and optionally with a fixed address, and a CPU topology of sockets × cores, are set in the same wizard.

Cloud images and cloud-init

A cloud image is an installed system waiting to be told who it is. Cloud-init is offered only with a disk image, not with an installer ISO.

  1. Put a cloud image in the library: Nodes → ISO Library, give its URL (a Debian or Ubuntu cloud .qcow2, for example) and choose Download to all nodes.
  2. In Create VM, under Source, choose Disk image and pick it.
  3. Under Guest setup, tick Configure the first boot (cloud-init) and give the User, a Password or an SSH public key (at least one, or nobody can sign in), the Host name and, if you want, a command under Run on first boot (optional).
  4. Create the VM. It finds its settings on first boot; the user can use sudo.

Many VMs at once, and templates

  • In Create VM → Name & placement, set How many — up to 50. The VMs are named web-01, web-02 … and each is placed on a node with room; in a batch the cloud-init host name gets the same suffix.
  • Save a configuration by filling in Save this configuration as a template (optional) on the Project & owner step, or with Save as a template in an existing VM's tools.
  • Start from one with Start from a template on the first step. A template is configuration only, so deleting it touches no VM made from it.

Windows guests

  • A Windows 11 ISO or image gets a virtual TPM 2.0 and Secure Boot with Microsoft's keys by itself. The TPM stays with the VM when it is cloned, exported, moved, backed up or restarted by high availability, so BitLocker keeps working. A VM with a TPM runs only on nodes with swtpm installed.
  • Windows has no built-in driver for virtio disks and network cards: attach the virtio-win driver disc as a second CD-ROM and use Load driver at the disk-selection screen. Budget 40 GB of disk and 4 GB of memory as a realistic minimum.
  • The Windows Server images the installer can fetch are 180-day evaluation editions; production use needs a licence bought from Microsoft.

Everyday operations

  • Start, stop and restart from the VM's row; open its screen in the browser from the first line of the boot — including pasting text into guests that have no clipboard.
  • Resize CPU, memory and disks with the VM off. Disks only grow; afterwards extend the partition and filesystem inside the guest (growpart then resize2fs, or the equivalent).
  • The VM's tools hold its disks, recovery points, snapshots, high availability, project and owner, Move to another node, Export, Save as a template and Clone.
  • Deleting a VM deletes its disk image. There is no recycle bin.

Snapshots

  1. Shut the VM down: a snapshot is taken only while it is off, because a disk copied mid-write is not a copy you can trust.
  2. In its tools, under Snapshots, type a name such as before-upgrade and choose Take.
  3. To go back, choose Restore next to it, again with the VM off.

For copies taken while the VM runs, and copies that survive the node, see Backups and disaster recovery.

Limits to know

LimitsMoving a running VM with its disks sends memory and disks between nodes unencrypted, on TCP 49152–49215: keep that on a trusted network. Containers beside VMs (Podman or Docker) need a memory and CPU ceiling. Kubernetes support is provisioning a k3s cluster from VMs, nothing after that.

Go further

The capability behind this guide: KVM Virtual Machine Management. Every console page with its limits: the feature reference. Stuck? Ask the community or get support.

Run it on your own servers.

Free, with no licence per VM, socket or core. One command per server.